dt-bindings: backlight: Add some common backlight properties
Subsystems (5)
PATCH v3 1/3 dt-bindings: backlight: Add some common backlight properties
Let's use a common.yaml include for the backlight like we do with the LEDs. The LEDs are inherently incompatible so their bindings cannot be reused for backlight.
---
ChangeLog v2->v3:
- Drop the | for the description
- Drop the "default-on" property, we're not using it.
- Drop the minimum 0 for unsigned u32:s ChangeLog v1->v2:
- New patch as suggested by Sam.
--- .../bindings/leds/backlight/common.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/common.yaml
Documentation/devicetree/bindings/leds/backlight/common.yaml new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common backlight properties + +maintainers: + - Lee Jones <[email protected]> + - Daniel Thompson <[email protected]> + - Jingoo Han <[email protected]> + +description: + Backlight devices provide backlight for different types of graphical + displays. They are typically but not necessarily implemented using a white + LED powered by a boost converter. + +properties: + default-brightness: + description: + The default brightness that should be applied to the LED by the operating + system on start-up. The brightness should not exceed the brightness the + LED can provide. + $ref: /schemas/types.yaml#definitions/uint32 + + max-brightness: + description: + Normally the maximum brightness is determined by the hardware and this + property is not required. This property is used to put a software limit + on the brightness apart from what the driver says, as it could happen + that a LED can be made so bright that it gets damaged or causes damage + due to restrictions in a specific system, such as mounting conditions. + $ref: /schemas/types.yaml#definitions/uint32
Signature · 6 lines
2.26.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 2/3 dt-bindings: backlight: Add Kinetic KTD253 bindings
This adds device tree bindings for the Kinetic KTD253 white LED backlight driver.
---
ChangeLog v2->v3:
- Drop the pointless cargo-culted "default-on" property that we were not using
- Correct the brightness in the example to something legal (13) ChangeLog v1->v2:
- Create common.yaml for backlight as suggested by Sam and use that.
- Rename the GPIO line "enable-gpios"
--- .../leds/backlight/kinetic,ktd253.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml new file +46 -0
@@ -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,ktd253.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kinetic Technologies KTD253 one-wire backlight + +maintainers: + - Linus Walleij <[email protected]> + +description: | + The Kinetic Technologies KTD253 is a white LED backlight that is + controlled by a single GPIO line. If you just turn on the backlight + it goes to maximum backlight then you can set the level of backlight + using pulses on the enable wire. This is sometimes referred to as + "expresswire". + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: kinetic,ktd253 + + enable-gpios: + description: GPIO to use to enable/disable and dim the backlight. + maxItems: 1 + + default-brightness: true + max-brightness: true + +required: + - compatible + - enable-gpios + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + backlight { + compatible = "kinetic,ktd253"; + enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; + default-brightness = <13>; + };
Signature · 1 line
2.26.2
Re: [PATCH 2/3 v3] dt-bindings: backlight: Add Kinetic KTD253 bindings
Quoted 6 lines · Linus Walleij
This adds device tree bindings for the Kinetic KTD253 white LED backlight driver.
Cc Sam Ravnborg <[email protected]>Signed-off-by Linus Walleij <[email protected]>
Quoted 69 lines
---
ChangeLogv2->v3:
- Drop the pointless cargo-culted "default-on" property that we were not using
- Correct the brightness in the example to something legal (13) ChangeLogv1->v2:
- Createcommon.yamlfor backlight as suggested by Sam and use that.
- Rename the GPIO line "enable-gpios"--- .../leds/backlight/kinetic,ktd253.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yamlDocumentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml new file +46
-0@@ -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,ktd253.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kinetic Technologies KTD253 one-wire backlight + +maintainers: + - Linus Walleij <[email protected]> + +description: | + The Kinetic Technologies KTD253 is a white LED backlight that is + controlled by a single GPIO line. If you just turn on the backlight + it goes to maximum backlight then you can set the level of backlight + using pulses on the enable wire. This is sometimes referred to as + "expresswire". + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: kinetic,ktd253 + + enable-gpios: + description: GPIO to use to enable/disable and dim the backlight. + maxItems: 1 + + default-brightness: true + max-brightness: true + +required: + - compatible + - enable-gpios + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + backlight { + compatible = "kinetic,ktd253"; + enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; + default-brightness = <13>; + };Signature · 1 line
2.26.2
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/3 v3] dt-bindings: backlight: Add Kinetic KTD253 bindings
In reply to Linus WalleijQuoted 15 lines · Linus Walleij
This adds device tree bindings for the Kinetic KTD253 white LED backlight driver.
Cc Sam Ravnborg <[email protected]>Signed-off-by Linus Walleij <[email protected]>---
ChangeLogv2->v3:
- Drop the pointless cargo-culted "default-on" property that we were not using
- Correct the brightness in the example to something legal (13) ChangeLogv1->v2:
- Createcommon.yamlfor backlight as suggested by Sam and use that.
- Rename the GPIO line "enable-gpios"
Quoted 5 lines
--- .../leds/backlight/kinetic,ktd253.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lee Jones
AppliedRe: [PATCH 2/3 v3] dt-bindings: backlight: Add Kinetic KTD253 bindings
In reply to Linus WalleijQuoted 15 lines · Linus Walleij
This adds device tree bindings for the Kinetic KTD253 white LED backlight driver.
Cc Sam Ravnborg <[email protected]>Signed-off-by Linus Walleij <[email protected]>---
ChangeLogv2->v3:
- Drop the pointless cargo-culted "default-on" property that we were not using
- Correct the brightness in the example to something legal (13) ChangeLogv1->v2:
- Createcommon.yamlfor backlight as suggested by Sam and use that.
- Rename the GPIO line "enable-gpios"
Quoted 4 lines
--- .../leds/backlight/kinetic,ktd253.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
Applied, thanks.
Signature · 8 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 3/3 backlight: Add Kinetic KTD253 backlight driver
In reply to Linus WalleijThe Kinetic KTD253 backlight driver is controlled with a single GPIO line, but still supports a range of brightness settings by sending fast pulses on the line.
This is based off the source code release for the Samsung GT-S7710 mobile phone.
---
ChangeLog v2->v3:
- Collect Daniel's review tag.
ChangeLog v1->v2:
- Expose the 32 actual hardware levels of brightness directly instead of using an interpolated "brightness" table.
- Use the new backlight_get_brightness() helper.
- Call backlight_update_status() in probe instead of calling local functions to sync brightness.
- Sort includes alphabetically.
- Name the GPIO line "enable" and grab that in accordance with the change to the DT bindings.
--- MAINTAINERS | 6 + drivers/video/backlight/Kconfig | 8 + drivers/video/backlight/Makefile | 1 + drivers/video/backlight/ktd253-backlight.c | 198 +++++++++++++++++++++ 4 files changed, 213 insertions(+) create mode 100644 drivers/video/backlight/ktd253-backlight.c
MAINTAINERS +6 -0
@@ -9722,6 +9722,12 @@ F: Documentation/admin-guide/auxdisplay/ks0108.rst F: drivers/auxdisplay/ks0108.c F: include/linux/ks0108.h +KTD253 BACKLIGHT DRIVER +M: Linus Walleij <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml +F: drivers/video/backlight/ktd253-backlight.c + L3MDEV M: David Ahern <[email protected]> L: [email protected]
drivers/video/backlight/Kconfig +8 -0
@@ -182,6 +182,14 @@ config BACKLIGHT_IPAQ_MICRO computers. Say yes if you have one of the h3100/h3600/h3700 machines. +config BACKLIGHT_KTD253 + tristate "Backlight Driver for Kinetic KTD253" + depends on GPIOLIB || COMPILE_TEST + help + Say y to enabled the backlight driver for the Kinetic KTD253 + which is a 1-wire GPIO-controlled backlight found in some mobile + phones. + config BACKLIGHT_LM3533 tristate "Backlight Driver for LM3533" depends on MFD_LM3533
drivers/video/backlight/Makefile +1 -0
@@ -35,6 +35,7 @@ obj-$(CONFIG_BACKLIGHT_GPIO) += gpio_backlight.o 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_LM3533) += lm3533_bl.o obj-$(CONFIG_BACKLIGHT_LM3630A) += lm3630a_bl.o obj-$(CONFIG_BACKLIGHT_LM3639) += lm3639_bl.o
drivers/video/backlight/ktd253-backlight.c new file +198 -0
198 lines not on this page · raw message
Signature · 6 lines
2.26.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lee Jones
AppliedRe: [PATCH 3/3 v3] backlight: Add Kinetic KTD253 backlight driver
Quoted 22 lines · Linus Walleij
The Kinetic KTD253 backlight driver is controlled with a single GPIO line, but still supports a range of brightness settings by sending fast pulses on the line.
This is based off the source code release for the Samsung GT-S7710 mobile phone.
Cc Sam Ravnborg <[email protected]>Reviewed-by Daniel Thompson <[email protected]>Signed-off-by Linus Walleij <[email protected]>---
ChangeLogv2->v3:
- Collect Daniel's review tag.
ChangeLogv1->v2:
- Expose the 32 actual hardware levels of brightness directly instead of using an interpolated "brightness" table.
- Use the newbacklight_get_brightness()helper.
- Callbacklight_update_status()in probe instead of calling local functions to sync brightness.
- Sort includes alphabetically.
- Name the GPIO line "enable" and grab that in accordance with the change to the DT bindings.
Quoted 7 lines
--- MAINTAINERS | 6 + drivers/video/backlight/Kconfig | 8 + drivers/video/backlight/Makefile | 1 + drivers/video/backlight/ktd253-backlight.c | 198 +++++++++++++++++++++ 4 files changed, 213 insertions(+) create mode 100644 drivers/video/backlight/ktd253-backlight.c
Applied, thanks.
Signature · 8 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3 v3] backlight: Add Kinetic KTD253 backlight driver
Quoted 3 lines · Lee Jones
Quoted 1 line
create mode 100644 drivers/video/backlight/ktd253-backlight.cApplied, thanks.
Not to unnecessarily nag but I can't see this in linux-next and since we are at -rc7 it makes me a bit nervous, is it still gonna be in v5.10?
Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3 v3] backlight: Add Kinetic KTD253 backlight driver
Quoted 8 lines · Linus Walleij
Quoted 3 lines · Lee Jones
Quoted 1 line
create mode 100644 drivers/video/backlight/ktd253-backlight.cApplied, thanks.
Not to unnecessarily nag but I can't see this in linux-next and since we are at -rc7 it makes me a bit nervous, is it still gonna be in v5.10?
Heh, you're right. Apologies, tested and pushed now.
Signature · 8 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Linus Walleij
Let's use a
common.yamlinclude for the backlight like we do with the LEDs. The LEDs are inherently incompatible so their bindings cannot be reused for backlight.Suggested-by Sam Ravnborg <[email protected]>Signed-off-by Linus Walleij <[email protected]>
Quoted 55 lines
---
ChangeLogv2->v3:
- Drop the | for the description
- Drop the "default-on" property, we're not using it.
- Drop the minimum 0 for unsigned u32:s ChangeLogv1->v2:
- New patch as suggested by Sam.--- .../bindings/leds/backlight/common.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/common.yamlDocumentation/devicetree/bindings/leds/backlight/common.yaml new file +34
-0@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common backlight properties + +maintainers: + - Lee Jones <[email protected]> + - Daniel Thompson <[email protected]> + - Jingoo Han <[email protected]> + +description: + Backlight devices provide backlight for different types of graphical + displays. They are typically but not necessarily implemented using a white + LED powered by a boost converter. + +properties: + default-brightness: + description: + The default brightness that should be applied to the LED by the operating + system on start-up. The brightness should not exceed the brightness the + LED can provide. + $ref: /schemas/types.yaml#definitions/uint32 + + max-brightness: + description: + Normally the maximum brightness is determined by the hardware and this + property is not required. This property is used to put a software limit + on the brightness apart from what the driver says, as it could happen + that a LED can be made so bright that it gets damaged or causes damage + due to restrictions in a specific system, such as mounting conditions. + $ref: /schemas/types.yaml#definitions/uint32Signature · 1 line
2.26.2
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 14 lines · Linus Walleij
Let's use a
common.yamlinclude for the backlight like we do with the LEDs. The LEDs are inherently incompatible so their bindings cannot be reused for backlight.Suggested-by Sam Ravnborg <[email protected]>Signed-off-by Linus Walleij <[email protected]>---
ChangeLogv2->v3:
- Drop the | for the description
- Drop the "default-on" property, we're not using it.
- Drop the minimum 0 for unsigned u32:s ChangeLogv1->v2:
- New patch as suggested by Sam.
Quoted 4 lines
--- .../bindings/leds/backlight/common.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/common.yaml
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lee Jones
AppliedQuoted 14 lines · Linus Walleij
Let's use a
common.yamlinclude for the backlight like we do with the LEDs. The LEDs are inherently incompatible so their bindings cannot be reused for backlight.Suggested-by Sam Ravnborg <[email protected]>Signed-off-by Linus Walleij <[email protected]>---
ChangeLogv2->v3:
- Drop the | for the description
- Drop the "default-on" property, we're not using it.
- Drop the minimum 0 for unsigned u32:s ChangeLogv1->v2:
- New patch as suggested by Sam.
Quoted 4 lines
--- .../bindings/leds/backlight/common.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/common.yaml
Applied, thanks.
Signature · 8 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel