[PATCH v8 11/12] dt-bindings: simplified bindings for single-user gpio mux

2017-01-18 Thread Peter Rosin
Allow bindings for a GPIO controlled mux to be specified in the mux consumer node. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/mux-controller.txt | 26 ++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree

[PATCH v8 10/12] mux: adg792a: add mux controller driver for ADG792A/G

2017-01-18 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/mux-adg792a.c | 167 ++ 3 files changed, 180 insertions

[PATCH v8 08/12] i2c: i2c-mux-simple: new driver

2017-01-18 Thread Peter Rosin
This is a generic simple i2c mux that uses the generic multiplexer subsystem to do the muxing. The user can select if the mux is to be mux-locked and parent-locked as described in Documentation/i2c/i2c-topology. Acked-by: Jonathan Cameron Acked-by: Wolfram Sang Signed-off-by: Peter Rosin

[PATCH v8 12/12] mux: support simplified bindings for single-user gpio mux

2017-01-18 Thread Peter Rosin
Allow bindings for a GPIO controlled mux to be specified in the mux consumer node. Signed-off-by: Peter Rosin --- drivers/mux/Kconfig| 5 + drivers/mux/mux-core.c | 23 +-- drivers/mux/mux-gpio.c | 28 +--- drivers/mux/mux-gpio.h | 13

[PATCH v8 09/12] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2017-01-18 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/mux-adg792a.txt| 79 ++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/mux/mux-adg792a.txt

[PATCH v8 05/12] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-01-18 Thread Peter Rosin
Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- .../bindings/iio/multiplexer/io-channel-mux.txt| 39 ++ MAINTAINERS| 6 2 files

[PATCH v8 03/12] mux: minimal mux subsystem and gpio-based mux controller

2017-01-18 Thread Peter Rosin
comes with a single backend driver that controls gpio based multiplexers. Even though not needed by this initial driver, the mux controller subsystem is prepared to handle chips with multiple (independent) mux controllers. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation

[PATCH v8 01/12] devres: trivial whitespace fix

2017-01-18 Thread Peter Rosin
Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver

[PATCH v8 00/12] mux controller abstraction and iio/i2c muxes

2017-01-18 Thread Peter Rosin
tion pretty quickly if there is any contention. Also, the "mux" name feels a bit ambitious, there are many muxes in the world, and this tiny bit of code is probably not good enough to be a nice fit for all... Cheers, peda Peter Rosin (12): devres: trivial whitespace fix dt-bindings: doc

[PATCH v8 02/12] dt-bindings: document devicetree bindings for mux-controllers and mux-gpio

2017-01-18 Thread Peter Rosin
Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/mux-controller.txt | 127 + Documentation/devicetree/bindings/mux/mux-gpio.txt | 68 +++ MAINTAINERS| 5 + 3 files changed, 200 insertions(+) create mode 100644

[PATCH v8 06/12] iio: multiplexer: new iio category and iio-mux driver

2017-01-18 Thread Peter Rosin
, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio

[PATCH v8 07/12] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings

2017-01-18 Thread Peter Rosin
Describe how a generic multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-mux-simple.txt | 81 ++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v8 04/12] iio: inkern: api for manipulating ext_info of iio channels

2017-01-18 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/inkern.c | 60 include/linux/iio/consumer.h | 37 +++ 2

Re: [PATCH v8 12/12] mux: support simplified bindings for single-user gpio mux

2017-01-23 Thread Peter Rosin
On 2017-01-22 14:30, Jonathan Cameron wrote: > On 18/01/17 15:57, Peter Rosin wrote: >> Allow bindings for a GPIO controlled mux to be specified in the >> mux consumer node. >> >> Signed-off-by: Peter Rosin > Code is good as far as I am concerned. Only question is

Re: [PATCH v8 02/12] dt-bindings: document devicetree bindings for mux-controllers and mux-gpio

2017-01-27 Thread Peter Rosin
On 2017-01-27 18:49, Rob Herring wrote: > On Wed, Jan 18, 2017 at 04:57:05PM +0100, Peter Rosin wrote: >> Allow specifying that a single multiplexer controller can be used to control >> several parallel multiplexers, thus enabling sharing of the multiplexer >> controller b

Re: [PATCH v8 09/12] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2017-01-27 Thread Peter Rosin
On 2017-01-27 20:50, Rob Herring wrote: > On Wed, Jan 18, 2017 at 04:57:12PM +0100, Peter Rosin wrote: >> Analog Devices ADG792A/G is a triple 4:1 mux. >> >> Acked-by: Jonathan Cameron >> Signed-off-by: Peter Rosin >> --- >> .../devicetree/b

Re: [PATCH v8 07/12] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings

2017-01-28 Thread Peter Rosin
On 2017-01-27 20:39, Rob Herring wrote: > On Wed, Jan 18, 2017 at 04:57:10PM +0100, Peter Rosin wrote: >> Describe how a generic multiplexer controller is used to mux an i2c bus. >> >> Acked-by: Jonathan Cameron >> Signed-off-by: Peter Rosin >> --- >&g

Re: [PATCH v8 12/12] mux: support simplified bindings for single-user gpio mux

2017-01-30 Thread Peter Rosin
On 2017-01-27 16:52, Rob Herring wrote: > On Mon, Jan 23, 2017 at 11:24:18AM +0100, Peter Rosin wrote: >> On 2017-01-22 14:30, Jonathan Cameron wrote: >>> On 18/01/17 15:57, Peter Rosin wrote: >>>> Allow bindings for a GPIO controlled mux to be specified

Re: [PATCH v8 07/12] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings

2017-01-30 Thread Peter Rosin
On 2017-01-30 18:20, Rob Herring wrote: > On Sat, Jan 28, 2017 at 4:42 PM, Peter Rosin wrote: >> On 2017-01-27 20:39, Rob Herring wrote: >>> On Wed, Jan 18, 2017 at 04:57:10PM +0100, Peter Rosin wrote: >>>> Describe how a generic multiplexer controller is used to m

Re: [PATCH v8 07/12] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings

2017-02-03 Thread Peter Rosin
On 2017-02-02 17:08, Rob Herring wrote: > On Tue, Jan 31, 2017 at 1:36 AM, Peter Rosin wrote: >> If you see this new driver as something that is superseding the existing >> i2c-mux-gpio driver, I'm sad to inform you that the code is not simply >> not there. i2c-mux-gpio

[PATCH] i2c: i2c-mux-gpio: rename i2c-gpio-mux to i2c-mux-gpio

2017-02-07 Thread Peter Rosin
The rename did the wrong thing for this documentation file all those years ago. Fix that as well as the neglected rename of the platform data structure. Fixes: e7065e20d9a6 ("i2c: Rename last mux driver to standard pattern") Signed-off-by: Peter Rosin --- Documentation/i2c/muxes/i2

[PATCH v9 00/10] mux controller abstraction and iio/i2c muxes

2017-02-08 Thread Peter Rosin
ncurrent access as long as all users agree on the mux state, but I suspect that the rwsem will degrade to the mutex situation pretty quickly if there is any contention. Also, the "mux" name feels a bit ambitious, there are many muxes in the world, and this tiny bit of code is probably n

[PATCH v9 01/10] devres: trivial whitespace fix

2017-02-08 Thread Peter Rosin
Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver

[PATCH v9 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-02-08 Thread Peter Rosin
comes with a single backend driver that controls gpio based multiplexers. Even though not needed by this initial driver, the mux controller subsystem is prepared to handle chips with multiple (independent) mux controllers. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation

[PATCH v9 02/10] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-02-08 Thread Peter Rosin
Acked-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 + .../devicetree/bindings/mux/mux-controller.txt | 157 + MAINTAINERS| 6 + include/dt-bindings/mux/mux.h

[PATCH v9 06/10] iio: multiplexer: new iio category and iio-mux driver

2017-02-08 Thread Peter Rosin
, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio

[PATCH v9 08/10] i2c: i2c-mux-gpmux: new driver

2017-02-08 Thread Peter Rosin
-by: Peter Rosin --- drivers/i2c/muxes/Kconfig | 13 +++ drivers/i2c/muxes/Makefile| 1 + drivers/i2c/muxes/i2c-mux-gpmux.c | 173 ++ 3 files changed, 187 insertions(+) create mode 100644 drivers/i2c/muxes/i2c-mux-gpmux.c diff --git a/drivers

[PATCH v9 05/10] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-02-08 Thread Peter Rosin
Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Peter Rosin --- .../bindings/iio/multiplexer/io-channel-mux.txt| 39 ++ MAINTAINERS

[PATCH v9 07/10] dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings

2017-02-08 Thread Peter Rosin
Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 ++ 1 file changed, 99 insertions(+) create mode 100644 Documentation

[PATCH v9 10/10] mux: adg792a: add mux controller driver for ADG792A/G

2017-02-08 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/mux-adg792a.c | 140 ++ 3 files changed, 153 insertions

[PATCH v9 04/10] iio: inkern: api for manipulating ext_info of iio channels

2017-02-08 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/inkern.c | 60 include/linux/iio/consumer.h | 37 +++ 2

[PATCH v9 09/10] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2017-02-08 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/adi,adg792a.txt| 75 ++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree/bindings/mux/adi,adg792a.txt

Re: [PATCH v9 00/10] mux controller abstraction and iio/i2c muxes

2017-02-28 Thread Peter Rosin
Hi! The status of this series [1] is that Rob Herring has acked/reviewed all devicetree changes, so I suppose that's ok. Jonathan Cameron has acked the additions to the iio subsystem and reviewed the new iio driver. Wolfram Sang has acked the i2c-mux driver. That's acks or reviews from the maintai

Re: [PATCH v9 00/10] mux controller abstraction and iio/i2c muxes

2017-03-03 Thread Peter Rosin
On 2017-02-28 18:18, Greg Kroah-Hartman wrote: > On Tue, Feb 28, 2017 at 04:17:52PM +0100, Peter Rosin wrote: >> Hi! >> >> The status of this series [1] is that Rob Herring has acked/reviewed all >> devicetree changes, so I suppose that's ok. Jonathan Cameron has a

Re: [PATCH v9 00/10] mux controller abstraction and iio/i2c muxes

2017-03-03 Thread Peter Rosin
On 2017-03-03 17:52, Wolfram Sang wrote: > >> Jonathan, Wolfram, do you have any preferences on how this should be >> coordinated regarding the new iio and i2c drivers (and iio changes)? > > You got the acks, all is fine, I think. > >> My plan is to at some point declare the branch immutable. Th

[PATCH v10 02/11] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-03-10 Thread Peter Rosin
Acked-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 + .../devicetree/bindings/mux/mux-controller.txt | 157 + MAINTAINERS| 6 + include/dt-bindings/mux/mux.h

[PATCH v10 01/11] devres: trivial whitespace fix

2017-03-10 Thread Peter Rosin
Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver

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

2017-03-10 Thread Peter Rosin
bitious, there are many muxes in the world, and this tiny bit of code is probably not good enough to be a nice fit for all... Cheers, peda Peter Rosin (11): devres: trivial whitespace fix dt-bindings: document devicetree bindings for mux-controllers and gpio-mux mux: minimal mux subsystem

[PATCH v10 11/11] iio: multiplexer: fix unsigned check with less than zero

2017-03-10 Thread Peter Rosin
, CID#1415278 ("Unsigned compared against 0") Reported-by: Colin Ian King Signed-off-by: Peter Rosin --- drivers/iio/multiplexer/iio-mux.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iio/multiplexer/iio-mux.c b/drivers/iio/multiplexer/iio-m

[PATCH v10 06/11] iio: multiplexer: new iio category and iio-mux driver

2017-03-10 Thread Peter Rosin
, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio

[PATCH v10 08/11] i2c: i2c-mux-gpmux: new driver

2017-03-10 Thread Peter Rosin
-by: Peter Rosin --- drivers/i2c/muxes/Kconfig | 13 +++ drivers/i2c/muxes/Makefile| 1 + drivers/i2c/muxes/i2c-mux-gpmux.c | 173 ++ 3 files changed, 187 insertions(+) create mode 100644 drivers/i2c/muxes/i2c-mux-gpmux.c diff --git a/drivers

[PATCH v10 04/11] iio: inkern: api for manipulating ext_info of iio channels

2017-03-10 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/inkern.c | 60 include/linux/iio/consumer.h | 37 +++ 2

[PATCH v10 07/11] dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings

2017-03-10 Thread Peter Rosin
Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 ++ 1 file changed, 99 insertions(+) create mode

[PATCH v10 09/11] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2017-03-10 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/adi,adg792a.txt| 75 ++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v10 10/11] mux: adg792a: add mux controller driver for ADG792A/G

2017-03-10 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/mux-adg792a.c | 140 ++ 3 files changed, 153 insertions

[PATCH v10 05/11] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-03-10 Thread Peter Rosin
Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Peter Rosin --- .../bindings/iio/multiplexer/io-channel-mux.txt| 39 ++ MAINTAINERS

[PATCH v10 03/11] mux: minimal mux subsystem and gpio-based mux controller

2017-03-10 Thread Peter Rosin
comes with a single backend driver that controls gpio based multiplexers. Even though not needed by this initial driver, the mux controller subsystem is prepared to handle chips with multiple (independent) mux controllers. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation

Re: [PATCH v10 03/11] mux: minimal mux subsystem and gpio-based mux controller

2017-03-15 Thread Peter Rosin
On 2017-03-10 12:09, Peter Rosin wrote: > Add a new minimalistic subsystem that handles multiplexer controllers. > When multiplexers are used in various places in the kernel, and the > same multiplexer controller can be used for several independent things, > there should be one place

[PATCH v11 00/12] mux controller abstraction and iio/i2c muxes

2017-03-27 Thread Peter Rosin
ll. At least the rwsem allows concurrent access as long as all users agree on the mux state, but I suspect that the rwsem will degrade to the mutex situation pretty quickly if there is any contention. Also, the "mux" name feels a bit ambitious, there are many muxes in the world, and this tiny b

[PATCH v11 01/12] devres: trivial whitespace fix

2017-03-27 Thread Peter Rosin
Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver

[PATCH v11 07/12] dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings

2017-03-27 Thread Peter Rosin
Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 ++ 1 file changed, 99 insertions(+) create mode

[PATCH v11 03/12] mux: minimal mux subsystem and gpio-based mux controller

2017-03-27 Thread Peter Rosin
comes with a single backend driver that controls gpio based multiplexers. Even though not needed by this initial driver, the mux controller subsystem is prepared to handle chips with multiple (independent) mux controllers. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation

[PATCH v11 06/12] iio: multiplexer: new iio category and iio-mux driver

2017-03-27 Thread Peter Rosin
, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio

[PATCH v11 09/12] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2017-03-27 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/adi,adg792a.txt| 75 ++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v11 05/12] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-03-27 Thread Peter Rosin
Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Peter Rosin --- .../bindings/iio/multiplexer/io-channel-mux.txt| 39 ++ MAINTAINERS

[PATCH v11 02/12] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-03-27 Thread Peter Rosin
Acked-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 + .../devicetree/bindings/mux/mux-controller.txt | 157 + MAINTAINERS| 6 + include/dt-bindings/mux/mux.h

[PATCH v11 11/12] iio: multiplexer: fix unsigned check with less than zero

2017-03-27 Thread Peter Rosin
, CID#1415278 ("Unsigned compared against 0") Fixes: 1da8e16d2812 ("iio: multiplexer: new iio category and iio-mux driver") Reported-by: Colin Ian King Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/multiplexer/iio-mux.c | 5 - 1 file changed

[PATCH v11 10/12] mux: adg792a: add mux controller driver for ADG792A/G

2017-03-27 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/mux-adg792a.c | 140 ++ 3 files changed, 153 insertions

[PATCH v11 12/12] mux: core: fix error handling in devm_mux_chip_alloc

2017-03-27 Thread Peter Rosin
ng to documentation. Fixes: d47598cc669b ("mux: minimal mux subsystem and gpio-based mux controller") Reported-by: Dan Carpenter Signed-off-by: Peter Rosin --- drivers/mux/mux-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mux/mux-core.c b/drivers/mux/m

[PATCH v11 04/12] iio: inkern: api for manipulating ext_info of iio channels

2017-03-27 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/inkern.c | 60 include/linux/iio/consumer.h | 37 +++ 2

[PATCH v11 08/12] i2c: i2c-mux-gpmux: new driver

2017-03-27 Thread Peter Rosin
-by: Peter Rosin --- drivers/i2c/muxes/Kconfig | 13 +++ drivers/i2c/muxes/Makefile| 1 + drivers/i2c/muxes/i2c-mux-gpmux.c | 173 ++ 3 files changed, 187 insertions(+) create mode 100644 drivers/i2c/muxes/i2c-mux-gpmux.c diff --git a/drivers

Re: [PATCH v11 11/12] iio: multiplexer: fix unsigned check with less than zero

2017-03-27 Thread Peter Rosin
On 2017-03-27 15:06, Johan Hovold wrote: > On Mon, Mar 27, 2017 at 02:17:48PM +0200, Peter Rosin wrote: >> Comparing a size_t with less than zero is always false as size_t >> is unsigned. So, change the type of the variable to ssize_t and >> replicate the size check from

[PATCH v12 00/10] mux controller abstraction and iio/i2c muxes

2017-03-27 Thread Peter Rosin
re many muxes in the world, and this tiny bit of code is probably not good enough to be a nice fit for all... Cheers, peda Peter Rosin (10): devres: trivial whitespace fix dt-bindings: document devicetree bindings for mux-controllers and gpio-mux mux: minimal mux subsystem and gpio-based mux

[PATCH v12 09/10] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2017-03-27 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/adi,adg792a.txt| 75 ++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v12 08/10] i2c: i2c-mux-gpmux: new driver

2017-03-27 Thread Peter Rosin
-by: Peter Rosin --- drivers/i2c/muxes/Kconfig | 13 +++ drivers/i2c/muxes/Makefile| 1 + drivers/i2c/muxes/i2c-mux-gpmux.c | 173 ++ 3 files changed, 187 insertions(+) create mode 100644 drivers/i2c/muxes/i2c-mux-gpmux.c diff --git a/drivers

[PATCH v12 07/10] dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings

2017-03-27 Thread Peter Rosin
Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 ++ 1 file changed, 99 insertions(+) create mode

[PATCH v12 05/10] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-03-27 Thread Peter Rosin
Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Peter Rosin --- .../bindings/iio/multiplexer/io-channel-mux.txt| 39 ++ MAINTAINERS

[PATCH v12 10/10] mux: adg792a: add mux controller driver for ADG792A/G

2017-03-27 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/mux-adg792a.c | 140 ++ 3 files changed, 153 insertions

[PATCH v12 04/10] iio: inkern: api for manipulating ext_info of iio channels

2017-03-27 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/inkern.c | 60 include/linux/iio/consumer.h | 37 +++ 2

[PATCH v12 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-03-27 Thread Peter Rosin
comes with a single backend driver that controls gpio based multiplexers. Even though not needed by this initial driver, the mux controller subsystem is prepared to handle chips with multiple (independent) mux controllers. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation

[PATCH v12 02/10] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-03-27 Thread Peter Rosin
Acked-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 + .../devicetree/bindings/mux/mux-controller.txt | 157 + MAINTAINERS| 6 + include/dt-bindings/mux/mux.h

[PATCH v12 01/10] devres: trivial whitespace fix

2017-03-27 Thread Peter Rosin
Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver

[PATCH v12 06/10] iio: multiplexer: new iio category and iio-mux driver

2017-03-27 Thread Peter Rosin
, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio

Re: [PATCH v12 00/10] mux controller abstraction and iio/i2c muxes

2017-03-30 Thread Peter Rosin
On 2017-03-27 16:21, Peter Rosin wrote: > Hi Greg! > > Please apply. > *snip snip* > v10 -> v11 changes > - added a new patch (12) with a fix for messed up error path reported > by Paul Gortmaker. Oops, should be Dan Carpenter. Sorry about that... And, I forgot t

[PATCH v13 00/10] mux controller abstraction and iio/i2c muxes

2017-04-13 Thread Peter Rosin
s any contention. Also, the "mux" name feels a bit ambitious, there are many muxes in the world, and this tiny bit of code is probably not good enough to be a nice fit for all... Cheers, peda Peter Rosin (10): devres: trivial whitespace fix dt-bindings: document devicetree bindings f

[PATCH v13 04/10] iio: inkern: api for manipulating ext_info of iio channels

2017-04-13 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/inkern.c | 60 include/linux/iio/consumer.h | 37 +++ 2

[PATCH v13 01/10] devres: trivial whitespace fix

2017-04-13 Thread Peter Rosin
Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver

[PATCH v13 07/10] dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings

2017-04-13 Thread Peter Rosin
Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 99 ++ 1 file changed, 99 insertions(+) create mode

[PATCH v13 09/10] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2017-04-13 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/mux/adi,adg792a.txt| 75 ++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v13 10/10] mux: adg792a: add mux controller driver for ADG792A/G

2017-04-13 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/mux-adg792a.c | 141 ++ 3 files changed, 154 insertions

[PATCH v13 05/10] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-04-13 Thread Peter Rosin
Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Peter Rosin --- .../bindings/iio/multiplexer/io-channel-mux.txt| 39 ++ MAINTAINERS

[PATCH v13 06/10] iio: multiplexer: new iio category and iio-mux driver

2017-04-13 Thread Peter Rosin
, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio

[PATCH v13 02/10] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-04-13 Thread Peter Rosin
Acked-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 + .../devicetree/bindings/mux/mux-controller.txt | 157 + MAINTAINERS| 6 + include/dt-bindings/mux/mux.h

[PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-13 Thread Peter Rosin
comes with a single backend driver that controls gpio based multiplexers. Even though not needed by this initial driver, the mux controller subsystem is prepared to handle chips with multiple (independent) mux controllers. Reviewed-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation

[PATCH v13 08/10] i2c: i2c-mux-gpmux: new driver

2017-04-13 Thread Peter Rosin
-by: Peter Rosin --- drivers/i2c/muxes/Kconfig | 13 +++ drivers/i2c/muxes/Makefile| 1 + drivers/i2c/muxes/i2c-mux-gpmux.c | 173 ++ 3 files changed, 187 insertions(+) create mode 100644 drivers/i2c/muxes/i2c-mux-gpmux.c diff --git a/drivers

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-18 Thread Peter Rosin
On 2017-04-18 10:51, Greg Kroah-Hartman wrote: > On Thu, Apr 13, 2017 at 06:43:07PM +0200, Peter Rosin wrote: >> +config MUX_GPIO >> +tristate "GPIO-controlled Multiplexer" >> +depends on OF && GPIOLIB > > Why have the gpio and mux core in the

Re: [PATCH v13 02/10] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-04-18 Thread Peter Rosin
On 2017-04-18 12:06, Philipp Zabel wrote: > On Thu, 2017-04-13 at 18:43 +0200, Peter Rosin wrote: >> Allow specifying that a single multiplexer controller can be used to >> control several parallel multiplexers, thus enabling sharing of the >> multiplexer controller b

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-18 Thread Peter Rosin
On 2017-04-18 13:44, Greg Kroah-Hartman wrote: > On Tue, Apr 18, 2017 at 12:59:50PM +0200, Peter Rosin wrote: >> On 2017-04-18 10:51, Greg Kroah-Hartman wrote: >>> On Thu, Apr 13, 2017 at 06:43:07PM +0200, Peter Rosin wrote: >>>> +config MUX_GPIO >>>>

Re: [PATCH v13 02/10] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-04-19 Thread Peter Rosin
On 2017-04-19 11:17, Philipp Zabel wrote: > On Tue, 2017-04-18 at 15:36 +0200, Peter Rosin wrote: >> If I got things wrong when I skimmed whatever I came across, and if the >> mmio register is the only mux control option in the stars, it becomes >> less obvious... It's o

Re: [PATCH v13 02/10] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-04-19 Thread Peter Rosin
On 2017-04-19 13:05, Philipp Zabel wrote: > On Wed, 2017-04-19 at 12:41 +0200, Peter Rosin wrote: >> On 2017-04-19 11:17, Philipp Zabel wrote: >>> On Tue, 2017-04-18 at 15:36 +0200, Peter Rosin wrote: >>>> If I got things wrong when I skimmed whatever I came across,

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-19 Thread Peter Rosin
On 2017-04-19 11:06, Philipp Zabel wrote: > On Thu, 2017-04-13 at 18:43 +0200, Peter Rosin wrote: >> Add a new minimalistic subsystem that handles multiplexer controllers. >> When multiplexers are used in various places in the kernel, and the >> same multiplexer controller ca

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-19 Thread Peter Rosin
On 2017-04-19 15:49, Philipp Zabel wrote: > On Wed, 2017-04-19 at 14:00 +0200, Peter Rosin wrote: > [...] >>>> +int mux_control_select(struct mux_control *mux, int state) >>> >>> If we let two of these race, ... >> >> The window for this "

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-20 Thread Peter Rosin
On 2017-04-18 23:53, Peter Rosin wrote: > On 2017-04-18 13:44, Greg Kroah-Hartman wrote: >> On Tue, Apr 18, 2017 at 12:59:50PM +0200, Peter Rosin wrote: >>> On 2017-04-18 10:51, Greg Kroah-Hartman wrote: >>>> On Thu, Apr 13, 2017 at 06:43:07PM +0200, Peter Rosin w

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-21 Thread Peter Rosin
On 2017-04-21 16:23, Philipp Zabel wrote: > On Thu, 2017-04-13 at 18:43 +0200, Peter Rosin wrote: > [...] >> +int mux_chip_register(struct mux_chip *mux_chip) >> +{ >> +int i; >> +int ret; >> + >> +for (i = 0; i < mux_chip->controllers

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-21 Thread Peter Rosin
On 2017-04-21 16:18, Philipp Zabel wrote: > Hi Peter, > > On Thu, 2017-04-13 at 18:43 +0200, Peter Rosin wrote: > [...] >> +int mux_control_select(struct mux_control *mux, int state) > > state could be unsigned int for the consumer facing API. > >

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-21 Thread Peter Rosin
On 2017-04-21 16:41, Philipp Zabel wrote: > On Fri, 2017-04-21 at 16:32 +0200, Peter Rosin wrote: >> On 2017-04-21 16:23, Philipp Zabel wrote: >>> On Thu, 2017-04-13 at 18:43 +0200, Peter Rosin wrote: >>> [...] >>>> +int mux_chip_register(struct mu

Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller

2017-04-21 Thread Peter Rosin
On 2017-04-20 23:53, Peter Rosin wrote: > On 2017-04-18 23:53, Peter Rosin wrote: >> On 2017-04-18 13:44, Greg Kroah-Hartman wrote: >>> On Tue, Apr 18, 2017 at 12:59:50PM +0200, Peter Rosin wrote: >>>> On 2017-04-18 10:51, Greg Kroah-Hartman wrote: >>>>

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

2017-04-24 Thread Peter Rosin
hannel. - implement idle-state for muxes - clear out the cache on failure in order to force a mux update on the following use - cleanup the probe of i2c-mux-simple driver - fix a bug in the i2c-mux-simple driver, where failure in the selection of the mux caused a deadlock when the mux was lat

[PATCH v14 02/11] dt-bindings: document devicetree bindings for mux-controllers and gpio-mux

2017-04-24 Thread Peter Rosin
Acked-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 + .../devicetree/bindings/mux/mux-controller.txt | 157 + MAINTAINERS| 6 + include/dt-bindings/mux/mux.h

[PATCH v14 01/11] devres: trivial whitespace fix

2017-04-24 Thread Peter Rosin
Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver

  1   2   3   4   >