* [PATCH v2 0/2] Kinetic KTD2801 backlight driver
@ 2024-01-18 17:32 Duje Mihanović
2024-01-18 17:32 ` [PATCH v2 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding Duje Mihanović
2024-01-18 17:32 ` [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver Duje Mihanović
0 siblings, 2 replies; 10+ messages in thread
From: Duje Mihanović @ 2024-01-18 17:32 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller
Cc: Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds,
devicetree, linux-kernel, linux-fbdev, Duje Mihanović,
Krzysztof Kozlowski
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.mihanovic@skole.hr>
---
Changes in v2:
- Address maintainer comments:
- Drop MODULE_ALIAS
- Rename enable-gpios to ctrl-gpios
- Rename ktd2801_backlight->desc to ktd2801_backlight->gpiod
- Give time constants more descriptive names and note their origins in
Samsung driver
- Convert to GPIO_ACTIVE_HIGH
- Update trailers
- Link to v1: https://lore.kernel.org/r/20231005-ktd2801-v1-0-43cd85b0629a@skole.hr
---
Duje Mihanović (2):
dt-bindings: backlight: add Kinetic KTD2801 binding
backlight: Add Kinetic KTD2801 driver
.../bindings/leds/backlight/kinetic,ktd2801.yaml | 46 +++++++
MAINTAINERS | 6 +
drivers/video/backlight/Kconfig | 7 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/ktd2801-backlight.c | 149 +++++++++++++++++++++
5 files changed, 209 insertions(+)
---
base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a
change-id: 20231004-ktd2801-0f3883cb59d0
Best regards,
--
Duje Mihanović <duje.mihanovic@skole.hr>
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH v2 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding 2024-01-18 17:32 [PATCH v2 0/2] Kinetic KTD2801 backlight driver Duje Mihanović @ 2024-01-18 17:32 ` Duje Mihanović 2024-01-19 8:48 ` Linus Walleij 2024-01-18 17:32 ` [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver Duje Mihanović 1 sibling, 1 reply; 10+ messages in thread From: Duje Mihanović @ 2024-01-18 17:32 UTC (permalink / raw) To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller Cc: Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev, Duje Mihanović, Krzysztof Kozlowski Add the dt binding for the Kinetic KTD2801 backlight driver. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> --- .../bindings/leds/backlight/kinetic,ktd2801.yaml | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2801.yaml b/Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2801.yaml new file mode 100644 index 000000000000..b005065e0f48 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2801.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/kinetic,ktd2801.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kinetic Technologies KTD2801 one-wire backlight + +maintainers: + - Duje Mihanović <duje.mihanovic@skole.hr> + +description: | + The Kinetic Technologies KTD2801 is a LED backlight driver controlled + by a single GPIO line. The driver can be controlled with a PWM signal + or by pulsing the GPIO line to set the backlight level. This is called + "ExpressWire". + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: kinetic,ktd2801 + + ctrl-gpios: + maxItems: 1 + + default-brightness: true + max-brightness: true + +required: + - compatible + - ctrl-gpios + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + backlight { + compatible = "kinetic,ktd2801"; + ctrl-gpios = <&gpio 97 GPIO_ACTIVE_HIGH>; + max-brightness = <210>; + default-brightness = <100>; + }; -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding 2024-01-18 17:32 ` [PATCH v2 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding Duje Mihanović @ 2024-01-19 8:48 ` Linus Walleij 0 siblings, 0 replies; 10+ messages in thread From: Linus Walleij @ 2024-01-19 8:48 UTC (permalink / raw) To: Duje Mihanović Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller, Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev, Krzysztof Kozlowski Hi Duje, thanks for your patch! On Thu, Jan 18, 2024 at 6:33 PM Duje Mihanović <duje.mihanovic@skole.hr> wrote: > Add the dt binding for the Kinetic KTD2801 backlight driver. Maybe add some commit message? > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> (...) > + ctrl-gpios: > + maxItems: 1 First I thought this was inconsistent with ktd253, then I looked at the datasheets and they really did change "en" to "ctrl" so this needs a new name indeed. With commit message added: Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver 2024-01-18 17:32 [PATCH v2 0/2] Kinetic KTD2801 backlight driver Duje Mihanović 2024-01-18 17:32 ` [PATCH v2 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding Duje Mihanović @ 2024-01-18 17:32 ` Duje Mihanović 2024-01-19 9:02 ` Linus Walleij ` (2 more replies) 1 sibling, 3 replies; 10+ messages in thread From: Duje Mihanović @ 2024-01-18 17:32 UTC (permalink / raw) To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller Cc: Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev, Duje Mihanović Add driver for the Kinetic KTD2801 backlight driver. Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> --- Shared ExpressWire handling code and preemption watchdogs haven't been implemented in this version as my questions regarding these two weren't answered. --- MAINTAINERS | 6 ++ drivers/video/backlight/Kconfig | 7 ++ drivers/video/backlight/Makefile | 1 + drivers/video/backlight/ktd2801-backlight.c | 149 ++++++++++++++++++++++++++++ 4 files changed, 163 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a7c4cf8201e0..1e25d760f312 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11884,6 +11884,12 @@ S: Maintained F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml F: drivers/video/backlight/ktd253-backlight.c +KTD2801 BACKLIGHT DRIVER +M: Duje Mihanović <duje.mihanovic@skole.hr> +S: Maintained +F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2801.yaml +F: drivers/video/backlight/ktd2801-backlight.c + KTEST M: Steven Rostedt <rostedt@goodmis.org> M: John Hawley <warthog9@eaglescrag.net> diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 51387b1ef012..a2b268293345 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -183,6 +183,13 @@ config BACKLIGHT_KTD253 which is a 1-wire GPIO-controlled backlight found in some mobile phones. +config BACKLIGHT_KTD2801 + tristate "Backlight Driver for Kinetic KTD2801" + depends on GPIOLIB || COMPILE_TEST + help + Say Y to enable the backlight driver for the Kinetic KTD2801 1-wire + GPIO-controlled backlight found in Samsung Galaxy Core Prime VE LTE. + config BACKLIGHT_KTZ8866 tristate "Backlight Driver for Kinetic KTZ8866" depends on I2C diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile index f72e1c3c59e9..b33b647f31ca 100644 --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile @@ -35,6 +35,7 @@ obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o obj-$(CONFIG_BACKLIGHT_HP700) += jornada720_bl.o obj-$(CONFIG_BACKLIGHT_IPAQ_MICRO) += ipaq_micro_bl.o obj-$(CONFIG_BACKLIGHT_KTD253) += ktd253-backlight.o +obj-$(CONFIG_BACKLIGHT_KTD2801) += ktd2801-backlight.o obj-$(CONFIG_BACKLIGHT_KTZ8866) += ktz8866.o obj-$(CONFIG_BACKLIGHT_LM3533) += lm3533_bl.o obj-$(CONFIG_BACKLIGHT_LM3630A) += lm3630a_bl.o diff --git a/drivers/video/backlight/ktd2801-backlight.c b/drivers/video/backlight/ktd2801-backlight.c new file mode 100644 index 000000000000..bbcb2e2059a2 --- /dev/null +++ b/drivers/video/backlight/ktd2801-backlight.c @@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include <linux/backlight.h> +#include <linux/delay.h> +#include <linux/gpio/consumer.h> +#include <linux/of.h> +#include <linux/platform_device.h> +#include <linux/property.h> + +/* These values have been extracted from Samsung's driver. */ +#define KTD2801_EXPRESSWIRE_DETECT_DELAY_US 150 +#define KTD2801_EXPRESSWIRE_DETECT_US 270 +#define KTD2801_LOW_BIT_HIGH_TIME_US 5 +#define KTD2801_LOW_BIT_LOW_TIME_US (4 * KTD2801_HIGH_BIT_LOW_TIME_US) +#define KTD2801_HIGH_BIT_LOW_TIME_US 5 +#define KTD2801_HIGH_BIT_HIGH_TIME_US (4 * KTD2801_HIGH_BIT_LOW_TIME_US) +#define KTD2801_DATA_START_US 5 +#define KTD2801_END_OF_DATA_LOW_US 10 +#define KTD2801_END_OF_DATA_HIGH_US 350 +#define KTD2801_PWR_DOWN_DELAY_US 2600 + +#define KTD2801_DEFAULT_BRIGHTNESS 100 +#define KTD2801_MAX_BRIGHTNESS 255 + +struct ktd2801_backlight { + struct backlight_device *bd; + struct gpio_desc *gpiod; + bool was_on; +}; + +static int ktd2801_update_status(struct backlight_device *bd) +{ + struct ktd2801_backlight *ktd2801 = bl_get_data(bd); + u8 brightness = (u8) backlight_get_brightness(bd); + + if (backlight_is_blank(bd)) { + gpiod_set_value(ktd2801->gpiod, 0); + udelay(KTD2801_PWR_DOWN_DELAY_US); + ktd2801->was_on = false; + return 0; + } + + if (!ktd2801->was_on) { + gpiod_set_value(ktd2801->gpiod, 1); + udelay(KTD2801_EXPRESSWIRE_DETECT_DELAY_US); + gpiod_set_value(ktd2801->gpiod, 0); + udelay(KTD2801_EXPRESSWIRE_DETECT_US); + gpiod_set_value(ktd2801->gpiod, 1); + ktd2801->was_on = true; + } + + gpiod_set_value(ktd2801->gpiod, 1); + udelay(KTD2801_DATA_START_US); + + for (int i = 0; i < 8; i++) { + u8 next_bit = (brightness & 0x80) >> 7; + + if (!next_bit) { + gpiod_set_value(ktd2801->gpiod, 0); + udelay(KTD2801_LOW_BIT_LOW_TIME_US); + gpiod_set_value(ktd2801->gpiod, 1); + udelay(KTD2801_LOW_BIT_HIGH_TIME_US); + } else { + gpiod_set_value(ktd2801->gpiod, 0); + udelay(KTD2801_HIGH_BIT_LOW_TIME_US); + gpiod_set_value(ktd2801->gpiod, 1); + udelay(KTD2801_HIGH_BIT_HIGH_TIME_US); + } + brightness <<= 1; + } + gpiod_set_value(ktd2801->gpiod, 0); + udelay(KTD2801_END_OF_DATA_LOW_US); + gpiod_set_value(ktd2801->gpiod, 1); + udelay(KTD2801_END_OF_DATA_HIGH_US); + return 0; +} + +static const struct backlight_ops ktd2801_backlight_ops = { + .update_status = ktd2801_update_status, +}; + +static int ktd2801_backlight_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct backlight_device *bd; + struct ktd2801_backlight *ktd2801; + u32 brightness, max_brightness; + int ret; + + ktd2801 = devm_kzalloc(dev, sizeof(*ktd2801), GFP_KERNEL); + if (!ktd2801) + return -ENOMEM; + ktd2801->was_on = true; + + ret = device_property_read_u32(dev, "max-brightness", &max_brightness); + if (ret) + max_brightness = KTD2801_MAX_BRIGHTNESS; + if (max_brightness > KTD2801_MAX_BRIGHTNESS) { + dev_err(dev, "illegal max brightness specified\n"); + max_brightness = KTD2801_MAX_BRIGHTNESS; + } + + ret = device_property_read_u32(dev, "default-brightness", &brightness); + if (ret) + brightness = KTD2801_DEFAULT_BRIGHTNESS; + if (brightness > max_brightness) { + dev_err(dev, "default brightness exceeds max\n"); + brightness = max_brightness; + } + + ktd2801->gpiod = devm_gpiod_get(dev, "ctrl", GPIOD_OUT_HIGH); + if (IS_ERR(ktd2801->gpiod)) + return dev_err_probe(dev, PTR_ERR(dev), + "failed to get backlight GPIO"); + gpiod_set_consumer_name(ktd2801->gpiod, dev_name(dev)); + + bd = devm_backlight_device_register(dev, dev_name(dev), dev, ktd2801, + &ktd2801_backlight_ops, NULL); + if (IS_ERR(bd)) + return dev_err_probe(dev, PTR_ERR(bd), + "failed to register backlight"); + + bd->props.max_brightness = max_brightness; + bd->props.brightness = brightness; + + ktd2801->bd = bd; + platform_set_drvdata(pdev, bd); + backlight_update_status(bd); + + return 0; +} + +static const struct of_device_id ktd2801_of_match[] = { + { .compatible = "kinetic,ktd2801" }, + { } +}; +MODULE_DEVICE_TABLE(of, ktd2801_of_match); + +static struct platform_driver ktd2801_backlight_driver = { + .driver = { + .name = "ktd2801-backlight", + .of_match_table = ktd2801_of_match, + }, + .probe = ktd2801_backlight_probe, +}; +module_platform_driver(ktd2801_backlight_driver); + +MODULE_AUTHOR("Duje Mihanović <duje.mihanovic@skole.hr>"); +MODULE_DESCRIPTION("Kinetic KTD2801 Backlight Driver"); +MODULE_LICENSE("GPL"); -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver 2024-01-18 17:32 ` [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver Duje Mihanović @ 2024-01-19 9:02 ` Linus Walleij 2024-01-19 16:36 ` Duje Mihanović 2024-01-19 10:07 ` Daniel Thompson 2024-01-19 17:29 ` Christophe JAILLET 2 siblings, 1 reply; 10+ messages in thread From: Linus Walleij @ 2024-01-19 9:02 UTC (permalink / raw) To: Duje Mihanović Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller, Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev Hi Duje, thanks for your patch! On Thu, Jan 18, 2024 at 6:33 PM Duje Mihanović <duje.mihanovic@skole.hr> wrote: > Add driver for the Kinetic KTD2801 backlight driver.> > Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> Add some commit message? > +#include <linux/backlight.h> > +#include <linux/delay.h> > +#include <linux/gpio/consumer.h> > +#include <linux/of.h> I don't think you need <linux/of.h>, the compatible table works without that (is in the device driver core). > +/* These values have been extracted from Samsung's driver. */ > +#define KTD2801_EXPRESSWIRE_DETECT_DELAY_US 150 > +#define KTD2801_EXPRESSWIRE_DETECT_US 270 > +#define KTD2801_LOW_BIT_HIGH_TIME_US 5 > +#define KTD2801_LOW_BIT_LOW_TIME_US (4 * KTD2801_HIGH_BIT_LOW_TIME_US) > +#define KTD2801_HIGH_BIT_LOW_TIME_US 5 > +#define KTD2801_HIGH_BIT_HIGH_TIME_US (4 * KTD2801_HIGH_BIT_LOW_TIME_US) > +#define KTD2801_DATA_START_US 5 > +#define KTD2801_END_OF_DATA_LOW_US 10 > +#define KTD2801_END_OF_DATA_HIGH_US 350 > +#define KTD2801_PWR_DOWN_DELAY_US 2600 > + > +#define KTD2801_DEFAULT_BRIGHTNESS 100 > +#define KTD2801_MAX_BRIGHTNESS 255 > + > +struct ktd2801_backlight { > + struct backlight_device *bd; > + struct gpio_desc *gpiod; > + bool was_on; > +}; > + > +static int ktd2801_update_status(struct backlight_device *bd) > +{ > + struct ktd2801_backlight *ktd2801 = bl_get_data(bd); > + u8 brightness = (u8) backlight_get_brightness(bd); > + > + if (backlight_is_blank(bd)) { > + gpiod_set_value(ktd2801->gpiod, 0); > + udelay(KTD2801_PWR_DOWN_DELAY_US); That's 2600 us, a pretty long delay in a hard loop or delay timer! Can you use usleep_range() instead, at least for this one? > + for (int i = 0; i < 8; i++) { > + u8 next_bit = (brightness & 0x80) >> 7; I would just: #include <linux/bits.h> bool next_bit = !!(brightness & BIT(7)); Yours, Linus Walleij ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver 2024-01-19 9:02 ` Linus Walleij @ 2024-01-19 16:36 ` Duje Mihanović 0 siblings, 0 replies; 10+ messages in thread From: Duje Mihanović @ 2024-01-19 16:36 UTC (permalink / raw) To: Linus Walleij Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller, Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev 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ć <duje.mihanovic@skole.hr> wrote: > > Add driver for the Kinetic KTD2801 backlight driver.> > > Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> > > Add some commit message? Besides the usual short explanation of the hardware I'd also add a link to the datasheet in the commit message if that's appropriate. > > +#include <linux/backlight.h> > > +#include <linux/delay.h> > > +#include <linux/gpio/consumer.h> > > +#include <linux/of.h> > > I don't think you need <linux/of.h>, the compatible table works without > that (is in the device driver core). Can confirm it compiles without. > > +/* These values have been extracted from Samsung's driver. */ > > +#define KTD2801_EXPRESSWIRE_DETECT_DELAY_US 150 > > +#define KTD2801_EXPRESSWIRE_DETECT_US 270 > > +#define KTD2801_LOW_BIT_HIGH_TIME_US 5 > > +#define KTD2801_LOW_BIT_LOW_TIME_US (4 * > > KTD2801_HIGH_BIT_LOW_TIME_US) +#define KTD2801_HIGH_BIT_LOW_TIME_US > > 5 > > +#define KTD2801_HIGH_BIT_HIGH_TIME_US (4 * > > KTD2801_HIGH_BIT_LOW_TIME_US) +#define KTD2801_DATA_START_US > > 5 > > +#define KTD2801_END_OF_DATA_LOW_US 10 > > +#define KTD2801_END_OF_DATA_HIGH_US 350 > > +#define KTD2801_PWR_DOWN_DELAY_US 2600 > > + > > +#define KTD2801_DEFAULT_BRIGHTNESS 100 > > +#define KTD2801_MAX_BRIGHTNESS 255 > > + > > +struct ktd2801_backlight { > > + struct backlight_device *bd; > > + struct gpio_desc *gpiod; > > + bool was_on; > > +}; > > + > > +static int ktd2801_update_status(struct backlight_device *bd) > > +{ > > + struct ktd2801_backlight *ktd2801 = bl_get_data(bd); > > + u8 brightness = (u8) backlight_get_brightness(bd); > > + > > + if (backlight_is_blank(bd)) { > > + gpiod_set_value(ktd2801->gpiod, 0); > > + udelay(KTD2801_PWR_DOWN_DELAY_US); > > That's 2600 us, a pretty long delay in a hard loop or delay timer! > > Can you use usleep_range() instead, at least for this one? Sounds like a good idea. Should I also make that GPIO pulldown _cansleep while at it? > > + for (int i = 0; i < 8; i++) { > > + u8 next_bit = (brightness & 0x80) >> 7; > > I would just: > > #include <linux/bits.h> > > bool next_bit = !!(brightness & BIT(7)); Will do. Regards, -- Duje ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver 2024-01-18 17:32 ` [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver Duje Mihanović 2024-01-19 9:02 ` Linus Walleij @ 2024-01-19 10:07 ` Daniel Thompson 2024-01-19 16:36 ` Duje Mihanović 2024-01-19 17:29 ` Christophe JAILLET 2 siblings, 1 reply; 10+ messages in thread From: Daniel Thompson @ 2024-01-19 10:07 UTC (permalink / raw) To: Duje Mihanović Cc: Lee Jones, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller, Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev 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ć <duje.mihanovic@skole.hr> > > --- > Shared ExpressWire handling code and preemption watchdogs haven't been > implemented in this version as my questions regarding these two weren't > answered. > --- The last mail I saw on this topic was of the "do you have any better ideas?" variety. I (mis)read that as "unless you have any better ideas" and didn't realize you were waiting for anything. I didn't have any better ideas! Daniel. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver 2024-01-19 10:07 ` Daniel Thompson @ 2024-01-19 16:36 ` Duje Mihanović 0 siblings, 0 replies; 10+ messages in thread From: Duje Mihanović @ 2024-01-19 16:36 UTC (permalink / raw) To: Daniel Thompson Cc: Lee Jones, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller, Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev 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ć <duje.mihanovic@skole.hr> > > > > --- > > Shared ExpressWire handling code and preemption watchdogs haven't been > > implemented in this version as my questions regarding these two weren't > > answered. > > --- > > The last mail I saw on this topic was of the "do you have any better > ideas?" variety. I (mis)read that as "unless you have any > better ideas" and didn't realize you were waiting for anything. > > I didn't have any better ideas! My apologies, I'll write the library as I proposed in that email. Regards, -- Duje ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver 2024-01-18 17:32 ` [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver Duje Mihanović 2024-01-19 9:02 ` Linus Walleij 2024-01-19 10:07 ` Daniel Thompson @ 2024-01-19 17:29 ` Christophe JAILLET 2024-01-19 17:36 ` Duje Mihanović 2 siblings, 1 reply; 10+ messages in thread From: Christophe JAILLET @ 2024-01-19 17:29 UTC (permalink / raw) To: Duje Mihanović, Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller Cc: Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev Le 18/01/2024 à 18:32, Duje Mihanović a écrit : > Add driver for the Kinetic KTD2801 backlight driver. > > Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> > > --- ... > + ktd2801->gpiod = devm_gpiod_get(dev, "ctrl", GPIOD_OUT_HIGH); > + if (IS_ERR(ktd2801->gpiod)) > + return dev_err_probe(dev, PTR_ERR(dev), PTR_ERR(ktd2801->gpiod); ? CJ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver 2024-01-19 17:29 ` Christophe JAILLET @ 2024-01-19 17:36 ` Duje Mihanović 0 siblings, 0 replies; 10+ messages in thread From: Duje Mihanović @ 2024-01-19 17:36 UTC (permalink / raw) To: Christophe JAILLET Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Helge Deller, Karel Balej, ~postmarketos/upstreaming, dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev 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ć <duje.mihanovic@skole.hr> > > > > --- > > ... > > > + ktd2801->gpiod = devm_gpiod_get(dev, "ctrl", GPIOD_OUT_HIGH); > > + if (IS_ERR(ktd2801->gpiod)) > > + return dev_err_probe(dev, PTR_ERR(dev), > > PTR_ERR(ktd2801->gpiod); ? Good catch, I'll fix it in v3. Regards, -- Duje ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-01-19 17:36 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-01-18 17:32 [PATCH v2 0/2] Kinetic KTD2801 backlight driver Duje Mihanović 2024-01-18 17:32 ` [PATCH v2 1/2] dt-bindings: backlight: add Kinetic KTD2801 binding Duje Mihanović 2024-01-19 8:48 ` Linus Walleij 2024-01-18 17:32 ` [PATCH v2 2/2] backlight: Add Kinetic KTD2801 driver Duje Mihanović 2024-01-19 9:02 ` Linus Walleij 2024-01-19 16:36 ` Duje Mihanović 2024-01-19 10:07 ` Daniel Thompson 2024-01-19 16:36 ` Duje Mihanović 2024-01-19 17:29 ` Christophe JAILLET 2024-01-19 17:36 ` Duje Mihanović
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).