Re: [PATCH 0/3] USB Mux support for Chipidea

2017-07-15 Thread Peter Rosin
On 2017-07-14 23:27, Stephen Boyd wrote: > Quoting Stephen Boyd (2017-07-13 15:35:02) >> Quoting Peter Rosin (2017-07-11 22:04:46) >>> >>> Maybe no need for a compatible update either, if it works to do something >>> like this in the DT? &g

Re: [PATCH] drivers: i2c: muxes: Kconfig

2017-07-14 Thread Peter Rosin
On 2017-07-12 19:31, Chris Gorman wrote: > Kconfig says the resulting module is pinctrl-i2cmux and the module when > built is i2c-mux-pinctrl. > > Signed-off-by: Chris Gorman Yes, thanks! I took the liberty of changing the Subject to "i2c: mux: pinctrl: mention the

[PATCH v2] mux: mux-core: unregister mux_class in mux_exit()

2017-07-10 Thread Peter Rosin
From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppusw...@linux.intel.com> Fixes an obvious and nasty typo. Fixes: a3b02a9c6591 ("mux: minimal mux subsystem") Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppusw...@linux.intel.com> Signed-off-by: Peter

Re: [PATCH v1 1/1] mux: consumer: Add dummy functions for !CONFIG_MULTIPLEXER case

2017-07-09 Thread Peter Rosin
On 2017-07-09 01:04, Kuppuswamy, Sathyanarayanan wrote: > Hi Peter, > > On 7/8/2017 1:55 PM, Peter Rosin wrote: >> On 2017-07-07 23:41, sathyanarayanan.kuppusw...@linux.intel.com wrote: >>> From: Kuppuswamy Sathyanarayanan >>> <sathyanarayanan.kuppusw..

Re: [PATCH v2 1/1] mux: consumer: Add dummy functions for !CONFIG_MULTIPLEXER case

2017-07-09 Thread Peter Rosin
On 2017-07-08 23:22, Andy Shevchenko wrote: > On Sat, Jul 8, 2017 at 9:12 PM, > wrote: >> From: Kuppuswamy Sathyanarayanan >> >> Add dummy functions to avoid compile time issues when CONFIG_MULTIPLEXER >> is

Re: [PATCH v2 1/1] mux: mux-core: Add NULL check for dev->of_node

2017-07-09 Thread Peter Rosin
On 2017-07-09 01:12, Kuppuswamy, Sathyanarayanan wrote: > Hi Peter, > > > On 7/8/2017 2:00 PM, Peter Rosin wrote: >> On 2017-07-07 23:46, sathyanarayanan.kuppusw...@linux.intel.com wrote: >>> From: Kuppuswamy Sathyanarayanan >>> <sathyanarayanan.kup

Re: [PATCH v2 1/3] mux: Add mux_control_get_optional() API

2017-07-19 Thread Peter Rosin
On 2017-07-19 04:08, Stephen Boyd wrote: > Quoting Peter Rosin (2017-07-17 01:20:14) >> On 2017-07-14 23:40, Stephen Boyd wrote: >>> diff --git a/drivers/mux/mux-core.c b/drivers/mux/mux-core.c >>> index 90b8995f07cb..a0e5bf16f02f 100644 >>> --- a/drivers/mux/

Re: [PATCH] drm: atmel-hlcdc: use a default gamma ramp if none is specified

2017-07-03 Thread Peter Rosin
On 2017-07-03 14:02, Boris Brezillon wrote: > On Mon, 3 Jul 2017 13:53:28 +0200 > Peter Rosin <p...@axentia.se> wrote: > >> On 2017-07-03 13:31, Boris Brezillon wrote: >>> On Mon, 3 Jul 2017 11:42:10 +0200 >>> Peter Rosin <p...@axentia.se> wrote: >

[PATCH v2] mux: remove the Kconfig question for the subsystem

2017-07-04 Thread Peter Rosin
The MULTIPLEXER question in the Kconfig might be confusing and is of dubious value. Remove it. This makes consumers responsible for selecting MULTIPLEXER, which they already do. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/mux/Kconfig | 19 +-- 1 file chan

[PATCH] mux: remove the Kconfig question for the subsystem

2017-07-03 Thread Peter Rosin
The MULTIPLEXER question in the Kconfig might be confusing and is of dubious value. Remove it. This makes consumers responsible for selecting MULTIPLEXER, which they already do. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/mux/Kconfig | 15 +++ 1 file chan

[PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-04 Thread Peter Rosin
This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get completely obsolete. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/drm_fb_helper.c | 165 +++- 1 file changed, 94 insertions(+), 71 deletions(-) diff --git a/d

[PATCH v3 00/16] improve the fb_setcmap helper

2017-07-04 Thread Peter Rosin
eudo-palette for FB_VISUAL_TRUECOLOR. - Add a comment about colliding bitfields in the nouveau driver. - Remove gamma_set/gamma_get declarations from the radeon driver (the definitions were removed in v1). Cheers, peda Peter Rosin (16): drm/fb-helper: factor out pseudo-palette drm/fb-

[PATCH v3 03/16] drm/fb-helper: remove drm_fb_helper_save_lut_atomic

2017-07-04 Thread Peter Rosin
drm_fb_helper_save_lut_atomic is redundant since the .gamma_store is now always kept up to date by drm_fb_helper_setcmap. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/drm_fb_helper.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/g

Re: [PATCH v3 01/16] drm/fb-helper: factor out pseudo-palette

2017-07-04 Thread Peter Rosin
On 2017-07-04 12:36, Peter Rosin wrote: > The pseudo-palette has nothing to do with the crtc, so move it > out of the crtc loop and update the palette once, then break out > early. > > Signed-off-by: Peter Rosin <p...@axenita.se> Should of course be p...@axentia.se I

[PATCH v3 09/16] drm: cirrus: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/

[PATCH v3 13/16] drm: nouveau: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/nouveau/di

[PATCH v3 11/16] drm: i915: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
. Since the fb helpers .gamma_set and .gamma_get are obsolete, remove the dead code. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_fbdev.c | 31 --- 2 files changed, 32 deletions(-) diff

[PATCH v3 14/16] drm: radeon: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/

[PATCH v3 16/16] drm: remove unused and redundant callbacks

2017-07-04 Thread Peter Rosin
Drivers no longer have any need for these callbacks, and there are no users. Zap. Zap-zap-zzzap-p-pp-p. Signed-off-by: Peter Rosin <p...@axentia.se> --- include/drm/drm_crtc.h | 8 include/drm/drm_fb_helper.h | 32 i

[PATCH v3 10/16] drm: gma500: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helpers .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/gma500/framebu

[PATCH v3 08/16] drm: ast: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/ast/ast

[PATCH v3 12/16] drm: mgag200: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/m

[PATCH v3 15/16] drm: stm: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helper .load_lut is no longer used, and can not work right without also providing the fb helpers .gamma_set and .gamma_get thus rendering the code in this driver suspect. Just remove the dead code. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/stm/ltdc.

[PATCH v3 04/16] drm/color-mgmt: move atomic state/commit out from .gamma_set

2017-07-04 Thread Peter Rosin
Handle the atomics directly in the ioctl instead, in preparation for the fb_setcmap helper needing to commit the gamma map for several crtc in one commit. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v

[PATCH v3 06/16] drm: amd: remove dead code and pointless local lut storage

2017-07-04 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/amd/

[PATCH v3 02/16] drm/fb-helper: keep the .gamma_store updated in drm_fb_helper_setcmap

2017-07-04 Thread Peter Rosin
I think the gamma_store can end up invalid on error. But the way I read it, that can happen in drm_mode_gamma_set_ioctl as well, so why should this pesky legacy fbdev stuff be any better? Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/drm_fb_helper.c | 19

[PATCH v3 07/16] drm: armada: remove dead empty functions

2017-07-04 Thread Peter Rosin
The redundant fb helpers .gamma_set and .gamma_get are no longer used. Remove the dead code. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/armada/armada_crtc.c | 10 -- drivers/gpu/drm/armada/armada_crtc.h | 2 -- drivers/gpu/drm/armada/armada_fbdev.c | 2

[PATCH v3 01/16] drm/fb-helper: factor out pseudo-palette

2017-07-04 Thread Peter Rosin
The pseudo-palette has nothing to do with the crtc, so move it out of the crtc loop and update the palette once, then break out early. Signed-off-by: Peter Rosin <p...@axenita.se> --- drivers/gpu/drm/drm_fb_helper.c | 60 + 1 file changed, 37 inse

[PATCH] drm: atmel-hlcdc: use a default gamma ramp if none is specified

2017-07-03 Thread Peter Rosin
At init and if the gamma_lut property is ever removed, the clut registers must be programmed with a default gamma ramp instead of being left in some unknown state. Fixes: 364a7bf574eb ("drm: atmel-hlcdc: add support for 8-bit color lookup table mode") Signed-off-by: Peter Rosin <p.

Re: [PATCH] drm: atmel-hlcdc: use a default gamma ramp if none is specified

2017-07-03 Thread Peter Rosin
On 2017-07-03 13:31, Boris Brezillon wrote: > On Mon, 3 Jul 2017 11:42:10 +0200 > Peter Rosin <p...@axentia.se> wrote: > >> At init and if the gamma_lut property is ever removed, the clut >> registers must be programmed with a default gamma ramp instead of >>

Re: [Intel-gfx] [PATCH v3 00/16] improve the fb_setcmap helper

2017-07-05 Thread Peter Rosin
On 2017-07-05 08:08, Daniel Vetter wrote: > On Tue, Jul 04, 2017 at 12:36:56PM +0200, Peter Rosin wrote: >> Hi! >> >> While trying to get CLUT support for the atmel_hlcdc driver, and >> specifically for the emulated fbdev interface, I received some >> push-back

Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-06 Thread Peter Rosin
On 2017-07-06 07:55, Daniel Vetter wrote: > On Wed, Jul 5, 2017 at 7:50 PM, Peter Rosin <p...@axentia.se> wrote: >>>> +retry: >>>> +ret = drm_modeset_lock_all_ctx(dev, ); >>> >>> With atomic you don't need to grab locks, this is done beh

[PATCH v4 08/14] drm: gma500: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helpers .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/gma500/framebu

[PATCH v4 07/14] drm: cirrus: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/

[PATCH v4 10/14] drm: mgag200: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/m

[PATCH v4 14/14] drm: remove unused and redundant callbacks

2017-07-06 Thread Peter Rosin
Drivers no longer have any need for these callbacks, and there are no users. Zap. Zap-zap-zzzap-p-pp-p. Signed-off-by: Peter Rosin <p...@axentia.se> --- include/drm/drm_crtc.h | 8 include/drm/drm_fb_helper.h | 32 i

[PATCH v4 12/14] drm: radeon: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/

[PATCH v4 13/14] drm: stm: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helper .load_lut is no longer used, and can not work right without also providing the fb helpers .gamma_set and .gamma_get thus rendering the code in this driver suspect. Just remove the dead code. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/stm/ltdc.

[PATCH v4 03/14] drm/fb-helper: separate the fb_setcmap helper into atomic and legacy paths

2017-07-06 Thread Peter Rosin
and subject for removal. - atomic drivers that support clut modes get fbdev support for those from the drm core. This includes atmel-hlcdc, but perhaps others as well? Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/drm_fb_helper.c

[PATCH v4 04/14] drm: amd: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/amd/

[PATCH v4 00/14] improve the fb_setcmap helper

2017-07-06 Thread Peter Rosin
ISUAL_TRUECOLOR. - Add a comment about colliding bitfields in the nouveau driver. - Remove gamma_set/gamma_get declarations from the radeon driver (the definitions were removed in v1). Cheers, peda Peter Rosin (14): drm/atomic: export drm_atomic_replace_property_blob drm/atomic-helper: upd

[PATCH v4 06/14] drm: ast: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/ast/ast

[PATCH v4 11/14] drm: nouveau: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/nouveau/di

[PATCH v4 01/14] drm/atomic: export drm_atomic_replace_property_blob

2017-07-06 Thread Peter Rosin
While at it, add some words in the kernel-doc about the 'replaced' arg and remove a faulty kernel-doc comment on the return value. Also remove a redundant return statement. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/drm_atomic.c | 17 + inclu

[PATCH v4 02/14] drm/atomic-helper: update lut props directly in ..._legacy_gamma_set

2017-07-06 Thread Peter Rosin
Do not waste cycles looking up the property id when we have the actual property already. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/drm_atomic_helper.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/g

[PATCH v4 05/14] drm: armada: remove dead empty functions

2017-07-06 Thread Peter Rosin
The redundant fb helpers .gamma_set and .gamma_get are no longer used. Remove the dead code. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/armada/armada_crtc.c | 10 -- drivers/gpu/drm/armada/armada_crtc.h | 2 -- drivers/gpu/drm/armada/armada_fbdev.c | 2

[PATCH v4 09/14] drm: i915: remove dead code and pointless local lut storage

2017-07-06 Thread Peter Rosin
. Since the fb helpers .gamma_set and .gamma_get are obsolete, remove the dead code. Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_fbdev.c | 31 --- 2 files changed, 32 deletions(-) diff

Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-05 Thread Peter Rosin
On 2017-07-05 08:21, Daniel Vetter wrote: > On Tue, Jul 04, 2017 at 12:37:01PM +0200, Peter Rosin wrote: >> This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get >> completely obsolete. >> >> Signed-off-by: Peter Rosin <p...@axentia.se> >>

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Peter Rosin
On 2017-07-07 00:08, Gustavo A. R. Silva wrote: > Check return value from call to devm_kzalloc() > in order to prevent a NULL pointer dereference. Right, thanks for finding that one! There's another one inside the for loop that is just starting in the context of this patch. Care to fix checking

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value

2017-07-06 Thread Peter Rosin
On 2017-07-07 06:35, Gustavo A. R. Silva wrote: > Hi Peter, > > Quoting Peter Rosin <p...@axentia.se>: > >> On 2017-07-07 00:08, Gustavo A. R. Silva wrote: >>> Check return value from call to devm_kzalloc() >>> in order to prevent a NULL pointer de

Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values

2017-07-06 Thread Peter Rosin
ing semantic patch: > > @@ > expression x; > identifier fld; > @@ > > * x = devm_kzalloc(...); >... when != x == NULL >x->fld > > Cc: Peter Rosin <p...@axentia.se> > Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> Either way, Reviewed-by: Peter Rosin <p...@axentia.se> Thanks!

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

Re: [PATCH] iio: inkern: fix a static checker error

2017-04-25 Thread Peter Rosin
On 2017-04-25 18:01, Lars-Peter Clausen wrote: > On 04/24/2017 11:32 AM, Peter Rosin wrote: >> On 2017-04-20 23:13, Peter Rosin wrote: >>> On 2017-04-20 23:12, Lars-Peter Clausen wrote: >>>> On 04/20/2017 11:01 PM, Peter Rosin wrote: >>>>> Avoid this

[PATCH v2] iio: inkern: fix endless loop in error path

2017-04-24 Thread Peter Rosin
add helpers to query available values from channels") Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/iio/inkern.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) v1 -> v2 changes: - Be clear about that there is a real nasty issue and that it isn't only about av

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

2017-04-24 Thread Peter Rosin
<ji...@kernel.org> Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- Documentation/devicetree/bindings/mux/gpio-mux.txt | 69 + .../devicetree/bindings/mux/mux-controller.txt | 157

[PATCH v14 05/11] iio: inkern: api for manipulating ext_info of iio channels

2017-04-24 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron <ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/iio/inkern.c | 60 include/linux/iio/con

[PATCH v14 03/11] mux: minimal mux subsystem

2017-04-24 Thread Peter Rosin
Cameron, Rob Herring, Wolfram Sang, Paul Gortmaker, Dan Carpenter, Colin Ian King, Greg Kroah-Hartman and last but certainly not least to Philipp Zabel for helpful comments, reviews, patches and general encouragement! Reviewed-by: Jonathan Cameron <ji...@kernel.org> Signed-off-by: Peter Ro

[PATCH v14 04/11] mux: gpio: add mux controller driver for gpio based multiplexers

2017-04-24 Thread Peter Rosin
;ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/mux/Kconfig| 18 drivers/mux/Makefile | 1 + drivers/mux/mux-gpio.c | 114 + 3 files changed, 133 insertions(+) create mode 100644 drivers/mux/mux-

Re: [PATCH v2] iio: inkern: fix endless loop in error path

2017-04-24 Thread Peter Rosin
accurate, since it really mostly is about a static checker issue. So, please ignore this update and pick the original patch instead. I.e. https://lkml.org/lkml/2017/4/20/887 Sorry for the noise. Cheers, peda On 2017-04-24 10:57, Peter Rosin wrote: > If ret ends up negative, mutex_unl

[PATCH v14 07/11] iio: multiplexer: new iio category and iio-mux driver

2017-04-24 Thread Peter Rosin
, creating a private copy of the ext_info attributes for each multiplexer state/channel. Reviewed-by: Jonathan Cameron <ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- MAINTAINERS | 1 + drivers/iio/Kconfig | 1 + drivers/

[PATCH v14 09/11] i2c: i2c-mux-gpmux: new driver

2017-04-24 Thread Peter Rosin
olfram Sang <w...@the-dreams.de> Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/i2c/muxes/Kconfig | 13 +++ drivers/i2c/muxes/Makefile| 1 + drivers/i2c/muxes/i2c-mux-gpmux.c | 173 ++ 3 files changed, 187 insertions(+)

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

2017-04-24 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron <ji...@kernel.org> Reviewed-by: Rob Herring <r...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- .../devicetree/bindings/mux/adi,adg792a.txt| 75 ++ 1 file chan

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

2017-04-24 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron <ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/mux-adg

[PATCH v14 08/11] dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings

2017-04-24 Thread Peter Rosin
Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron <ji...@kernel.org> Reviewed-by: Rob Herring <r...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- .../devicetree/bindings/i2c/i2c-mux-g

[PATCH v14 06/11] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-04-24 Thread Peter Rosin
Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron <ji...@kernel.org> Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- .../bindings/iio/multiplexer/io-chann

[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 <ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/

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

2017-04-24 Thread Peter Rosin
se - 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 later unconditionally deselected. v1: https://lkml.org/lkml/2016/11/16/812 Cheers, peda Peter Rosin (11): devres: trivial

Re: [PATCH] iio: inkern: fix a static checker error

2017-04-24 Thread Peter Rosin
On 2017-04-20 23:13, Peter Rosin wrote: > On 2017-04-20 23:12, Lars-Peter Clausen wrote: >> On 04/20/2017 11:01 PM, Peter Rosin wrote: >>> Avoid this smatch error: >>> drivers/iio/inkern.c:751 iio_read_avail_channel_raw() error: double unlock >>> 'mutex:>

Re: [RFC v2 2/2] mux: mmio-based syscon mux controller

2017-04-24 Thread Peter Rosin
On 2017-04-24 18:12, Philipp Zabel wrote: > This adds a driver for mmio-based syscon multiplexers controlled by a > single bitfield in a syscon register range. Single bitfield? > > Signed-off-by: Philipp Zabel > --- > Changes since v1: > - Renamed MUX_SYSCON to

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

Re: [RFC v2 1/2] dt-bindings: add mmio-based syscon mux controller DT bindings

2017-04-24 Thread Peter Rosin
On 2017-04-24 18:12, Philipp Zabel wrote: > This adds device tree binding documentation for mmio-based syscon > multiplexers controlled by a single bitfield in a syscon register > range. Single bitfield? > > Signed-off-by: Philipp Zabel > --- > Changes since v1: > -

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 sinc

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

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 c

Re: [RFC 2/5] i3c: Add core I3C infrastructure

2017-07-31 Thread Peter Rosin
On 2017-07-31 23:15, Boris Brezillon wrote: > [1]https://www.mipi.org/MIPI_I3C_device_characteristics_register Stupid non-programmers... This part 65 41 0101 Accelerometer 66 42 0110 Gyroscope 67 43 0111 Magnetometer 68 44 01000100 Accel/Gyro Combo 69 45 01000101 Accel/Mag

Re: [PATCH v2 2/3] usb: chipidea: Hook into mux framework to toggle usb switch

2017-08-08 Thread Peter Rosin
On 2017-08-08 03:51, Stephen Boyd wrote: > Quoting Peter Rosin (2017-07-31 03:33:22) >> On 2017-07-14 23:40, Stephen Boyd wrote: >>> @@ -1964,16 +1965,26 @@ void ci_hdrc_gadget_destroy(struct ci_hdrc *ci) >>> >>> static int udc_id_switch_for_device(struct c

Re: [RESEND PATCH] staging: vboxvideo: remove dead gamma lut code

2017-08-08 Thread Peter Rosin
On 2017-08-07 11:21, Daniel Vetter wrote: > On Fri, Aug 04, 2017 at 12:45:06PM +0200, Peter Rosin wrote: >> The redundant fb helpers .load_lut, .gamma_set and .gamma_get are >> no longer used. Remove the dead code that was not doing anything >> sensible anyway. >> >&

Re: [PATCH 3/3] [media] cx231xx: only unregister successfully registered i2c adapters

2017-08-09 Thread Peter Rosin
On 2017-08-09 16:27, Mauro Carvalho Chehab wrote: > Em Mon, 31 Jul 2017 15:38:52 +0200 > Peter Rosin <p...@axentia.se> escreveu: > >> This prevents potentially scary debug messages from the i2c core. >> >> Signed-off-by: Peter Rosin <p...@axentia.se> >&

Re: [PATCH v3 0/5] iio: srf08: add support for similar devices and triggered buffers

2017-08-16 Thread Peter Rosin
On 2017-08-16 21:32, Andreas Klinger wrote: > This patch series adds support for: > - triggered buffer > - ultrasonic devices srf02 and srf10 > > Thanks for the review of Peter and Wolfram. > > @Wolfram: please let me know, if you want a separate patch for [PATCH 1/5] I think what you should do

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

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Allow specifying that a single multiplexer controller can be used to control several parallel multiplexers, thus enabling sharing of the multiplexer controller by different consumers. Add a binding for a first mux controller in the form of a GPIO bas

[PATCH v15 07/13] iio: multiplexer: new iio category and iio-mux driver

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> When a multiplexer changes how an iio device behaves (for example by feeding different signals to an ADC), this driver can be used to create one virtual iio channel for each multiplexer state. Depends on the generic multiplexer subsystem. Cache any ex

[PATCH v15 13/13] mux: mmio-based syscon mux controller

2017-05-14 Thread Peter Rosin
From: Philipp Zabel <p.za...@pengutronix.de> This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/mu

[PATCH v15 09/13] i2c: i2c-mux-gpmux: new driver

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> This is a general purpose i2c mux that uses a multiplexer controlled by the 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 C

[PATCH v15 05/13] iio: inkern: api for manipulating ext_info of iio channels

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Extend the inkern api with functions for reading and writing ext_info of iio channels. Acked-by: Jonathan Cameron <ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/iio/ink

[PATCH v15 08/13] dt-bindings: i2c: i2c-mux: document general purpose i2c-mux bindings

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Describe how a general purpose multiplexer controller is used to mux an i2c bus. Acked-by: Jonathan Cameron <ji...@kernel.org> Reviewed-by: Rob Herring <r...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- .../devicet

[PATCH v15 12/13] dt-bindings: add mmio-based syscon mux controller DT bindings

2017-05-14 Thread Peter Rosin
From: Philipp Zabel <p.za...@pengutronix.de> This adds device tree binding documentation for mmio-based syscon multiplexers controlled by a bitfields in a syscon register range. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Acked-by: Rob Herring <r...@kernel.org> Si

[PATCH v15 00/13] mux controller abstraction and iio/i2c muxes

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Hi Greg, Philipp found problems in v14 with using a mutex for locking that was the outcome of the review for v13, so I'm now using a semaphore instead of the rwsem that was in v13. That at least got rid of the scary call to downgrade_write. However, I'm

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

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Analog Devices ADG792A/G is a triple 4:1 mux. Acked-by: Jonathan Cameron <ji...@kernel.org> Reviewed-by: Rob Herring <r...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- .../devicetree/bindings/mux/adi

[PATCH v15 01/13] devres: trivial whitespace fix

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Everything else is indented with two spaces, so fix the odd one out. Acked-by: Jonathan Cameron <ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- Documentation/driver-model/devres.txt | 2 +- 1 file changed, 1 insert

[PATCH v15 03/13] mux: minimal mux subsystem

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> 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 to implement s

[PATCH v15 04/13] mux: gpio: add mux controller driver for gpio based multiplexers

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> The driver builds a single multiplexer controller using a number of gpio pins. For N pins, there will be 2^N possible multiplexer states. The GPIO pins can be connected (by the hardware) to several multiplexers, which in that case will be operated in pa

[PATCH v15 11/13] mux: adg792a: add mux controller driver for ADG792A/G

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Analog Devices ADG792A/G is a triple 4:1 mux. Reviewed-by: Jonathan Cameron <ji...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/mux/Kconfig | 12 drivers/mux/Makefile | 1 + drivers/mux/m

[PATCH v15 06/13] dt-bindings: iio: io-channel-mux: document io-channel-mux bindings

2017-05-14 Thread Peter Rosin
From: Peter Rosin <p...@axentia.se> Describe how a multiplexer can be used to select which signal is fed to an io-channel. Acked-by: Jonathan Cameron <ji...@kernel.org> Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Peter Rosin <p...@axentia.se> --- .../bin

[PATCH] i2c: mux: only print failure message on error

2017-05-14 Thread Peter Rosin
As is, a failure message is printed unconditionally, which is confusing. And noisy. Fixes: 8d4d159f25a7 ("i2c: mux: provide more info on failure in i2c_mux_add_adapter") Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/i2c/i2c-mux.c | 24 ++-- 1

[PATCH v2] i2c: mux: only print failure message on error

2017-05-15 Thread Peter Rosin
As is, a failure message is printed unconditionally, which is confusing. And noisy. Fixes: 8d4d159f25a7 ("i2c: mux: provide more info on failure in i2c_mux_add_adapter") Signed-off-by: Peter Rosin <p...@axentia.se> --- drivers/i2c/i2c-mux.c | 26 -- 1

Re: [PATCH] i2c: mux: only print failure message on error

2017-05-15 Thread Peter Rosin
On 2017-05-15 06:53, Leon Romanovsky wrote: > On Sun, May 14, 2017 at 06:41:13PM +0200, Peter Rosin wrote: >> As is, a failure message is printed unconditionally, which is confusing. >> And noisy. >> >> Fixes: 8d4d159f25a7 ("i2c: mux: provide more info on fa

Re: [PATCH v2 2/3] iio: adc: at91-sama5d2_adc: add hw trigger and buffer support

2017-05-17 Thread Peter Rosin
On 2017-05-16 20:03, Jonathan Cameron wrote: > As we are only left with one area of questions. >>> >>> +static const struct at91_adc_trigger at91_adc_trigger_list[] = { >>> +{ >>> +.name = "external-rising", >>> +.trgmod_value =

Re: [PATCH v10 1/6] i2c: designware: Cleaning and comment style fixes.

2017-06-08 Thread Peter Rosin
On 2017-06-08 19:36, Luis Oliveira wrote: > complicated to review. The work here won't bring any additional work to > backported fixes because is just style and reordering. I challenge that. If there is an old bug that existed before this patch that is fixed in the future after this patch has

Re: [PATCH v10 1/6] i2c: designware: Cleaning and comment style fixes.

2017-06-09 Thread Peter Rosin
On 2017-06-09 10:38, Andy Shevchenko wrote: > On Fri, 2017-06-09 at 07:12 +0200, Peter Rosin wrote: >> On 2017-06-08 19:36, Luis Oliveira wrote: >>> @@ -984,12 +984,12 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) >>> } >>> >>> i2c_dw_disable_in

Re: [PATCH] mux: adg792a: always require I2C support

2017-06-09 Thread Peter Rosin
On 2017-06-09 12:22, Arnd Bergmann wrote: > COMPILE_TEST makes no sense when I2C is disabled, as the driver cannot compile > in that configuration: Ouch, thanks for catching! Reviewed-by: Peter Rosin <p...@axentia.se> Greg, I assume you will you be taking this? Cheers, peda

<    5   6   7   8   9   10   11   12   13   14   >