[PATCH v2 1/2] Revert "leds: Only descend into leds directory when CONFIG_NEW_LEDS is set"

2024-02-16 Thread Duje Mihanović
t to allow the library to be compiled. Link: https://lore.kernel.org/2cacd8dc-6150-4aa2-af9e-830a202fb...@app.fastmail.com Suggested-by: Arnd Bergmann Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović --- Changes in v2: - Add "commit" before hash to silence checkpatch ---

[PATCH v2 0/2] leds: expresswire: Fix dependencies

2024-02-16 Thread Duje Mihanović
LEDS_EXPRESSWIRE does not depend on NEW_LEDS in practice but still does in Kconfig. Fix up its Kconfig entry to reflect this and fix a Kconfig warning. Signed-off-by: Duje Mihanović --- Changes in v2: - Fix checkpatch errors - Pull Daniel's Reviewed-by - Link to v1: https://lore.kernel.

[PATCH v2 2/2] leds: expresswire: don't depend on NEW_LEDS

2024-02-16 Thread Duje Mihanović
...@kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402161410.ig9i4odj-...@intel.com/ Suggested-by: Daniel Thompson Fixes: 25ae5f5f4168 ("leds: Introduce ExpressWire library") Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović ---

Re: [PATCH] backlight: ktd2801: depend on GPIOLIB

2024-02-15 Thread Duje Mihanović
On Thursday, February 15, 2024 2:31:37 PM CET Linus Walleij wrote: > On Tue, Feb 13, 2024 at 7:13 PM Duje Mihanović wrote: > > LEDS_EXPRESSWIRE depends on GPIOLIB, and so must anything selecting it: > > > > WARNING: unmet direct dependencies detected for LEDS_EXPRESSWIRE

Re: [PATCH 2/2] leds: expresswire: don't depend on NEW_LEDS

2024-02-15 Thread Duje Mihanović
On Thursday, February 15, 2024 12:48:31 PM CET Daniel Thompson wrote: > On Mon, Feb 12, 2024 at 09:03:26PM +0100, Duje Mihanović wrote: ... > > Link: https://lore.kernel.org/20240212111819.936815-1-a...@kernel.org > > Reported-by: Arnd Bergmann > > Suggested-by: Danie

[PATCH] backlight: ktd2801: depend on GPIOLIB

2024-02-13 Thread Duje Mihanović
CLASS_DEVICE [=m] Fixes: 66c76c1cd984 ("backlight: Add Kinetic KTD2801 backlight support") Signed-off-by: Duje Mihanović --- drivers/video/backlight/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 230bca07b09d.

[PATCH 0/2] leds: expresswire: Fix dependencies

2024-02-12 Thread Duje Mihanović
LEDS_EXPRESSWIRE does not depend on NEW_LEDS in practice but still does in Kconfig. Fix up its Kconfig entry to reflect this and fix a Kconfig warning. Signed-off-by: Duje Mihanović --- Duje Mihanović (2): Revert "leds: Only descend into leds directory when CONFIG_NEW_LEDS is

[PATCH 1/2] Revert "leds: Only descend into leds directory when CONFIG_NEW_LEDS is set"

2024-02-12 Thread Duje Mihanović
allow the library to be compiled. Link: https://lore.kernel.org/2cacd8dc-6150-4aa2-af9e-830a202fb...@app.fastmail.com Suggested-by: Arnd Bergmann Signed-off-by: Duje Mihanović --- drivers/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/Makefile b/drivers/Make

[PATCH 2/2] leds: expresswire: don't depend on NEW_LEDS

2024-02-12 Thread Duje Mihanović
rnd Bergmann Suggested-by: Daniel Thompson Fixes: 25ae5f5f4168 ("leds: Introduce ExpressWire library") Signed-off-by: Duje Mihanović --- drivers/leds/Kconfig | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig i

Re: [PATCH] backlight: ktd2801: fix LED dependency

2024-02-12 Thread Duje Mihanović
On Monday, February 12, 2024 1:44:28 PM CET Daniel Thompson wrote: > On Mon, Feb 12, 2024 at 12:18:12PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > The new backlight driver unconditionally selects LEDS_EXPRESSWIRE, which > > is in a different subsystem that may be disabled here: >

[PATCH] backlight: ktd2801: make timing struct static

2024-02-10 Thread Duje Mihanović
The struct containing the KTD2801 timing can be made static as it's not referenced outside the KTD2801 driver. Do this to prevent sparse complaints. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402100625.m0rkjhmh-...@intel.com/ Signed-off-by: Duje Miha

[PATCH v5 3/4] dt-bindings: backlight: add Kinetic KTD2801 binding

2024-01-25 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add a DT binding for the KTD2801. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović

[PATCH v5 4/4] backlight: Add Kinetic KTD2801 backlight support

2024-01-25 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add support for the KTD2801. Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović --- MAINTAINERS

[PATCH v5 0/4] Kinetic ExpressWire library and KTD2801 backlight driver

2024-01-25 Thread Duje Mihanović
driver to use that library. Signed-off-by: Duje Mihanović --- Changes in v5: - Split up ExpressWire library and KTD2692 conversion - Rebase on v6.8-rc1 - Link to v4: https://lore.kernel.org/r/20240122-ktd2801-v4-0-33c986a3e...@skole.hr Changes in v4: - Drop 'extern' keywords in leds-exp

[PATCH v5 2/4] leds: ktd2692: convert to use ExpressWire library

2024-01-25 Thread Duje Mihanović
The KTD2692 uses the ExpressWire protocol implemented in the newly introduced ExpressWire library. Convert the driver to use the library. Suggested-by: Daniel Thompson Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović --- drivers/leds/flash/Kconfig

[PATCH v5 1/4] leds: introduce ExpressWire library

2024-01-25 Thread Duje Mihanović
code can be shared between the two, so in preparation for adding KTD2801 support introduce a library implementing this protocol. Suggested-by: Daniel Thompson Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Duje Mihanović --- MAINTAINERS | 7

[PATCH v4 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-22 Thread Duje Mihanović
code can be shared between the two, so move it into a library in preparation for adding KTD2801 support. Suggested-by: Daniel Thompson Reviewed-by: Linus Walleij Signed-off-by: Duje Mihanović --- MAINTAINERS | 7 +++ drivers/leds/Kconfig | 4 ++ drivers

[PATCH v4 2/3] dt-bindings: backlight: add Kinetic KTD2801 binding

2024-01-22 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add a DT binding for the KTD2801. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Duje Mihanović --- .../bindings/leds/backlight

[PATCH v4 3/3] backlight: Add Kinetic KTD2801 backlight support

2024-01-22 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add support for the KTD2801. Reviewed-by: Linus Walleij Signed-off-by: Duje Mihanović --- MAINTAINERS | 6 ++ drivers/video

[PATCH v4 0/3] Kinetic ExpressWire library and KTD2801 backlight driver

2024-01-22 Thread Duje Mihanović
driver to use that library. Signed-off-by: Duje Mihanović --- Changes in v4: - Drop 'extern' keywords in leds-expresswire.h - Add 'expresswire_write_u8' to leds-expresswire.c and use it in the two drivers - Move GPIOLIB dependency to LEDS_EXPRESSWIRE instead of letting client

Re: [PATCH v3 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-22 Thread Duje Mihanović
On Monday, January 22, 2024 6:50:31 PM CET Daniel Thompson wrote: > On Mon, Jan 22, 2024 at 06:26:04PM +0100, Duje Mihanović wrote: > > On Monday, January 22, 2024 5:57:53 PM CET Duje Mihanović wrote: > > > On Monday, January 22, 2024 5:50:11 PM CET Daniel Thompson wrote: >

Re: [PATCH v3 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-22 Thread Duje Mihanović
On Monday, January 22, 2024 5:57:53 PM CET Duje Mihanović wrote: > On Monday, January 22, 2024 5:50:11 PM CET Daniel Thompson wrote: > > AFAICT nothing will inhibit setting GPIOLIB so allyes- and allmodconfig > > builds will always end up with GPIOLIB enabled. If we are happy to >

Re: [PATCH v3 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-22 Thread Duje Mihanović
On Monday, January 22, 2024 5:50:11 PM CET Daniel Thompson wrote: > On Mon, Jan 22, 2024 at 05:24:51PM +0100, Duje Mihanović wrote: > > I believe a "select" would be more appropriate here unless these backlights > > should be hidden if GPIOLIB is disabled. The ca

Re: [PATCH v3 3/3] backlight: Add Kinetic KTD2801 backlight support

2024-01-22 Thread Duje Mihanović
On Monday, January 22, 2024 11:28:05 AM CET Daniel Thompson wrote: > On Sat, Jan 20, 2024 at 10:26:45PM +0100, Duje Mihanović wrote: > > diff --git a/drivers/video/backlight/ktd2801-backlight.c > > b/drivers/video/backlight/ktd2801-backlight.c new file mode 100644 > &g

Re: [PATCH v3 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-22 Thread Duje Mihanović
On Monday, January 22, 2024 11:19:26 AM CET Daniel Thompson wrote: > On Sat, Jan 20, 2024 at 10:26:43PM +0100, Duje Mihanović wrote: > > diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig > > index 6292fddcc55c..d29b6823e7d1 100644 > > --- a/drivers/leds/Kconfig &

Re: [PATCH v3 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-21 Thread Duje Mihanović
On Sunday, January 21, 2024 3:35:46 PM CET Linus Walleij wrote: > > +extern void expresswire_power_off(struct expresswire_common_props *props); > > +extern void expresswire_enable(struct expresswire_common_props *props); > > +extern void expresswire_start(struct expresswire_common_props *props); >

[PATCH v3 1/3] leds: ktd2692: move ExpressWire code to library

2024-01-20 Thread Duje Mihanović
code can be shared between the two, so move it into a library in preparation for adding KTD2801 support. Suggested-by: Daniel Thompson Signed-off-by: Duje Mihanović --- MAINTAINERS | 7 +++ drivers/leds/Kconfig | 3 ++ drivers/leds/Makefile | 3

[PATCH v3 2/3] dt-bindings: backlight: add Kinetic KTD2801 binding

2024-01-20 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add a DT binding for the KTD2801. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Duje Mihanović --- .../bindings/leds/backlight

[PATCH v3 3/3] backlight: Add Kinetic KTD2801 backlight support

2024-01-20 Thread Duje Mihanović
KTD2801 is a LED backlight driver IC found in samsung,coreprimevelte. The brightness can be set using PWM or the ExpressWire protocol. Add support for the KTD2801. Signed-off-by: Duje Mihanović --- MAINTAINERS | 6 ++ drivers/video/backlight/Kconfig

[PATCH v3 0/3] Kinetic ExpressWire library and KTD2801 backlight driver

2024-01-20 Thread Duje Mihanović
driver to use that library. Signed-off-by: Duje Mihanović --- Changes in v3: - Split ExpressWire code into library (and convert KTD2692 to use this library) - Rewrite commit messages - Add link to datasheet - Drop of.h include in ktd2801 - Use _cansleep and usleep_range when powering off - Clean

Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver

2024-01-19 Thread Duje Mihanović
On Friday, January 19, 2024 6:29:21 PM CET Christophe JAILLET wrote: > Le 18/01/2024 à 18:32, Duje Mihanović a écrit : > > Add driver for the Kinetic KTD2801 backlight driver. > > > > Signed-off-by: Duje Mihanović > > > > --- > > ... > > >

Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver

2024-01-19 Thread Duje Mihanović
On Friday, January 19, 2024 11:07:09 AM CET Daniel Thompson wrote: > On Thu, Jan 18, 2024 at 06:32:39PM +0100, Duje Mihanović wrote: > > Add driver for the Kinetic KTD2801 backlight driver. > > > > Signed-off-by: Duje Mihanović > > > > --- > > Shared E

Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver

2024-01-19 Thread Duje Mihanović
On Friday, January 19, 2024 10:02:33 AM CET Linus Walleij wrote: > Hi Duje, > > thanks for your patch! > > On Thu, Jan 18, 2024 at 6:33 PM Duje Mihanović wrote: > > Add driver for the Kinetic KTD2801 backlight driver.> > > Signed-off-by: Duje Mihanović > &g

[PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver

2024-01-18 Thread Duje Mihanović
Add driver for the Kinetic KTD2801 backlight driver. Signed-off-by: Duje Mihanović --- Shared ExpressWire handling code and preemption watchdogs haven't been implemented in this version as my questions regarding these two weren't answered. --- MAINTAINERS

[PATCH v2 0/2] Kinetic KTD2801 backlight driver

2024-01-18 Thread Duje Mihanović
Hello, This small series adds a driver for the Kinetic KTD2801 backlight IC. The driver has been tested on the samsung,coreprimevelte for which support is still out-of-tree. Signed-off-by: Duje Mihanović --- Changes in v2: - Address maintainer comments: - Drop MODULE_ALIAS - Rename enable

[PATCH v2 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding

2024-01-18 Thread Duje Mihanović
Add the dt binding for the Kinetic KTD2801 backlight driver. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Duje Mihanović --- .../bindings/leds/backlight/kinetic,ktd2801.yaml | 46 ++ 1 file changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/leds

Re: [PATCH 2/2] backlight: Add Kinetic KTD2801 driver

2023-10-09 Thread Duje Mihanović
On Monday, October 9, 2023 11:21:03 AM CEST Daniel Thompson wrote: > On Thu, Oct 05, 2023 at 08:49:09PM +0200, Duje Mihanović wrote: > > +#define EW_DELAY 150 > > +#define EW_DET 270 > > +#define LOW_BIT_HIGH 5 > > +#define LOW_BIT_LOW(4 *

Re: [PATCH 2/2] backlight: Add Kinetic KTD2801 driver

2023-10-06 Thread Duje Mihanović
On Thursday, October 5, 2023 10:40:41 PM CEST Krzysztof Kozlowski wrote: > On 05/10/2023 20:49, Duje Mihanović wrote: > > + gpiod_set_value(ktd2801->desc, 0); > > + udelay(EOD_H); > > Hm, why device is kept off after this? Setting 0 means enable GPIO is > logical 0

Re: [PATCH 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding

2023-10-06 Thread Duje Mihanović
On Friday, October 6, 2023 2:30:14 PM CEST Daniel Thompson wrote: > On Thu, Oct 05, 2023 at 08:49:08PM +0200, Duje Mihanović wrote: > > + enable-gpios: > > +maxItems: 1 > > Why "enable"? This is the line we are going to us to bitbang the > ExpressWire protoc

[PATCH 2/2] backlight: Add Kinetic KTD2801 driver

2023-10-05 Thread Duje Mihanović
Add driver for the Kinetic KTD2801 backlight driver. Signed-off-by: Duje Mihanović --- MAINTAINERS | 6 ++ drivers/video/backlight/Kconfig | 7 ++ drivers/video/backlight/Makefile| 1 + drivers/video/backlight/ktd2801-backlight.c

[PATCH 0/2] Kinetic KTD2801 backlight driver

2023-10-05 Thread Duje Mihanović
Hello, This small series adds a driver for the Kinetic KTD2801 backlight IC. The driver has been tested on the samsung,coreprimevelte for which support is still out-of-tree. Signed-off-by: Duje Mihanović --- Duje Mihanović (2): dt-bindings: backlight: add Kinetic KTD2801 binding

[PATCH 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding

2023-10-05 Thread Duje Mihanović
Add the dt binding for the Kinetic KTD2801 backlight driver. Signed-off-by: Duje Mihanović --- .../bindings/leds/backlight/kinetic,ktd2801.yaml | 46 ++ 1 file changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2801.yaml b