Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1390525
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking |
| Date | 2016-04-28 23:00 +0200 |
| Message-ID | <rt1cu-21g-11@gated-at.bofh.it> (permalink) |
| References | <rq7o7-5F5-21@gated-at.bofh.it> <rt1cu-21g-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Wed, Apr 20, 2016 at 05:17:56PM +0200, Peter Rosin wrote: > Add i2c_lock_bus() and i2c_unlock_bus(), which call the new lock_bus and > unlock_bus ops in the adapter. These funcs/ops take an additional flags > argument that indicates for what purpose the adapter is locked. > > There are two flags, I2C_LOCK_ADAPTER and I2C_LOCK_SEGMENT, but they are > both implemented the same. For now. Locking the adapter means that the > whole bus is locked, locking the segment means that only the current bus > segment is locked (i.e. i2c traffic on the parent side of mux is still > allowed even if the child side of the mux is locked. > > Also support a trylock_bus op (but no function to call it, as it is not > expected to be needed outside of the i2c core). > > Implement i2c_lock_adapter/i2c_unlock_adapter in terms of the new locking > scheme (i.e. lock with the I2C_LOCK_ADAPTER flag). > > Annotate some of the locking with explicit I2C_LOCK_SEGMENT flags. > > Signed-off-by: Peter Rosin <peda@axentia.se> Letting you know that I start reviewing the 2nd part of your series. Did the first glimpse today. Will hopefully do the in-depth part this weekend. One thing already: > +static void i2c_adapter_lock_bus(struct i2c_adapter *adapter, int flags) Shouldn't flags be unsigned?
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking Wolfram Sang <wsa@the-dreams.de> - 2016-04-28 23:00 +0200
Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking Wolfram Sang <wsa@the-dreams.de> - 2016-04-29 09:20 +0200
Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking Antti Palosaari <crope@iki.fi> - 2016-05-02 21:30 +0200
Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking Wolfram Sang <wsa@the-dreams.de> - 2016-05-03 23:40 +0200
Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking Wolfram Sang <wsa@the-dreams.de> - 2016-05-04 18:40 +0200
csiph-web