Re: [RFC] SW connection between DVB Transport Stream demuxer and I2C-based frontend

2019-07-08 Thread Peter Rosin
On 2019-07-08 13:08, Marc Gonzalez wrote: > Hello everyone, *snip* Focusing on #2... > PROBLEM #2 > > The tuner (si2157) is not on the i2c5 bus, instead it is on a private > i2c bus *behind* si2168, which routes requests to the proper client. > For the time being, I don't know how to model this

[PATCH] media: saa7146: make use of i2c_8bit_addr_from_msg

2019-01-09 Thread Peter Rosin
Because it looks neater. Signed-off-by: Peter Rosin --- drivers/media/common/saa7146/saa7146_i2c.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/common/saa7146/saa7146_i2c.c b/drivers/media/common/saa7146/saa7146_i2c.c index 3feddc52c446..df9ebe2a168c

Re: [RFC PATCH v2] media: i2c: add SCCB helpers

2018-06-14 Thread Peter Rosin
On 2018-06-14 17:41, Wolfram Sang wrote: > >> So, maybe the easier thing to do is change i2c_lock_adapter to only >> lock the segment, and then have the callers beneath drivers/i2c/ >> (plus the above mlx90614 driver) that really want to lock the root >> adapter instead of the segment adapter call

Re: [RFC PATCH v2] media: i2c: add SCCB helpers

2018-06-13 Thread Peter Rosin
On 2018-06-12 19:31, Peter Rosin wrote: > On 2018-06-12 17:34, Akinobu Mita wrote: >> (This is 2nd version of SCCB helpers patch. After 1st version was >> submitted, I sent alternative patch titled "i2c: add I2C_M_FORCE_STOP". >> But it wasn't accepte

Re: [RFC PATCH v2] media: i2c: add SCCB helpers

2018-06-12 Thread Peter Rosin
On 2018-06-12 17:34, Akinobu Mita wrote: > (This is 2nd version of SCCB helpers patch. After 1st version was > submitted, I sent alternative patch titled "i2c: add I2C_M_FORCE_STOP". > But it wasn't accepted because it makes the I2C core code unreadable. > I couldn't find out a way to untangle it,

[PATCH] [media] saa7146: fix error return from master_xfer

2018-05-09 Thread Peter Rosin
Returning -1 (-EPERM) is not appropriate here, go with -EIO. Signed-off-by: Peter Rosin --- drivers/media/common/saa7146/saa7146_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/common/saa7146/saa7146_i2c.c b/drivers/media/common/saa7146/saa7146_i2c.c

Re: [PATCH 6/8] drm: rcar-du: rcar-lvds: Add bridge format support

2018-04-23 Thread Peter Rosin
On 2018-04-23 09:28, jacopo mondi wrote: > Hi Peter, >thanks for looking into this > > On Sun, Apr 22, 2018 at 10:08:21PM +0200, Peter Rosin wrote: >> On 2018-04-19 11:31, Jacopo Mondi wrote: >>> With the introduction of static input image format enumeration in DRM

Re: [PATCH 6/8] drm: rcar-du: rcar-lvds: Add bridge format support

2018-04-22 Thread Peter Rosin
On 2018-04-19 11:31, Jacopo Mondi wrote: > With the introduction of static input image format enumeration in DRM > bridges, add support to retrieve the format in rcar-lvds LVDS encoder > from both panel or bridge, to set the desired LVDS mode. > > Do not rely on 'DRM_BUS_FLAG_DATA_LSB_TO_MSB' flag

Re: [PATCH 2/8] dt-bindings: display: bridge: thc63lvd1024: Add lvds map property

2018-04-22 Thread Peter Rosin
On 2018-04-19 11:31, Jacopo Mondi wrote: > The THC63LVD1024 LVDS to RGB bridge supports two different input mapping > modes, selectable by means of an external pin. > > Describe the LVDS mode map through a newly defined mandatory property in > device tree bindings. > > Signed-off-by: Jacopo Mondi

Re: [PATCH 3/8] drm: bridge: thc63lvd1024: Add support for LVDS mode map

2018-04-22 Thread Peter Rosin
On 2018-04-19 11:31, Jacopo Mondi wrote: > The THC63LVD1024 LVDS to RGB bridge supports two different LVDS mapping > modes, selectable by means of an external pin. > > Add support for configurable LVDS input mapping modes, using the newly > introduced support for bridge input image formats. > > S

Re: [PATCH 1/8] drm: bridge: Add support for static image formats

2018-04-22 Thread Peter Rosin
On 2018-04-19 11:31, Jacopo Mondi wrote: > Add support for storing image format information in DRM bridges with > associated helper function. > > This patch replicates for bridges what 'drm_display_info_set_bus_formats()' > is for connectors. > > Signed-off-by: Jacopo Mondi > --- > drivers/gpu/

Re: [linux-media] Patch notification: 3 patches updated

2017-08-12 Thread Peter Rosin
On 2017-08-09 17:01, Patchwork wrote: > Hello, > > The following patches (submitted by you) have been updated in patchwork: > > * linux-media: [2/3,media] cx231xx: drop return value of > cx231xx_i2c_unregister > - http://patchwork.linuxtv.org/patch/42858/ > - for: Linux Media kernel p

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 escreveu: > >> This prevents potentially scary debug messages from the i2c core. >> >> Signed-off-by: Peter Rosin >> --- >> drivers/media/usb/cx231xx/c

[PATCH 0/3] [media] cx231xx: cleanup i2c adapter handling

2017-07-31 Thread Peter Rosin
27;t for some reason, then the current code is crap anyway, because as-is it compares with a value that is always zero meaning that the entire "if (0 != bus->i2c_rc)"-clause with its dev_warn can be removed from cx231xx_i2c_register. Cheers, Peter Peter Rosin (3): [media] cx231xx: fa

[PATCH 1/3] [media] cx231xx: fail probe if i2c_add_adapter fails

2017-07-31 Thread Peter Rosin
While at it, change the type of the previously always-zero i2c_rc member to int, matching the returned type from i2c_add_adapter. Signed-off-by: Peter Rosin --- drivers/media/usb/cx231xx/cx231xx-i2c.c | 2 +- drivers/media/usb/cx231xx/cx231xx.h | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 2/3] [media] cx231xx: drop return value of cx231xx_i2c_unregister

2017-07-31 Thread Peter Rosin
Noone cares anyway. Signed-off-by: Peter Rosin --- drivers/media/usb/cx231xx/cx231xx-i2c.c | 3 +-- drivers/media/usb/cx231xx/cx231xx.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c

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

2017-07-31 Thread Peter Rosin
This prevents potentially scary debug messages from the i2c core. Signed-off-by: Peter Rosin --- drivers/media/usb/cx231xx/cx231xx-core.c | 3 +++ drivers/media/usb/cx231xx/cx231xx-i2c.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/cx231xx/cx231xx

Re: [PATCH 2/2] [media] platform: add video-multiplexer subdevice driver

2017-05-03 Thread Peter Rosin
On 2017-05-03 10:35, Philipp Zabel wrote: > On Tue, 2017-05-02 at 19:42 +0200, Peter Rosin wrote: >> On 2017-05-02 17:21, Philipp Zabel wrote: >>> Thank you, I've resent a version with a mutex lock around vmux->active. >> >> I had a bunch of ifs in the abov

Re: [PATCH 2/2] [media] platform: add video-multiplexer subdevice driver

2017-05-02 Thread Peter Rosin
On 2017-05-02 17:21, Philipp Zabel wrote: > On Sat, 2017-04-29 at 23:42 +0200, Peter Rosin wrote: >> On 2017-04-29 23:29, Peter Rosin wrote: >>> On 2017-04-28 16:13, Philipp Zabel wrote: >>>> This driver can handle SoC internal and external video bus multip

Re: [PATCH 2/2] [media] platform: add video-multiplexer subdevice driver

2017-04-29 Thread Peter Rosin
On 2017-04-29 23:29, Peter Rosin wrote: > On 2017-04-28 16:13, Philipp Zabel wrote: >> This driver can handle SoC internal and external video bus multiplexers, >> controlled by mux controllers provided by the mux controller framework, >> such as MMIO register bitfields or

Re: [PATCH 2/2] [media] platform: add video-multiplexer subdevice driver

2017-04-29 Thread Peter Rosin
On 2017-04-28 16:13, Philipp Zabel wrote: > This driver can handle SoC internal and external video bus multiplexers, > controlled by mux controllers provided by the mux controller framework, > such as MMIO register bitfields or GPIOs. The subdevice passes through > the mbus configuration of the act

Re: [PATCH 0/9] Unify i2c_mux_add_adapter error reporting

2017-04-11 Thread Peter Rosin
On 2017-04-03 10:38, Peter Rosin wrote: > Hi! > > Many users of the i2c_mux_add_adapter interface log a message > on failure, but the function already logs such a message. One > or two of those users actually add more information than already > provided by the central failur

Re: [PATCH 0/9] Unify i2c_mux_add_adapter error reporting

2017-04-03 Thread Peter Rosin
On 2017-04-03 12:27, Wolfram Sang wrote: > On Mon, Apr 03, 2017 at 10:38:29AM +0200, Peter Rosin wrote: >> Hi! >> >> Many users of the i2c_mux_add_adapter interface log a message >> on failure, but the function already logs such a message. One >> or two of those us

Re: [PATCH 9/9] [media] cx231xx: stop double error reporting

2017-04-03 Thread Peter Rosin
On 2017-04-03 12:26, Wolfram Sang wrote: > On Mon, Apr 03, 2017 at 10:38:38AM +0200, Peter Rosin wrote: >> i2c_mux_add_adapter already logs a message on failure. >> >> Signed-off-by: Peter Rosin >> --- >> drivers/media/usb/cx231xx/cx231xx-i2c.c | 15

[PATCH 1/9] i2c: mux: provide more info on failure in i2c_mux_add_adapter

2017-04-03 Thread Peter Rosin
No callers then need to report any further info, thus reducing both the amount of code and the log noise. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-mux.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index

[PATCH 3/9] i2c: mux: gpio: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c index 655684d621a4..1a9973ede443

[PATCH 2/9] i2c: arb: gpio-challenge: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c index

[PATCH 5/9] i2c: mux: pca954x: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-pca954x.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 15dfc1648716

[PATCH 4/9] i2c: mux: pca9541: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-pca9541.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux-pca9541.c index 77840f7845a1

[PATCH 9/9] [media] cx231xx: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/media/usb/cx231xx/cx231xx-i2c.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c

[PATCH 6/9] i2c: mux: pinctrl: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-pinctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c index 35bb775e1b74

[PATCH 7/9] i2c: mux: reg: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-reg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c index c6a90b4a9c62..406d5059072c 100644

[PATCH 8/9] iio: gyro: mpu3050: stop double error reporting

2017-04-03 Thread Peter Rosin
i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin --- drivers/iio/gyro/mpu3050-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c index 06007200bf49..93f08b304a63 100644

[PATCH 0/9] Unify i2c_mux_add_adapter error reporting

2017-04-03 Thread Peter Rosin
information as any current user, and then remove the surplus error reporting at the call sites. Cheers, peda Peter Rosin (9): i2c: mux: provide more info on failure in i2c_mux_add_adapter i2c: arb: gpio-challenge: stop double error reporting i2c: mux: gpio: stop double error reporting i2c

[PATCH v9 1/9] i2c: allow adapter drivers to override the adapter locking

2016-05-04 Thread Peter Rosin
. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-core.c | 41 +++-- include/linux/i2c.h| 44 ++-- 2 files changed, 69 insertions(+), 16 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index

[PATCH v9 4/9] i2c-mux: document i2c muxes and elaborate on parent-/mux-locked muxes

2016-05-04 Thread Peter Rosin
Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology | 370 + MAINTAINERS| 1 + 2 files changed, 371 insertions(+) create mode 100644 Documentation/i2c/i2c-topology diff --git a/Documentation/i2c/i2c-topology b

[PATCH v9 5/9] iio: imu: inv_mpu6050: change the i2c gate to be mux-locked

2016-05-04 Thread Peter Rosin
e very end (and grabs the newfangled i2c mux lock where it previously grabbed the i2c adapter lock). Acked-by: Jonathan Cameron Acked-by: Daniel Baluta Tested-by: Crestez Dan Leonard Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology| 2 +- drivers/iio/imu/inv_m

[PATCH v9 2/9] i2c: muxes always lock the parent adapter

2016-05-04 Thread Peter Rosin
Instead of checking for i2c parent adapters for every lock/unlock, simply override the locking for muxes to always lock/unlock the parent adapter directly. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-core.c | 21 +++-- drivers/i2c/i2c-mux.c | 30

[PATCH v9 3/9] i2c-mux: relax locking of the top i2c adapter during mux-locked muxing

2016-05-04 Thread Peter Rosin
apter in the same adapter tree that is muxed, and request a "mux-locked mux" if that is the case. Modify the select-transfer-deselect code for "mux-locked" muxes so that each of the select-transfer-deselect ops locks the mux parent adapter individually. Signed-off-by: Peter Ros

[PATCH v9 9/9] [media] rtl2832: regmap is aware of lockdep, drop local locking hack

2016-05-04 Thread Peter Rosin
Tested-by: Antti Palosaari Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832.c | 30 -- drivers/media/dvb-frontends/rtl2832_priv.h | 1 - 2 files changed, 31 deletions(-) diff --git a/drivers/media/dvb-frontends

[PATCH v9 7/9] [media] rtl2832: change the i2c gate to be mux-locked

2016-05-04 Thread Peter Rosin
use plain old regmap accesses. This also removes the need for the regmap wrappers used by rtl2832_sdr, so deconvolute the code further and provide the regmap handle directly instead of the wrapper functions. Tested-by: Antti Palosaari Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology

[PATCH v9 8/9] [media] rtl2832_sdr: get rid of empty regmap wrappers

2016-05-04 Thread Peter Rosin
Tested-by: Antti Palosaari Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832_sdr.c | 302 +- 1 file changed, 132 insertions(+), 170 deletions(-) diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media

[PATCH v9 6/9] [media] si2168: change the i2c gate to be mux-locked

2016-05-04 Thread Peter Rosin
unlocked. But add a mutex so that firmware commands are still serialized. Signed-off-by: Antti Palosaari Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology| 2 +- drivers/media/dvb-frontends/si2168.c | 83 --- drivers/media/dvb-frontends

[PATCH v9 0/9] i2c mux cleanup and locking update

2016-05-04 Thread Peter Rosin
fic i2c muxes that I had overlooked. - Rebase on top of v4.4-rc8 (was based on v4.4-rc6 previously). - Drop the last two patches in the series. Cheers, Peter Antti Palosaari (1): [media] si2168: change the i2c gate to be mux-locked Peter Rosin (8): i2c: allow adapter drivers to override the a

Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

2016-05-04 Thread Peter Rosin
On 2016-05-03 23:39, Wolfram Sang wrote: >> Yes, they look like reasonable complaints. > > Thanks for fixing them. I just sent out my latest comments and when you > fix those and send V8, I'll apply that right away. I think we are safe > to fix the rest incrementally if needed. Note that I didn'

Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

2016-05-04 Thread Peter Rosin
Hi! On 2016-05-03 23:38, Wolfram Sang wrote: > On Wed, Apr 20, 2016 at 05:17:56PM +0200, Peter Rosin wrote: >> Add i2c_lock_bus() and i2c_unlock_bus(), which call the new lock_bus and >> unlock_bus ops in the adapter. These funcs/ops take an additional flags >> argument th

Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

2016-04-29 Thread Peter Rosin
On 2016-04-29 09:16, Wolfram Sang wrote: >> Yes, obviously... I'll make that change locally and wait for the rest. > Another nit: You could use '--strict' with checkpatch and see if you > want to fix the issues reported. I am not keen on those (except for > 'space around operators'), it's a matter

Re: [PATCH v7 22/24] [media] rtl2832: change the i2c gate to be mux-locked

2016-04-28 Thread Peter Rosin
On 2016-04-28 23:47, Wolfram Sang wrote: > On Wed, Apr 20, 2016 at 05:18:02PM +0200, Peter Rosin wrote: >> The root i2c adapter lock is then no longer held by the i2c mux during >> accesses behind the i2c gate, and such accesses need to take that lock >> just like any other

Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

2016-04-28 Thread Peter Rosin
On 2016-04-28 22:50, Wolfram Sang wrote: > On Wed, Apr 20, 2016 at 05:17:56PM +0200, Peter Rosin wrote: >> Add i2c_lock_bus() and i2c_unlock_bus(), which call the new lock_bus and >> unlock_bus ops in the adapter. These funcs/ops take an additional flags >> argument th

Re: [PATCH v7 00/24] i2c mux cleanup and locking update

2016-04-22 Thread Peter Rosin
rtl2832: regmap is aware of lockdep, drop local locking hack (2016-04-22 12:18:45 +0200) Antti Palosaari (1): [media] si2168: change the i2c gate to be mux-locked Peter Rosin (23): i2c-mux: add common data for every i2

[PATCH v8 08/24] iio: imu: inv_mpu6050: convert to use an explicit i2c mux core

2016-04-22 Thread 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. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 2 +- drivers/iio

Re: [PATCH v7 00/24] i2c mux cleanup and locking update

2016-04-22 Thread Peter Rosin
Hi Wolfram, Wolfram Sang wrote: > This was the diff of v6: > > > 32 files changed, 1277 insertions(+), 915 deletions(-) > > This is v7: > > > 32 files changed, 1225 insertions(+), 916 deletions(-) > > So, we gained a little overall. And while the individual drivers have a > few lines more no

[PATCH v7 22/24] [media] rtl2832: change the i2c gate to be mux-locked

2016-04-20 Thread Peter Rosin
use plain old regmap accesses. This also removes the need for the regmap wrappers used by rtl2832_sdr, so deconvolute the code further and provide the regmap handle directly instead of the wrapper functions. Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology| 2 +- drivers

[PATCH v7 06/24] i2c: i2c-mux-pca954x: convert to use an explicit i2c mux core

2016-04-20 Thread Peter Rosin
deselect op for all child adapters. Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-pca954x.c | 61 ++--- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index

[PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

2016-04-20 Thread Peter Rosin
to call it, as it is not expected to be needed outside of the i2c core). Implement i2c_lock_adapter/i2c_unlock_adapter in terms of the new locking scheme (i.e. lock with the I2C_LOCK_ADAPTER flag). Annotate some of the locking with explicit I2C_LOCK_SEGMENT flags. Signed-off-by: Peter Rosin

[PATCH v7 19/24] i2c-mux: document i2c muxes and elaborate on parent-/mux-locked muxes

2016-04-20 Thread Peter Rosin
Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology | 370 + MAINTAINERS| 1 + 2 files changed, 371 insertions(+) create mode 100644 Documentation/i2c/i2c-topology diff --git a/Documentation/i2c/i2c-topology b

[PATCH v7 21/24] [media] si2168: change the i2c gate to be mux-locked

2016-04-20 Thread Peter Rosin
unlocked. But add a mutex so that firmware commands are still serialized. Signed-off-by: Antti Palosaari Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology| 2 +- drivers/media/dvb-frontends/si2168.c | 83 --- drivers/media/dvb-frontends

[PATCH v7 11/24] [media] rtl2832: convert to use an explicit i2c mux core

2016-04-20 Thread 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. Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832.c | 25

[PATCH v7 09/24] [media] m88ds3103: convert to use an explicit i2c mux core

2016-04-20 Thread Peter Rosin
Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/m88ds3103.c | 19

[PATCH v7 20/24] iio: imu: inv_mpu6050: change the i2c gate to be mux-locked

2016-04-20 Thread Peter Rosin
e very end (and grabs the newfangled i2c mux lock where it previously grabbed the i2c adapter lock). Acked-by: Jonathan Cameron Acked-by: Daniel Baluta Signed-off-by: Peter Rosin --- Documentation/i2c/i2c-topology| 2 +- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 52 ++-

[PATCH v7 23/24] [media] rtl2832_sdr: get rid of empty regmap wrappers

2016-04-20 Thread Peter Rosin
Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832_sdr.c | 302 +- 1 file changed, 132 insertions(+), 170 deletions(-) diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c

[PATCH v7 24/24] [media] rtl2832: regmap is aware of lockdep, drop local locking hack

2016-04-20 Thread Peter Rosin
Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832.c | 30 -- drivers/media/dvb-frontends/rtl2832_priv.h | 1 - 2 files changed, 31 deletions(-) diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media

[PATCH v7 15/24] i2c-mux: drop old unused i2c-mux api

2016-04-20 Thread Peter Rosin
All i2c mux users are using an explicit i2c mux core, drop support for implicit i2c mux cores. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-mux.c | 63 - include/linux/i2c-mux.h | 15 2 files changed, 78 deletions(-) diff --git a

[PATCH v7 13/24] [media] cx231xx: convert to use an explicit i2c mux core

2016-04-20 Thread Peter Rosin
Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Signed-off-by: Peter Rosin --- drivers/media/usb/cx231xx/cx231xx-core.c | 6 ++-- drivers/media/usb/cx231xx/cx231xx-i2c.c | 47

[PATCH v7 14/24] of/unittest: convert to use an explicit i2c mux core

2016-04-20 Thread Peter Rosin
Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Acked-by: Rob Herring Signed-off-by: Peter Rosin --- drivers/of/unittest.c | 37 - 1 file changed

[PATCH v7 12/24] [media] si2168: convert to use an explicit i2c mux core

2016-04-20 Thread 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. Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/si2168.c | 25

[PATCH v7 17/24] i2c: muxes always lock the parent adapter

2016-04-20 Thread Peter Rosin
Instead of checking for i2c parent adapters for every lock/unlock, simply override the locking for muxes to always lock/unlock the parent adapter directly. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-core.c | 21 +++-- drivers/i2c/i2c-mux.c | 27

[PATCH v7 18/24] i2c-mux: relax locking of the top i2c adapter during mux-locked muxing

2016-04-20 Thread Peter Rosin
apter in the same adapter tree that is muxed, and request a "mux-locked mux" if that is the case. Modify the select-transfer-deselect code for "mux-locked" muxes so that each of the select-transfer-deselect ops locks the mux parent adapter individually. Signed-off-by: Peter Ros

[PATCH v7 03/24] i2c: i2c-mux-pinctrl: convert to use an explicit i2c mux core

2016-04-20 Thread 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-mux-pinctrl.c | 83 ++--- 1 file

[PATCH v7 02/24] i2c: i2c-mux-gpio: convert to use an explicit i2c mux core

2016-04-20 Thread 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-mux-gpio.c | 55 1 file

[PATCH v7 08/24] iio: imu: inv_mpu6050: convert to use an explicit i2c mux core

2016-04-20 Thread 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. Acked-by: Jonathan Cameron Signed-off-by: Peter Rosin --- drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 2 +- drivers/iio

[PATCH v7 10/24] [media] rtl2830: convert to use an explicit i2c mux core

2016-04-20 Thread Peter Rosin
Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2830.c | 20

[PATCH v7 05/24] i2c: i2c-mux-pca9541: convert to use an explicit i2c mux core

2016-04-20 Thread 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-mux-pca9541.c | 58 + 1 file

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

2016-04-20 Thread 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 +- 1 file

[PATCH v7 07/24] i2c: i2c-mux-reg: convert to use an explicit i2c mux core

2016-04-20 Thread 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-mux-reg.c | 69 +++-- 1 file

[PATCH v7 00/24] i2c mux cleanup and locking update

2016-04-20 Thread Peter Rosin
Antti Palosaari (1): [media] si2168: change the i2c gate to be mux-locked Peter Rosin (23): i2c-mux: add common data for every i2c-mux instance i2c: i2c-mux-gpio: convert to use an explicit i2c mux core i2c: i2c-mux-pinctrl: convert to use an explicit i2c mux core i2c: i2c-arb-gpio-cha

[PATCH v7 01/24] i2c-mux: add common data for every i2c-mux instance

2016-04-20 Thread Peter Rosin
of the old interface, which will create one implicit mux core per child adapter. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-mux.c | 175 include/linux/i2c-mux.h | 34 ++ 2 files changed, 168 insertions(+), 41 deletions(-) diff

Re: [PATCH v6 08/24] iio: imu: inv_mpu6050: convert to use an explicit i2c mux core

2016-04-19 Thread Peter Rosin
,Arnd Bergmann ,Tommi Rantala ,linux-...@vger.kernel.org,linux-...@vger.kernel.org,linux-...@vger.kernel.org,linux-media@vger.kernel.org,devicet...@vger.kernel.org Message-ID: On April 19, 2016 5:58:11 PM CEST, Crestez Dan Leonard wrote: > On 04/03/2016 11:52 AM, Peter Rosin wrote: >

Re: [PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance

2016-04-15 Thread Peter Rosin
Wolfram Sang wrote: > > > wonder even more if we couldn't supply num_adapters to i2c_mux_alloc() > > > and reserve the memory statically. i2c busses are not > > > dynamic/hot-pluggable so that should be good enough? > > > > Yes, that would work, but it would take some restructuring in some of > >

Re: [PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance

2016-04-13 Thread Peter Rosin
Hi! On 2016-04-11 22:46, Wolfram Sang wrote: > Hi Peter, > > first high-level review: > >> +int i2c_mux_reserve_adapters(struct i2c_mux_core *muxc, int adapters) > > I'd suggest to rename 'adapters' into 'num_adapters' throughout this > patch. I think it makes the code a lot easier to understan

Re: [PATCH v6 00/24] i2c mux cleanup and locking update

2016-04-11 Thread Peter Rosin
Hi! On 2016-04-11 14:39, Wolfram Sang wrote: Hi Peter, To summarize the series, there's some i2c-mux infrastructure cleanup work first (I think that part stands by itself as desireable regardless), the locking changes are in 16/24 and after with the real meat in 18/24. There is some documentat

Re: [PATCH] si2168: use i2c controlled mux interface

2016-04-05 Thread Peter Rosin
On 2016-04-05 16:50, Antti Palosaari wrote: > On 03/23/2016 06:58 PM, Peter Rosin wrote: >> On 2016-01-06 06:42, Antti Palosaari wrote: >>> Recent i2c mux locking update offers support for i2c controlled i2c >>> muxes. Use it and get the rid of homemade hackish i

Re: [PATCH v6 19/24] i2c-mux: document i2c muxes and elaborate on parent-/mux-locked muxes

2016-04-05 Thread Peter Rosin
On 2016-04-03 13:09, Jonathan Cameron wrote: > On 03/04/16 09:52, Peter Rosin wrote: >> From: Peter Rosin >> >> Signed-off-by: Peter Rosin > Very nice, one typo that I could see. Thanks! *snip* >> + and the actual transfer (e.g. if the child mux is auto-closi

Re: [PATCH v6 14/24] of/unittest: convert to use an explicit i2c mux core

2016-04-05 Thread Peter Rosin
On 2016-04-04 07:16, Rob Herring wrote: > On Sun, Apr 03, 2016 at 10:52:44AM +0200, Peter Rosin wrote: >> From: Peter Rosin >> >> Allocate an explicit i2c mux core to handle parent and child adapters >> etc. Update the select op to be in terms of the i2c mux core inst

Re: [PATCH v6 08/24] iio: imu: inv_mpu6050: convert to use an explicit i2c mux core

2016-04-03 Thread Peter Rosin
On 2016-04-03 12:51, Jonathan Cameron wrote: > On 03/04/16 09:52, Peter Rosin wrote: >> 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 >

[PATCH v6 05/24] i2c: i2c-mux-pca9541: convert to use an explicit i2c mux core

2016-04-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-mux-pca9541.c | 55

[PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance

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

[PATCH v6 11/24] [media] rtl2832: convert to use an explicit i2c mux core

2016-04-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. Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832.c

[PATCH v6 09/24] [media] m88ds3103: convert to use an explicit i2c mux core

2016-04-03 Thread Peter Rosin
From: Peter Rosin Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/m88ds3103.c | 18

[PATCH v6 10/24] [media] rtl2830: convert to use an explicit i2c mux core

2016-04-03 Thread Peter Rosin
From: Peter Rosin Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2830.c | 17

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

2016-04-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 v6 00/24] i2c mux cleanup and locking update

2016-04-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 v6 20/24] iio: imu: inv_mpu6050: change the i2c gate to be mux-locked

2016-04-03 Thread Peter Rosin
From: Peter Rosin The root i2c adapter lock is then no longer held by the i2c mux during accesses behind the i2c gate, and such accesses need to take that lock just like any other ordinary i2c accesses do. So, declare the i2c gate mux-locked, and zap the code that makes the unlocked i2c

[PATCH v6 23/24] [media] rtl2832_sdr: get rid of empty regmap wrappers

2016-04-03 Thread Peter Rosin
From: Peter Rosin Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832_sdr.c | 302 +- 1 file changed, 132 insertions(+), 170 deletions(-) diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb

[PATCH v6 24/24] [media] rtl2832: regmap is aware of lockdep, drop local locking hack

2016-04-03 Thread Peter Rosin
From: Peter Rosin Reviewed-by: Antti Palosaari Signed-off-by: Peter Rosin --- drivers/media/dvb-frontends/rtl2832.c | 30 -- drivers/media/dvb-frontends/rtl2832_priv.h | 1 - 2 files changed, 31 deletions(-) diff --git a/drivers/media/dvb-frontends/rtl2832.c

[PATCH v6 15/24] i2c-mux: drop old unused i2c-mux api

2016-04-03 Thread Peter Rosin
From: Peter Rosin All i2c mux users are using an explicit i2c mux core, drop support for implicit i2c mux cores. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-mux.c | 59 - include/linux/i2c-mux.h | 15 - 2 files changed, 74

[PATCH v6 14/24] of/unittest: convert to use an explicit i2c mux core

2016-04-03 Thread Peter Rosin
From: Peter Rosin Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Signed-off-by: Peter Rosin --- drivers/of/unittest.c | 40 +++- 1 file changed

[PATCH v6 18/24] i2c-mux: relax locking of the top i2c adapter during mux-locked muxing

2016-04-03 Thread Peter Rosin
From: Peter Rosin With a i2c topology like the following GPIO ---| -- BAT1 | v / I2C -+--+ MUX | \ EEPROM -- BAT2 there is a locking problem with the GPIO

[PATCH v6 13/24] [media] cx231xx: convert to use an explicit i2c mux core

2016-04-03 Thread Peter Rosin
From: Peter Rosin Allocate an explicit i2c mux core to handle parent and child adapters etc. Update the select op to be in terms of the i2c mux core instead of the child adapter. Signed-off-by: Peter Rosin --- drivers/media/usb/cx231xx/cx231xx-core.c | 6 ++-- drivers/media/usb/cx231xx

[PATCH v6 17/24] i2c: muxes always lock the parent adapter

2016-04-03 Thread Peter Rosin
From: Peter Rosin Instead of checking for i2c parent adapters for every lock/unlock, simply override the locking for muxes to always lock/unlock the parent adapter directly. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-core.c | 21 +++-- drivers/i2c/i2c-mux.c | 27

  1   2   >