[PATCH v3 0/7] mux controller abstraction and iio/i2c muxes

2016-11-21 Thread Peter Rosin
rs 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 not good enough to be a nice fit for al

[PATCH v3 4/7] dt-bindings: iio: iio-mux: document iio-mux bindings

2016-11-21 Thread Peter Rosin
Signed-off-by: Peter Rosin --- .../bindings/iio/multiplexer/iio-mux.txt | 47 ++ MAINTAINERS| 6 +++ 2 files changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt diff

[PATCH v3 5/7] iio: multiplexer: new iio category and iio-mux driver

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

[PATCH v3 7/7] i2c: i2c-mux-simple: new driver

2016-11-21 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. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/Kconfig | 13

[PATCH v3 1/7] dt-bindings: document devicetree bindings for mux-controllers and mux-gpio

2016-11-21 Thread Peter Rosin
Signed-off-by: Peter Rosin --- .../devicetree/bindings/misc/mux-controller.txt| 76 + .../devicetree/bindings/misc/mux-gpio.txt | 78 ++ MAINTAINERS| 5 ++ 3 files changed, 159 insertions(+) create

[PATCH v3 6/7] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings

2016-11-21 Thread Peter Rosin
Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-mux-simple.txt | 76 ++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-simple.txt diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-simple.txt b

[PATCH v5 0/2] drm/panel: simple: add support for Sharp LQ150X1LG11 panels

2016-11-21 Thread Peter Rosin
-rc6 v3 -> v4 changes: - addressed review comments from Rob (lvds -> sellvds and a couple of typos). Cheers, Peter Gustaf Lindström (1): drm/panel: simple: add support for Sharp LQ150X1LG11 panels Peter Rosin (1): dt-bindings: display: Add Sharp LQ150X1LG11 panel binding .../bindings

[PATCH v5 2/2] drm/panel: simple: add support for Sharp LQ150X1LG11 panels

2016-11-21 Thread Peter Rosin
From: Gustaf Lindström The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel. The simple-panel driver is used to get support for essential functionality of the panel. Signed-off-by: Gustaf Lindström Signed-off-by: Peter Rosin --- drivers/gpu/drm/panel/panel-simple.c

[PATCH v5 1/2] dt-bindings: display: Add Sharp LQ150X1LG11 panel binding

2016-11-21 Thread Peter Rosin
The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel. Signed-off-by: Peter Rosin --- .../bindings/display/panel/sharp,lq150x1lg11.txt | 36 ++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg1

Re: [RFC PATCH v2 3/7] iio: inkern: api for manipulating ext_info of iio channels

2016-11-21 Thread Peter Rosin
On 2016-11-21 16:45, Lars-Peter Clausen wrote: > On 11/19/2016 04:38 PM, Jonathan Cameron wrote: >> On 17/11/16 21:48, Peter Rosin wrote: >>> Extend the inkern api with functions for reading and writing ext_info >>> of iio channels. >> I'd like Lars' feed

Re: [RFC PATCH v2 2/7] misc: minimal mux subsystem and gpio-based mux controller

2016-11-21 Thread Peter Rosin
On 2016-11-19 16:34, Jonathan Cameron wrote: > On 17/11/16 21:48, Peter Rosin wrote: >> When both the iio subsystem and the i2c subsystem wants to update >> the same mux, there needs to be some coordination. Invent a new >> minimal "mux" subsystem that handles thi

[PATCH 1/3] power: supply: bq24735-charger: simplify register update to stop charging

2016-12-12 Thread Peter Rosin
Providing value bits outside of the mask is pointless. Signed-off-by: Peter Rosin --- drivers/power/supply/bq24735-charger.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/power/supply/bq24735-charger.c b/drivers/power/supply/bq24735-charger.c index eb7783b42e0a

[PATCH 2/3] power: supply: bq24735-charger: optionally poll the ac-detect gpio

2016-12-12 Thread Peter Rosin
If the ac-detect gpio does not support interrupts, provide a fallback to poll the gpio at a configurable interval. Signed-off-by: Peter Rosin --- .../bindings/power/supply/ti,bq24735.txt | 2 + drivers/power/supply/bq24735-charger.c | 50 +++--- 2 files

[PATCH 0/3] bq24735-charger: allow gpio polling and sharing

2016-12-12 Thread Peter Rosin
thing should be done to prevent unloading of the instance that shares its gpio? I thought about adding a device_link_add() call, but am unsure if that would be approprite? I'm not unloading drivers at all so it's a total non-issue for me... Cheers, Peter Peter Rosin (3): power: supply:

[PATCH 3/3] power: supply: bq24735-charger: allow chargers to share the ac-detect gpio

2016-12-12 Thread Peter Rosin
not allow sharing gpios, so handle that locally. However, only do this for the polling case, sharing is not supported if the ac detection is handled with interrupts. Signed-off-by: Peter Rosin --- drivers/power/supply/bq24735-charger.c | 101 + 1 file changed, 90

Re: [PATCH v6 4/9] dt-bindings: iio: iio-mux: document iio-mux bindings

2016-12-12 Thread Peter Rosin
On 2016-12-10 19:21, Jonathan Cameron wrote: > On 06/12/16 09:18, Peter Rosin wrote: >> On 2016-12-06 00:26, Rob Herring wrote: >>> On Wed, Nov 30, 2016 at 09:16:58AM +0100, Peter Rosin wrote: >>>> Signed-off-by: Peter Rosin >>>> --- >>>> .

Re: [PATCH 3/3] power: supply: bq24735-charger: allow chargers to share the ac-detect gpio

2016-12-12 Thread Peter Rosin
On 2016-12-12 12:00, Peter Rosin wrote: > If several parallel bq24735 chargers have their ac-detect gpios wired > together (or if only one of the parallel bq24735 chargers have its > ac-detect pin wired to a gpio, and the others are assumed to react the > same), then all driver insta

[PATCH] ARM: dts: at91: add envelope detector mux to the Axentia TSE-850

2017-03-17 Thread Peter Rosin
The envelope detector can analyze 6 different signals, selectable with a mux controlled by three gpio pins. Signed-off-by: Peter Rosin --- Hi! This patch makes use of the mux subsystem and a couple of drivers available in linux-next since a week or two. The stuff this depends on has relevant

Re: [PATCH] i2c/muxes/i2c-mux-ltc4306: LTC4306 and LTC4305 I2C multiplexer/switch

2017-03-24 Thread Peter Rosin
On 2017-03-23 15:22, michael.henner...@analog.com wrote: > From: Michael Hennerich > > This patch adds support for the Analog Devices / Linear Technology > LTC4306 and LTC4305 4/2 Channel I2C Bus Multiplexer/Switches. > The LTC4306 optionally provides two general purpose input/output pins > (GPIO

Re: [PATCH] i2c: mux: pca954x: Add missing pca9546 definition to chip_desc

2017-03-24 Thread Peter Rosin
On 2017-03-23 10:00, Mike Looijmans wrote: > The spec for the pca9546 was missing. This chip is the same as the pca9545 > except that it lacks interrupt lines. While the i2c_device_id table mapped > the pca9546 to the pca9545 definition the compatible table did not. Ouch, good catch, I have commit

[PULL REQUEST] mux for 4.12

2017-03-27 Thread Peter Rosin
0) are available in the git repository at: https://gitlab.com/peda-linux/mux.git togreg for you to fetch changes up to 9920ed1461bbe072a815c352f016cd08c756fba3: mux: core: fix error handling in devm_mux_chip_alloc (2017-03-15 23:14:48 +0100) -----

Re: [PULL REQUEST] mux for 4.12

2017-03-27 Thread Peter Rosin
On 2017-03-27 11:49, Greg Kroah-Hartman wrote: > On Mon, Mar 27, 2017 at 10:30:44AM +0200, Peter Rosin wrote: >> Hi Greg, >> >> Today seemed like a good day to send you the pull request for the new mux >> controller subsystem. I hope the details are ok. If not, let

[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 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 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 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 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 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 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 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 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 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 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 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

[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

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 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 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 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 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

[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 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 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 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 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 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

Re: [PATCH] mux: core: fix error handling in devm_mux_chip_alloc

2017-03-15 Thread Peter Rosin
On 2017-03-14 19:16, Dan Carpenter wrote: > Looks good! Thanks, now pushed out to the for-next branch of https://gitlab.com/peda-linux/mux.git Cheers, peda

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

Re: [PATCH 12/19] i2c: mux: pca954x: make use of raw_spinlock variants

2017-03-16 Thread Peter Rosin
On 2017-03-09 17:21, Julia Cartwright wrote: > The pca954x i2c mux driver currently implements an irq_chip for handling > interrupts; due to how irq_chip handling is done, it's necessary for the > irq_chip methods to be invoked from hardirq context, even on a a > real-time kernel. Because the spin

Re: [PATCH] iio: multiplexer: fix unsigned check with less than zero

2017-03-08 Thread Peter Rosin
On 2017-03-07 16:06, Colin King wrote: > From: Colin Ian King > > Comparing a size_t with less than zero is always false as size_t > is unsigned. The intent of the comparison was to check if the size > was -1 (that is, undefined), so use that instead. > > Detected by CoverityScan, CID#1415278 ("

Re: [PATCH] mux-core: make it explicitly non-modular

2017-03-08 Thread Peter Rosin
n that happens to be exported from a module triggers its loading and that failure to load the module leads to an oops. But I don't know if that is even remotely correct? Is it? Is there a short answer? Or what should I read for a longer one? Anyway, I'll add this to the queue, and fold it if

[PATCH v2] iio: multiplexer: fix unsigned check with less than zero

2017-03-08 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(-) Hi! Here's what intend to queue up. Cheers, peda diff --git a/drivers/iio/multip

Re: [PATCH] mux-core: make it explicitly non-modular

2017-03-08 Thread Peter Rosin
On 2017-03-08 15:38, Paul Gortmaker wrote: > [Re: [PATCH] mux-core: make it explicitly non-modular] On 08/03/2017 (Wed > 10:38) Peter Rosin wrote: > >> On 2017-03-07 23:41, Paul Gortmaker wrote: >>> The Kconfig currently controlling compilation of this code

Re: [PATCH] mux-core: make it explicitly non-modular

2017-03-09 Thread Peter Rosin
On 2017-03-09 01:32, Paul Gortmaker wrote: *snip* *snip* > If the mux subsystem isn't board specific (and at a glance, it seems > like it is not) then it might be the former and not the latter. But I > leave that call up to you The mux subsystem may be needed for some boards and not for others,

Re: [PATCH] mux-core: make it explicitly non-modular

2017-03-09 Thread Peter Rosin
On 2017-03-09 10:39, Peter Rosin wrote: *snip* *snip* >> Per the above use case (minimal vmlinux) the unload isn't so important, >> and in many cases it may be racy or simply not make sense. If that is >> the case, you don't need to provide a module_exit, and in th

[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 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 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 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 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 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 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 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 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] mux: checking for IS_ERR() instead of NULL or vice versa

2017-03-14 Thread Peter Rosin
On 2017-03-14 08:56, Dan Carpenter wrote: > This error handling is mixed up. mux_chip_alloc() doesn't return error > pointers but devm_mux_chip_alloc() does. > > Fixes: 4f5078327db1 ("mux: minimal mux subsystem and gpio-based mux > controller") > Signed-off-by: Dan Carpenter Eeek, thanks for p

[PATCH] mux: core: fix error handling in devm_mux_chip_alloc

2017-03-14 Thread Peter Rosin
ng to documentation. Fixes: a11c524a6b90 ("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

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

Re: [GIT PULL] overlayfs fixes for 4.9-rc3

2016-11-05 Thread Peter Rosin
> And the thing is, backward incompatibility is less of an issue for > overlayfs than for normal filesystems, because it's usually not > something people store their root filesystems on, and if so they can > simply not turn off this feature. That got my attention. What backwards incompatible thing

Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to provide _available attributes

2016-11-07 Thread Peter Rosin
On 2016-11-07 12:37, Daniel Baluta wrote: > On Mon, Oct 24, 2016 at 1:39 AM, Peter Rosin wrote: >> From: Jonathan Cameron >> >> A large number of attributes can only take a limited range of values. >> Currently in IIO this is handled by directly registering additiona

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: [PULL] IIO fixes for 4.10 set 3 - a couple of regression fixes.

2017-02-10 Thread Peter Rosin
> On Sun, Feb 05, 2017 at 10:35:02AM +, Jonathan Cameron wrote: >> The following changes since commit 5c113b5e0082e90d2e1c7b12e96a7b8cf0623e27: >> >> iio: dht11: Use usleep_range instead of msleep for start signal >> (2017-01-22 13:35:40 +) >> >> are available in the git repository at:

Re: [PULL] IIO fixes for 4.10 set 3 - a couple of regression fixes.

2017-02-14 Thread Peter Rosin
On 2017-02-11 10:16, Jonathan Cameron wrote: > On 11/02/17 07:17, Greg Kroah-Hartman wrote: >> On Fri, Feb 10, 2017 at 11:35:35PM +0100, Peter Rosin wrote: >>>> On Sun, Feb 05, 2017 at 10:35:02AM +, Jonathan Cameron wrote: >>>>>

[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 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 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 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 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 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 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 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

[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

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

Re: [PATCH v2 2/4] iio: potentiometer: mcp4531: Add device tree binding documentation

2016-06-26 Thread Peter Rosin
On 2016-06-26 22:22, Florian Vaussard wrote: > Add the device tree documentation for all the supported parts. Apart the > compatible string and standard I2C binding, no other binding is currently > needed. > > Signed-off-by: Florian Vaussard > --- > .../devicetree/bindings/i2c/trivial-devices.tx

Re: [PATCH v2 3/4] iio: potentiometer: mcp4531: Add device tree binding

2016-06-26 Thread Peter Rosin
Hi Florian, On 2016-06-26 22:22, Florian Vaussard wrote: > This patch adds the necessary device tree binding to allow DT probing of > currently supported parts. > > Signed-off-by: Florian Vaussard > --- > drivers/iio/potentiometer/mcp4531.c | 273 > +++- > 1 fil

[PATCH] dt-bindings: i2c: add bindings for nxp,pca9541

2016-06-27 Thread Peter Rosin
Fill the gap for this pre-existing driver. Signed-off-by: Peter Rosin --- .../devicetree/bindings/i2c/i2c-arb-pca9541.txt| 33 ++ MAINTAINERS| 1 + 2 files changed, 34 insertions(+) create mode 100644 Documentation/devicetree

Re: [PATCH] dt-bindings: i2c: add bindings for nxp,pca9541

2016-06-27 Thread Peter Rosin
On 2016-06-27 15:17, Guenter Roeck wrote: > On 06/27/2016 03:11 AM, Peter Rosin wrote: >> Fill the gap for this pre-existing driver. >> >> Signed-off-by: Peter Rosin >> --- >> .../devicetree/bindings/i2c/i2c-arb-pca9541.txt| 33 >>

Re: [PATCH v4 3/4] ASoC: dapm: support mixer controls with mute at non-zero value

2016-06-28 Thread Peter Rosin
Hi! Sorry to send a ping like this, with the patch still in patchwork and all. But it's been a month since 1/4 and 2/4 were committed and I expected at least some comment on the approach for patches 3 and 4... Cheers, Peter On 2016-05-14 23:09, Peter Rosin wrote: > The max9860 codec has

Re: [PATCH v3 3/4] iio: potentiometer: mcp4531: Add device tree binding

2016-06-30 Thread Peter Rosin
On June 30, 2016 9:34:50 AM GMT+02:00, Florian Vaussard wrote: >This patch adds the necessary device tree binding to allow DT probing >of >currently supported parts. > >Signed-off-by: Florian Vaussard Acked-by: Peter Rosin Cheers, Peter

[PATCH] MAINTAINERS: add myself as i2c mux maintainer

2016-03-14 Thread Peter Rosin
From: Peter Rosin Signed-off-by: Peter Rosin --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f5e6a535bc34..929e91b011cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5202,6 +5202,16 @@ F: include/linux/hyperv.h F

[PATCH v4 00/18] i2c mux cleanup and locking update

2016-03-03 Thread Peter Rosin
From: Peter Rosin Hi! I have a pair of boards with this i2c topology: GPIO ---| -- BAT1 | v / I2C -+--B---+ MUX | \ EEPROM -- BAT2 (B denotes the

[PATCH v4 04/18] i2c: i2c-arb-gpio-challenge: convert to use an explicit i2c mux core

2016-03-03 Thread Peter Rosin
From: Peter Rosin Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select/deselect ops to be in terms of the i2c mux core instead of the child adapter. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 47

[PATCH v4 01/18] i2c-mux: add common data for every i2c-mux instance

2016-03-03 Thread Peter Rosin
From: Peter Rosin All i2c-muxes have a parent adapter and one or many child adapters. A mux also has some means of selection. Previously, this was stored per child adapter, but it is only needed to keep track of this per mux. Add an i2c mux core, that keeps track of this consistently. Also add

<    9   10   11   12   13   14   15   16   17   18   >