All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: kholk11@gmail.com
Cc: robh+dt@kernel.org, rydberg@bitmath.org, priv.luk@gmail.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	marijns95@gmail.com, konradybcio@gmail.com,
	martin.botka1@gmail.com, phone-devel@vger.kernel.org,
	devicetree@vger.kernel.org, krzk@kernel.org,
	andy.shevchenko@gmail.com
Subject: Re: [PATCH v9 2/3] Input: Add Novatek NT36xxx touchscreen driver
Date: Sun, 6 Dec 2020 22:43:24 -0800	[thread overview]
Message-ID: <X83PDBKOq9bwSI0N@google.com> (raw)
In-Reply-To: <20201028221302.66583-3-kholk11@gmail.com>

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

  reply	other threads:[~2020-12-07  6:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 22:12 [PATCH v9 0/3] Add Novatek NT36xxx touchscreen driver kholk11
2020-10-28 22:13 ` [PATCH v9 1/3] dt-bindings: Add vendor prefix for Novatek Microelectronics Corp kholk11
2020-10-29 15:50   ` Rob Herring
2020-10-29 17:22     ` AngeloGioacchino Del Regno
2020-10-28 22:13 ` [PATCH v9 2/3] Input: Add Novatek NT36xxx touchscreen driver kholk11
2020-12-07  6:43   ` Dmitry Torokhov [this message]
2021-01-13 13:03     ` AngeloGioacchino Del Regno
2023-06-26 23:59   ` Konrad Dybcio
2020-10-28 22:13 ` [PATCH v9 3/3] dt-bindings: touchscreen: Add binding for Novatek NT36xxx series driver kholk11
2020-11-23 10:12 ` [PATCH v9 0/3] Add Novatek NT36xxx touchscreen driver Amit Pundir
2020-11-26 17:09   ` AngeloGioacchino Del Regno
2020-11-27  6:23 ` Amit Pundir
2022-04-26  7:55 ` Danct12

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X83PDBKOq9bwSI0N@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kholk11@gmail.com \
    --cc=konradybcio@gmail.com \
    --cc=krzk@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijns95@gmail.com \
    --cc=martin.botka1@gmail.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=priv.luk@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.