lkml.org 
[lkml]   [2020]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 2/3] Input: Add Novatek NT36xxx touchscreen driver
Hi AngeloGioacchino,

On Wed, Oct 28, 2020 at 11:13:01PM +0100, kholk11@gmail.com wrote:
> +/**
> + * nt36xxx_set_page - Set page number for read/write
> + * @ts: Main driver structure
> + *
> + * Return: Always zero for success, negative number for error
> + */
> +static int nt36xxx_set_page(struct nt36xxx_i2c *ts, u32 pageaddr)
> +{
> + u32 data = cpu_to_be32(pageaddr) >> 8;
> + int ret;
> +
> + ret = regmap_noinc_write(ts->fw_regmap, NT36XXX_CMD_SET_PAGE,
> + &data, sizeof(data));
> + if (ret)
> + return ret;
> +
> + usleep_range(100, 200);
> + return ret;
> +}

Regmap is supposed to handle paged access for you as long as you set it
up for paged access. Why do you need custom page handling here?

Thanks.

--
Dmitry

\
 
 \ /
  Last update: 2020-12-07 07:45    [W:0.206 / U:2.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site