Re: [PATCH] media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()'

2019-09-17 Thread Marc Gonzalez
On 12/09/2019 22:44, Christophe JAILLET wrote: > Subject: [PATCH] media: v4l: cadence: Fix how unsued lanes are handled in > 'csi2rx_start()' s/unsued/unused > The 2nd parameter of 'find_first_zero_bit()' is a number of bits, not of > bytes. So use 'BITS_PER_LONG' instead of 'sizeof(lanes_used)

Re: [PATCH 6/7] media: don't do an unsigned int with a 31 bit shift

2019-08-23 Thread Marc Gonzalez
Full disclosure, I enjoy playing "C standard language lawyer" in my spare time. Feel free to ignore me if it gets boring ;-) https://port70.net/~nsz/c/ On 23/08/2019 12:20, Mauro Carvalho Chehab wrote: > Marc Gonzalez escreveu: > >> On 22/08/2019 21:39, Mauro

Re: [PATCH 6/7] media: don't do an unsigned int with a 31 bit shift

2019-08-23 Thread Marc Gonzalez
On 22/08/2019 21:39, Mauro Carvalho Chehab wrote: > [PATCH 6/7] media: don't do an unsigned int with a 31 bit shift s/unsigned int/signed int ? (See below as well.) > Doing something like: > > i32 foo = 1, bar; > > bar = foo << 31; For my information, why did you split the expre

Re: [PATCH v4] media: si2168: Refactor command setup code

2019-08-22 Thread Marc Gonzalez
On 22/08/2019 11:10, Sean Young wrote: > On Mon, Aug 19, 2019 at 01:54:53PM +0200, Marc Gonzalez wrote: > >> On 15/07/2019 11:50, Marc Gonzalez wrote: >> >>> Use cmd_init() to fill a struct si2168_cmd command. >>> >>> Signed-off-by: Marc Gonzalez

Re: [RFC v2] DT-based tuner/demod init

2019-07-22 Thread Marc Gonzalez
On 11/07/2019 18:21, Marc Gonzalez wrote: > This is a follow-up RFC to my first request for comments: > "[RFC] SW connection between DVB Transport Stream demuxer and I2C-based > frontend" > https://www.spinics.net/lists/arm-kernel/msg739972.html > > Background:

Re: [PATCH v1] media: dvb: Add devm_dvb_register_adapter

2019-07-15 Thread Marc Gonzalez
On 12/07/2019 18:26, Jonathan Neuschäfer wrote: > On Fri, Jul 12, 2019 at 04:19:20PM +0200, Marc Gonzalez wrote: > >> Add devm* variant for automagic resource release. > > S-o-b missing. > >> +int devm_dvb_register_adapter(struct device *dev, struct dvb_adapter *adap,

[PATCH v1] media: dvb: Add devm_dvb_register_adapter

2019-07-12 Thread Marc Gonzalez
Add devm* variant for automagic resource release. --- drivers/media/dvb-core/dvbdev.c | 21 + include/media/dvbdev.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index a3393cd4e584..c7a5302e

[RFC v2] DT-based tuner/demod init

2019-07-11 Thread Marc Gonzalez
Hello everyone, This is a follow-up RFC to my first request for comments: "[RFC] SW connection between DVB Transport Stream demuxer and I2C-based frontend" https://www.spinics.net/lists/arm-kernel/msg739972.html Background: my SoC provides a "Transport Stream Interface" on-chip (for which I wrot

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

2019-07-10 Thread Marc Gonzalez
On 10/07/2019 15:52, Marc Gonzalez wrote: > Your solution works great. It's refreshing to have stuff work > out-of-the-box! Arg! I spoke too soon. For some reason, si2157_init() is not being called when it should. I'm trying to trace it down...

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

2019-07-10 Thread Marc Gonzalez
On 08/07/2019 21:58, Peter Rosin wrote: > On 2019-07-08 13:08, Marc Gonzalez wrote: > >> 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 t

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

2019-07-08 Thread Marc Gonzalez
On 08/07/2019 13:08, Marc Gonzalez wrote: > PROBLEM #1 > > The media framework requires that the TSIF and demod be "tied" together, > by calling dvb_register_frontend(). If I do that in tsif.c, then I need to > get the frontend pointer from the demod at some point. Th

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

2019-07-08 Thread Marc Gonzalez
On 08/07/2019 16:44, Enrico Weigelt wrote: > On 08.07.19 13:08, Marc Gonzalez wrote: > >> 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. > > Should the si2168 make up its own i

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

2019-07-08 Thread Marc Gonzalez
Hello everyone, My first message(*) might have been too vague. Let me try explaining the goal in a different way, using code this time. (Provided at the end of this message.) (*) https://www.spinics.net/lists/arm-kernel/msg739657.html Background: I'm working with a SoC that provides a TSIF HW bl

Generic get_something from an i2c_client

2019-07-04 Thread Marc Gonzalez
Hello, In media drivers, TS drivers typically hard-code their front-end (demod and tuner) init by loading the modules themselves. I feel this is not a good solution for SoCs, where the TS HW might be on the SoC, and the front-end be on the board. So we may have different front-ends for differen

si2168 gapped clock

2019-06-18 Thread Marc Gonzalez
Hello, In the qcom SoC, the TS interface has two modes of operation. - with 3 signals (clk, valid, data) - with 4 signals (clk, valid, data, sync) In the si2168 short datasheet, I can see a diagram with these 4 signals. My question is: how do we configure the si2168 demod to be in the first mod

Re: [PATCH 5/8] drivers: media: coda: fix warning same module names

2019-06-06 Thread Marc Gonzalez
On 06/06/2019 11:47, Anders Roxell wrote: > When building with CONFIG_VIDEO_CODA and CONFIG_CODA_FS enabled as > loadable modules, we see the following warning: > > warning: same module names found: > fs/coda/coda.ko > drivers/media/platform/coda/coda.ko > > Rework so media coda matches the

[PATCH] media: docs: fix minor typos

2019-06-05 Thread Marc Gonzalez
Fix minor typos in the DVB demux documentation. Signed-off-by: Marc Gonzalez --- Documentation/media/kapi/dtv-core.rst | 6 +++--- include/media/dvbdev.h| 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/media/kapi/dtv-core.rst b

Re: [RFC] Documentation clarifications

2019-06-05 Thread Marc Gonzalez
On 04/06/2019 19:26, Mauro Carvalho Chehab wrote: > Em Tue, 4 Jun 2019 18:41:44 +0200, Marc Gonzalez escreveu: > >> Not sure about these changes, hence the RFC (some are quite trivial) > > Looks ok to me. You should submit it as a patch, though, with your SOB. I thought tha

[RFC] Documentation clarifications

2019-06-04 Thread Marc Gonzalez
Not sure about these changes, hence the RFC (some are quite trivial) diff --git a/Documentation/media/kapi/dtv-core.rst b/Documentation/media/kapi/dtv-core.rst index ac005b46f23e..9a74b8ba64b7 100644 --- a/Documentation/media/kapi/dtv-core.rst +++ b/Documentation/media/kapi/dtv-core.rst @@ -11,8

[PATCH v8 1/3] media: dt: bindings: Add binding for tango HW IR decoder

2017-10-06 Thread Marc Gonzalez
Add DT binding for the HW IR decoder embedded in SMP86xx/SMP87xx. Signed-off-by: Marc Gonzalez --- .../devicetree/bindings/media/tango-ir.txt | 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/tango-ir.txt diff

[PATCH v8 3/3] media: rc: Add driver for tango HW IR decoder

2017-10-06 Thread Marc Gonzalez
From: Mans Rullgard The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Mans Rullgard Signed-off-by: Marc Gonzalez --- Changes between v7 and v8 * RC_MAP_TANGO as default keymap * Define and use NEC_ANY macro --- drivers/media/rc/Kconfig| 10 ++ drivers/media/rc

[PATCH v8 2/3] media: rc: Add tango keymap

2017-10-06 Thread Marc Gonzalez
Add a keymap for the Sigma Designs Vantage (dev board) remote control. Signed-off-by: Marc Gonzalez --- Changes between v7 and v8 * Add legalese boiler plate * Define RC_PROTO_NECX * Move RC_MAP_TANGO to alphabetical order --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps

Re: [PATCH v7 3/3] media: rc: Add tango keymap

2017-10-06 Thread Marc Gonzalez
On 06/10/2017 12:47, Måns Rullgård wrote: > Sean Young writes: > >> Looks great, just some minor nitpicks. >> >> I think you need a header with copyright statement and GPL version(s). > > Is this even copyrightable? My thoughts, exactly. I don't mind *not* providing a copyright statement and G

[PATCH v7 2/3] media: rc: Add driver for tango HW IR decoder

2017-10-05 Thread Marc Gonzalez
From: Mans Rullgard The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Mans Rullgard Signed-off-by: Marc Gonzalez --- drivers/media/rc/Kconfig| 10 ++ drivers/media/rc/Makefile | 1 + drivers/media/rc/tango-ir.c | 279

[PATCH v7 1/3] media: dt: bindings: Add binding for tango HW IR decoder

2017-10-05 Thread Marc Gonzalez
Add DT binding for the HW IR decoder embedded in SMP86xx/SMP87xx. Signed-off-by: Marc Gonzalez --- .../devicetree/bindings/media/tango-ir.txt | 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/tango-ir.txt diff

[PATCH v7 3/3] media: rc: Add tango keymap

2017-10-05 Thread Marc Gonzalez
Add a keymap for the Sigma Designs Vantage (dev board) remote control. Signed-off-by: Marc Gonzalez --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-tango.c | 84 + drivers/media/rc/tango-ir.c | 2 +- include/media/rc-map.h

Re: [PATCH v6 2/2] media: rc: Add driver for tango HW IR decoder

2017-10-04 Thread Marc Gonzalez
On 26/09/2017 10:51, Marc Gonzalez wrote: > From: Mans Rullgard > > The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. > > Signed-off-by: Marc Gonzalez > --- > Changes between v5 and v6 > * Move "register fields" macros to top of file > * Restor

Re: [PATCH v6 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-26 Thread Marc Gonzalez
On 26/09/2017 15:02, Måns Rullgård wrote: > I could continue nit-picking, but I think this is good enough. > Thanks for being patient. > > Signed-off-by: Mans Rullgard Smirk. If you feel like making a final round of changes on top of this patch, then go for it. It's your code, after all. (Too

[PATCH v6 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-26 Thread Marc Gonzalez
From: Mans Rullgard The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Marc Gonzalez --- Changes between v5 and v6 * Move "register fields" macros to top of file * Restore IRQ pending writes --- drivers/media/rc/Kconfig| 10 ++ drivers/media/rc/Makefi

[PATCH v5 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-25 Thread Marc Gonzalez
From: Mans Rullgard The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Marc Gonzalez --- Changes between v4 and v5 * Restore inits in same order as original driver (except for devm_rc_allocate_device before clk_prepare_enable) * Delete two writes clearing

Re: [PATCH v4 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-25 Thread Marc Gonzalez
On 25/09/2017 16:08, Måns Rullgård wrote: > Marc Gonzalez writes: > > Why did you put this way early now? Registering the device should be > the last thing you do (LIKE I DID IT, DAMMIT). Otherwise something might > try to use it before it is fully configured.

[PATCH v4 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-25 Thread Marc Gonzalez
From: Mans Rullgard The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Marc Gonzalez --- Changes between v3 and v4 * Add one line to Kconfig help message * Add DRIVER_NAME macro * Move devm_request_irq() call to the end of probe * Add CAPTURE_N_BITS and GPIO_SELECT

[PATCH v4 1/2] media: dt: bindings: Add binding for tango HW IR decoder

2017-09-25 Thread Marc Gonzalez
Add DT binding for the HW IR decoder embedded in SMP86xx/SMP87xx. Signed-off-by: Marc Gonzalez --- .../devicetree/bindings/media/tango-ir.txt | 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/tango-ir.txt diff

Re: [PATCH v3 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-21 Thread Marc Gonzalez
On 21/09/2017 17:57, Sean Young wrote: > On Thu, Sep 21, 2017 at 04:49:53PM +0200, Marc Gonzalez wrote: > >> The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. >> >> Signed-off-by: Marc Gonzalez > > Missing signed-off-by. I am aware of that. Hopefully

Re: [PATCH v3 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-21 Thread Marc Gonzalez
On 21/09/2017 17:46, Måns Rullgård wrote: > Marc Gonzalez writes: > >> From: Mans Rullgard >> >> The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. >> >> Signed-off-by: Marc Gonzalez > > Have you been able to test all the protocols? Univer

[PATCH v3 2/2] media: rc: Add driver for tango HW IR decoder

2017-09-21 Thread Marc Gonzalez
From: Mans Rullgard The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Marc Gonzalez --- drivers/media/rc/Kconfig| 9 ++ drivers/media/rc/Makefile | 1 + drivers/media/rc/tango-ir.c | 265 3 files changed, 275

[PATCH v3 1/2] media: dt: bindings: Add binding for tango HW IR decoder

2017-09-21 Thread Marc Gonzalez
Add DT binding for the HW IR decoder embedded in SMP86xx/SMP87xx. Signed-off-by: Marc Gonzalez --- .../devicetree/bindings/media/tango-ir.txt | 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/tango-ir.txt diff

Re: [PATCH v2] media: rc: Add driver for tango IR decoder

2017-09-21 Thread Marc Gonzalez
On 21/09/2017 13:25, Sean Young wrote: > On Wed, Sep 20, 2017 at 10:39:11AM +0200, Marc Gonzalez wrote: > >> From: Mans Rullgard >> >> The tango IR decoder supports NEC, RC-5, RC-6 protocols. >> >> Signed-off-by: Marc Gonzalez > > This needs a sign

[PATCH v2] media: rc: Add driver for tango IR decoder

2017-09-20 Thread Marc Gonzalez
From: Mans Rullgard The tango IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Marc Gonzalez --- Changes from v1 to v2 o Fixup a syntax error introduced by search & replace o Bring back support for linux,rc-map-name property o Provide binding description --- .../device

Re: [PATCH v1] media: rc: Add driver for tango IR decoder

2017-09-19 Thread Marc Gonzalez
+ Rob & Mark for the DT bindings question. On 19/09/2017 14:21, Måns Rullgård wrote: > Marc Gonzalez writes: > >> On 18/09/2017 17:33, Måns Rullgård wrote: >> >>> What have you changed compared to my original code? >> >> I forgot to mention one

Re: [PATCH v1] media: rc: Add driver for tango IR decoder

2017-09-19 Thread Marc Gonzalez
On 18/09/2017 17:33, Måns Rullgård wrote: > What have you changed compared to my original code? I forgot to mention one change you may not approve of, so we should probably discuss it. Your driver supported an optional DT property "linux,rc-map-name" to override the RC_MAP_EMPTY map. Since the I

Re: [PATCH v1] media: rc: Add driver for tango IR decoder

2017-09-19 Thread Marc Gonzalez
On 19/09/2017 11:48, Måns Rullgård wrote: > Did you test the NEC32 variant? I don't have anything that produces > such codes. I don't have a NEC32 IR remote control either. IIUC, NEC32 means 16-bit address and 16-bit command. I checked the RTL with a HW engineer. The HW block translates the IR

Re: [PATCH v1] media: rc: Add driver for tango IR decoder

2017-09-19 Thread Marc Gonzalez
On 18/09/2017 17:33, Måns Rullgård wrote: > Marc Gonzalez writes: > >> diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig >> index d9ce8ff55d0c..f84923289964 100644 >> --- a/drivers/media/rc/Kconfig >> +++ b/drivers/media/rc/Kconfig >>

[PATCH] media: rc: Delete duplicate debug message

2017-09-18 Thread Marc Gonzalez
ir_setkeytable() and ir_create_table() print the same debug message. Delete the one in ir_setkeytable() Signed-off-by: Marc Gonzalez --- drivers/media/rc/rc-main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 981cccd6b988

[PATCH v1] media: rc: Add driver for tango IR decoder

2017-09-18 Thread Marc Gonzalez
The tango IR decoder supports NEC, RC-5, RC-6 protocols. NB: Only the NEC decoder was tested. Signed-off-by: Marc Gonzalez --- drivers/media/rc/Kconfig| 5 + drivers/media/rc/Makefile | 1 + drivers/media/rc/tango-ir.c | 263 3 files