lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X83PDBKOq9bwSI0N@google.com>
Date:   Sun, 6 Dec 2020 22:43:24 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     kholk11@...il.com
Cc:     robh+dt@...nel.org, rydberg@...math.org, priv.luk@...il.com,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        marijns95@...il.com, konradybcio@...il.com,
        martin.botka1@...il.com, phone-devel@...r.kernel.org,
        devicetree@...r.kernel.org, krzk@...nel.org,
        andy.shevchenko@...il.com
Subject: Re: [PATCH v9 2/3] Input: Add Novatek NT36xxx touchscreen driver

Hi AngeloGioacchino,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ