Re: [PATCH v9 2/3] Input: Add Novatek NT36xxx touchscreen driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi AngeloGioacchino,

On Wed, Oct 28, 2020 at 11:13:01PM +0100, kholk11@xxxxxxxxx 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



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux