Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490594 > unrolled thread

Re: [PATCH v2 0/4] gpio: fix an incorrect lockdep warning

Started byWolfram Sang <wsa@the-dreams.de>
First post2016-09-24 11:00 +0200
Last post2016-09-24 11:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 0/4] gpio: fix an incorrect lockdep warning Wolfram Sang <wsa@the-dreams.de> - 2016-09-24 11:00 +0200

#1490594 — Re: [PATCH v2 0/4] gpio: fix an incorrect lockdep warning

FromWolfram Sang <wsa@the-dreams.de>
Date2016-09-24 11:00 +0200
SubjectRe: [PATCH v2 0/4] gpio: fix an incorrect lockdep warning
Message-ID<skQYp-7h6-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Fri, Sep 16, 2016 at 06:02:41PM +0200, Bartosz Golaszewski wrote:
> If an I2C GPIO multiplexer is driven by a GPIO provided by an expander
> when there's a second expander using the same device driver on one of
> the I2C bus segments, lockdep prints a deadlock warning when trying to
> set the direction or the value of the GPIOs provided by the second
> expander.
> 
> This series exports an already existing function from i2c-core as
> public API and reuses it in pca953x to pass a correct lock subclass
> to lockdep.
> 
> Note: if this series gets merged, I'll prepare follow-up patches for
> other expanders for which a similar problem could potentially occur.
> 
> Tested with the following setup:
> 
>  -------             ---------  Bus segment 1 |         |
> |       |           |         |---------------  Devices
> |       | SCL/SDA   |         |               |         |
> | Linux |-----------| I2C MUX |                - - - - -
> |       |    |      |         | Bus segment 2
> |       |    |      |         |-------------------
>  -------     |       ---------                    |
>              |           |                    - - - - -
>         ------------     | MUX GPIO          |         |
>        |            |    |                     Devices
>        |    GPIO    |    |                   |         |
>        | Expander 1 |----                     - - - - -
>        |            |                             |
>         ------------                              | SCL/SDA
>                                                   |
>                                              ------------
>                                             |            |
>                                             |    GPIO    |
>                                             | Expander 2 |
>                                             |            |
>                                              ------------
> 
> where expander 1 is a pca9534 and expander 2 is a pca9535.
> 
> v1 -> v2:
> - added patches 1/4, 2/4 & 3/4
> - used i2c_adapter_depth() in patch 4/4 in order to detect multiple
>   adapter nesting
> 
> Bartosz Golaszewski (4):
>   i2c: export i2c_adapter_depth()
>   lockdep: make MAX_LOCKDEP_SUBCLASSES unconditionally visible
>   i2c: add a warning to i2c_adapter_depth()
>   gpio: pca953x: fix an incorrect lockdep warning

Applied to for-next, thanks!

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web