linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Peter Rosin <peda@axentia.se>
Cc: linux-kernel@vger.kernel.org, Peter Huewe <peterhuewe@gmx.de>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Gregory Fong <gregory.0xf0@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@kernel.org>,
	Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linaro.org>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>
Subject: Re: [PATCH 04/11] input: rohm_bu21023: switch to i2c_lock_segment
Date: Tue, 19 Jun 2018 11:40:00 -0700	[thread overview]
Message-ID: <20180619184000.GJ71788@dtor-ws> (raw)
In-Reply-To: <20180615101506.8012-5-peda@axentia.se>

On Fri, Jun 15, 2018 at 12:14:59PM +0200, Peter Rosin wrote:
> Locking the root adapter for __i2c_transfer will deadlock if the
> device sits behind a mux-locked I2C mux. Switch to the finer-grained
> i2c_lock_segment. If the device does not sit behind a mux-locked mux,
> the two locking variants are equivalent.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

I'm OK with it going through Wolfram's tree; I do not think I'd need an
immutable branch for this even...

> ---
>  drivers/input/touchscreen/rohm_bu21023.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/rohm_bu21023.c b/drivers/input/touchscreen/rohm_bu21023.c
> index bda0500c9b57..22d79db07234 100644
> --- a/drivers/input/touchscreen/rohm_bu21023.c
> +++ b/drivers/input/touchscreen/rohm_bu21023.c
> @@ -304,7 +304,7 @@ static int rohm_i2c_burst_read(struct i2c_client *client, u8 start, void *buf,
>  	msg[1].len = len;
>  	msg[1].buf = buf;
>  
> -	i2c_lock_adapter(adap);
> +	i2c_lock_segment(adap);
>  
>  	for (i = 0; i < 2; i++) {
>  		if (__i2c_transfer(adap, &msg[i], 1) < 0) {
> @@ -313,7 +313,7 @@ static int rohm_i2c_burst_read(struct i2c_client *client, u8 start, void *buf,
>  		}
>  	}
>  
> -	i2c_unlock_adapter(adap);
> +	i2c_unlock_segment(adap);
>  
>  	return ret;
>  }
> -- 
> 2.11.0
> 

Thanks.

-- 
Dmitry

  reply	other threads:[~2018-06-19 18:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15 10:14 [PATCH 00/11] Split i2c_lock_adapter into i2c_lock_root and i2c_lock_segment Peter Rosin
2018-06-15 10:14 ` [PATCH 01/11] i2c: add helpers for locking the I2C segment Peter Rosin
2018-06-18 11:05   ` Wolfram Sang
2018-06-18 11:32     ` Peter Rosin
2018-06-18 11:54       ` Wolfram Sang
2018-06-19 21:29         ` Peter Rosin
2018-06-15 10:14 ` [PATCH 02/11] tpm/tpm_i2c_infineon: switch to i2c_lock_segment Peter Rosin
2018-06-19 12:56   ` Jarkko Sakkinen
2018-06-19 13:05     ` Peter Rosin
2018-06-15 10:14 ` [PATCH 03/11] i2c: mux: pca9541: " Peter Rosin
2018-06-15 10:14 ` [PATCH 04/11] input: rohm_bu21023: " Peter Rosin
2018-06-19 18:40   ` Dmitry Torokhov [this message]
2018-06-15 10:15 ` [PATCH 05/11] media: af9013: " Peter Rosin
2018-06-15 10:15 ` [PATCH 06/11] media: drxk_hard: " Peter Rosin
2018-06-15 10:15 ` [PATCH 07/11] media: rtl2830: " Peter Rosin
2018-06-15 10:15 ` [PATCH 08/11] media: tda1004x: " Peter Rosin
2018-06-15 10:15 ` [PATCH 09/11] media: tda18271: " Peter Rosin
2018-06-15 10:15 ` [PATCH 10/11] mfd: 88pm860x-i2c: " Peter Rosin
2018-06-15 10:15 ` [PATCH 11/11] i2c: rename i2c_lock_adapter to i2c_lock_root Peter Rosin
2018-06-18 11:06 ` [PATCH 00/11] Split i2c_lock_adapter into i2c_lock_root and i2c_lock_segment Wolfram Sang

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=20180619184000.GJ71788@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.0xf0@gmail.com \
    --cc=hskinnemoen@gmail.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=kgene@kernel.org \
    --cc=khilman@kernel.org \
    --cc=krzk@kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=orsonzhai@gmail.com \
    --cc=peda@axentia.se \
    --cc=peterhuewe@gmx.de \
    --cc=thierry.reding@gmail.com \
    --cc=zhang.lyra@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).