Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-25 Thread Philipp Zabel
On Tue, 2017-04-25 at 16:55 +0200, Peter Rosin wrote: > On 2017-04-25 16:16, Peter Rosin wrote: > > On 2017-04-24 16:59, Philipp Zabel wrote: > >> On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: > >> [...] > How about an atomic use_count on the mux_control, a bool shared that is >

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-25 Thread Philipp Zabel
On Tue, 2017-04-25 at 16:55 +0200, Peter Rosin wrote: > On 2017-04-25 16:16, Peter Rosin wrote: > > On 2017-04-24 16:59, Philipp Zabel wrote: > >> On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: > >> [...] > How about an atomic use_count on the mux_control, a bool shared that is >

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-25 Thread Peter Rosin
On 2017-04-25 16:16, Peter Rosin wrote: > On 2017-04-24 16:59, Philipp Zabel wrote: >> On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: >> [...] How about an atomic use_count on the mux_control, a bool shared that is only set by the first consumer, and controls whether selecting

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-25 Thread Peter Rosin
On 2017-04-25 16:16, Peter Rosin wrote: > On 2017-04-24 16:59, Philipp Zabel wrote: >> On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: >> [...] How about an atomic use_count on the mux_control, a bool shared that is only set by the first consumer, and controls whether selecting

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-25 Thread Peter Rosin
On 2017-04-24 16:59, Philipp Zabel wrote: > On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: > [...] >>> How about an atomic use_count on the mux_control, a bool shared that is >>> only set by the first consumer, and controls whether selecting locks? >> >> That has the drawback that it is

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-25 Thread Peter Rosin
On 2017-04-24 16:59, Philipp Zabel wrote: > On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: > [...] >>> How about an atomic use_count on the mux_control, a bool shared that is >>> only set by the first consumer, and controls whether selecting locks? >> >> That has the drawback that it is

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: [...] > > How about an atomic use_count on the mux_control, a bool shared that is > > only set by the first consumer, and controls whether selecting locks? > > That has the drawback that it is hard to restore the mux-control in a safe > way so

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 16:36 +0200, Peter Rosin wrote: [...] > > How about an atomic use_count on the mux_control, a bool shared that is > > only set by the first consumer, and controls whether selecting locks? > > That has the drawback that it is hard to restore the mux-control in a safe > way so

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Peter Rosin
On 2017-04-24 16:10, Philipp Zabel wrote: > On Mon, 2017-04-24 at 13:37 +0200, Peter Rosin wrote: >> On 2017-04-24 12:52, Philipp Zabel wrote: >>> On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: Hi! The big change since v13 is that the mux state is now locked with a mutex

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Peter Rosin
On 2017-04-24 16:10, Philipp Zabel wrote: > On Mon, 2017-04-24 at 13:37 +0200, Peter Rosin wrote: >> On 2017-04-24 12:52, Philipp Zabel wrote: >>> On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: Hi! The big change since v13 is that the mux state is now locked with a mutex

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 13:37 +0200, Peter Rosin wrote: > On 2017-04-24 12:52, Philipp Zabel wrote: > > On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: > >> Hi! > >> > >> The big change since v13 is that the mux state is now locked with a mutex > >> instead of an rwsem. Other that that, it is

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 13:37 +0200, Peter Rosin wrote: > On 2017-04-24 12:52, Philipp Zabel wrote: > > On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: > >> Hi! > >> > >> The big change since v13 is that the mux state is now locked with a mutex > >> instead of an rwsem. Other that that, it is

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 13:37 +0200, Peter Rosin wrote: [...] > Ok, so the difference is probably that the rwsem locking primitive > don't have any lockdep checking hooked up. Because the rwsem was > definitely held in the same way in v13 as the mutex is now held in > v14, so there's no fundamental

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 13:37 +0200, Peter Rosin wrote: [...] > Ok, so the difference is probably that the rwsem locking primitive > don't have any lockdep checking hooked up. Because the rwsem was > definitely held in the same way in v13 as the mutex is now held in > v14, so there's no fundamental

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Peter Rosin
On 2017-04-24 12:52, Philipp Zabel wrote: > On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: >> Hi! >> >> The big change since v13 is that the mux state is now locked with a mutex >> instead of an rwsem. Other that that, it is mostly restructuring and doc >> changes. There are a few other

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Peter Rosin
On 2017-04-24 12:52, Philipp Zabel wrote: > On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: >> Hi! >> >> The big change since v13 is that the mux state is now locked with a mutex >> instead of an rwsem. Other that that, it is mostly restructuring and doc >> changes. There are a few other

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: > Hi! > > The big change since v13 is that the mux state is now locked with a mutex > instead of an rwsem. Other that that, it is mostly restructuring and doc > changes. There are a few other "real" changes as well, but those changes > feel

Re: [PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Philipp Zabel
On Mon, 2017-04-24 at 10:36 +0200, Peter Rosin wrote: > Hi! > > The big change since v13 is that the mux state is now locked with a mutex > instead of an rwsem. Other that that, it is mostly restructuring and doc > changes. There are a few other "real" changes as well, but those changes > feel

[PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Peter Rosin
Hi! The big change since v13 is that the mux state is now locked with a mutex instead of an rwsem. Other that that, it is mostly restructuring and doc changes. There are a few other "real" changes as well, but those changes feel kind of minor. I guess what I'm trying to say is that although the

[PATCH v14 00/11] mux controller abstraction and iio/i2c muxes

2017-04-24 Thread Peter Rosin
Hi! The big change since v13 is that the mux state is now locked with a mutex instead of an rwsem. Other that that, it is mostly restructuring and doc changes. There are a few other "real" changes as well, but those changes feel kind of minor. I guess what I'm trying to say is that although the