mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Patrice Chotard <patrice.chotard@st.com>
To: Stefan Agner <stefan@agner.ch>
Cc: <lee.jones@linaro.org>, <linus.walleij@linaro.org>,
	<gnurou@gmail.com>, <linux-gpio@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <maxime.coquelin@st.com>,
	<amelie.delaunay@st.com>, <shawnguo@kernel.org>,
	<kernel@pengutronix.de>, <dinguyen@opensource.altera.com>,
	<vireshk@kernel.org>, <shiraz.linux.kernel@gmail.com>,
	<thierry.reding@gmail.com>, <marcel.ziswiler@toradex.com>,
	<dev@lynxeye.de>
Subject: Re: [PATCH v2 02/10] mfd: stmpe: Add reset support for all STMPE variant
Date: Wed, 10 Aug 2016 18:00:22 +0200	[thread overview]
Message-ID: <6fcee179-45e1-6480-c4da-7dbc03b1843d@st.com> (raw)
In-Reply-To: <8798334c6e5272a08ed665f7fc649fd1@agner.ch>

Hi Stefan


On 08/07/2016 04:54 AM, Stefan Agner wrote:
> On 2016-04-28 05:13, patrice.chotard@st.com wrote:
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> Reset was only implemented for STMPE1801 variant despite
>> all variant have a SOFT_RESET bit.
>>
>> For STMPE2401/2403/801/1601/1801 SOFT_RESET bit is bit 7
>> of SYS_CTRL register.
>> For STMPE610/811 (which have the same variant id) SOFT_RESET
>> bit is bit 1 of SYS_CTRL register.
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>> Acked-by: Lee Jones <lee.jones@linaro.org>
>> ---
>>  drivers/mfd/stmpe.c | 23 +++++++++++++++--------
>>  drivers/mfd/stmpe.h |  7 +++++--
>>  2 files changed, 20 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
>> index c553b73..af682d0 100644
>> --- a/drivers/mfd/stmpe.c
>> +++ b/drivers/mfd/stmpe.c
>> @@ -735,13 +735,22 @@ static int stmpe1801_enable(struct stmpe *stmpe,
>> unsigned int blocks,
>>  				enable ? mask : 0);
>>  }
>>  
>> -static int stmpe1801_reset(struct stmpe *stmpe)
>> +static int stmpe_reset(struct stmpe *stmpe)
>>  {
>> +	u16 id_val = stmpe->variant->id_val;
>>  	unsigned long timeout;
>>  	int ret = 0;
>> +	u8 reset_bit;
>> +
>> +	if (id_val == STMPE811_ID)
>> +		/* STMPE801 and STMPE610 use bit 1 of SYS_CTRL register */
>> +		reset_bit = STMPE811_SYS_CTRL_RESET;
>> +	else
>> +		/* all other STMPE variant use bit 7 of SYS_CTRL register */
>> +		reset_bit = STMPE_SYS_CTRL_RESET;
> Wouldn't it be nicer to have this in struct stmpe_variant_info like
> id_mask...?

For information this series has just been pushed by Lee Jones.
I will have a look at your proposal and submit an update , but after my 3 weeks of vacations ;-)

Thanks

Patrice

  reply	other threads:[~2016-08-10 21:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 12:12 [PATCH v2 00/10] STMPE fixes/rework and add STMPE1600 support patrice.chotard
2016-04-28 12:13 ` [PATCH v2 01/10] mfd: stmpe: Add STMPE_IDX_SYS_CTRL/2 enum patrice.chotard
2016-04-28 12:13 ` [PATCH v2 02/10] mfd: stmpe: Add reset support for all STMPE variant patrice.chotard
2016-08-07  2:54   ` Stefan Agner
2016-08-10 16:00     ` Patrice Chotard [this message]
2016-04-28 12:13 ` [PATCH v2 03/10] gpio: stmpe: fix edge and rising/falling edge detection patrice.chotard
2016-04-28 12:13 ` [PATCH v2 04/10] gpio: stmpe: write int status register only when needed patrice.chotard
2016-04-28 12:13 ` [PATCH v2 05/10] mfd: stmpe: use generic bit mask name patrice.chotard
2016-08-04 15:05   ` Lee Jones
2016-04-28 12:13 ` [PATCH v2 06/10] mfd: stmpe: rework registers access patrice.chotard
2016-04-29  7:42   ` Linus Walleij
2016-04-28 12:13 ` [PATCH v2 07/10] gpio: " patrice.chotard
2016-04-29  7:42   ` Linus Walleij
2016-04-28 12:13 ` [PATCH v2 08/10] Documentation: dt: add stmpe1600 compatible string to stmpe mfd patrice.chotard
2016-04-28 12:13 ` [PATCH v2 09/10] mfd: Add STMPE1600 support patrice.chotard
2016-08-04 15:10   ` Lee Jones
2016-04-28 12:13 ` [PATCH v2 10/10] gpio: stmpe: " patrice.chotard
2016-04-29  7:44   ` Linus Walleij
2016-04-29  7:45 ` [PATCH v2 00/10] STMPE fixes/rework and add " Linus Walleij
2016-04-29 19:23 ` Marcel Ziswiler

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=6fcee179-45e1-6480-c4da-7dbc03b1843d@st.com \
    --to=patrice.chotard@st.com \
    --cc=amelie.delaunay@st.com \
    --cc=dev@lynxeye.de \
    --cc=dinguyen@opensource.altera.com \
    --cc=gnurou@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=maxime.coquelin@st.com \
    --cc=shawnguo@kernel.org \
    --cc=shiraz.linux.kernel@gmail.com \
    --cc=stefan@agner.ch \
    --cc=thierry.reding@gmail.com \
    --cc=vireshk@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®