dt-bindings: leds: backlight: Add Kinetic KTZ8866 backlight
Subsystems (5)
Jianhua Lu
maintainerPATCH v9 1/2 dt-bindings: leds: backlight: Add Kinetic KTZ8866 backlight
Add Kinetic KTZ8866 backlight binding documentation.
---
Changes in v2:
- Remove "items" between "compatible" and "const: kinetic,ktz8866".
- Change "additionalProperties" to "unevaluatedProperties".
Changes in v3:
- Add Krzysztof's R-b.
Changes in v4:
- Drop Krzysztof's R-b.
- Add some new properties.
Changes in v5:
- Add missing enum under property description.
- Rename uncorrect properties.
Changes in v6:
- Correct wrong property suffix and description.
Changes in v7:
- Add vddpos and vddeg supply.
- Use enable-gpios instead of defining enable pin.
Changes in v8:
- Rename current ramping time.
- Rename led ramping time.
Changes in v9:
- Add Krzysztof's R-b.
- Add missing 1μs to the enum of "kinetic,led-enable-ramp-delay-ms".
.../leds/backlight/kinetic,ktz8866.yaml | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml
Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml new file +76 -0
@@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/kinetic,ktz8866.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kinetic Technologies KTZ8866 backlight + +maintainers: + - Jianhua Lu <[email protected]> + +description: | + The Kinetic Technologies KTZ8866 is a high efficiency 6-channels-current-sinks + led backlight with dual lcd bias power. + https://www.kinet-ic.com/ktz8866/ + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: kinetic,ktz8866 + + vddpos-supply: + description: positive boost supply regulator. + + vddneg-supply: + description: negative boost supply regulator. + + enable-gpios: + description: GPIO to use to enable/disable the backlight (HWEN pin). + maxItems: 1 + + current-num-sinks: + description: number of the LED current sinks' channels. + enum: [1, 2, 3, 4, 5, 6] + + kinetic,current-ramp-delay-ms: + description: | + LED current ramping delay time in milliseconds, note that the + case 1 will be mapped to 1μs. + enum: [1, 2, 4, 8, 16, 32, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640] + + kinetic,led-enable-ramp-delay-ms: + description: | + LED on/off ramping delay time in milliseconds, note that the case 0 will be + mapped to 512μs because ktz8866 can't ramp faster than it. + enum: [0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384] + + kinetic,enable-lcd-bias: + description: Set if we want to output bias power supply for LCD. + type: boolean + +required: + - compatible + - vddpos-supply + - vddneg-supply + - enable-gpios + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + backlight { + compatible = "kinetic,ktz8866"; + + vddpos-supply = <&bl_vddpos_5p5>; + vddneg-supply = <&bl_vddneg_5p5>; + enable-gpios = <&tlmm 139 GPIO_ACTIVE_HIGH>; + current-num-sinks = <5>; + kinetic,current-ramp-delay-ms = <128>; + kinetic,led-enable-ramp-delay-ms = <1>; + kinetic,enable-lcd-bias; + };
Signature · 1 line
2.39.1
Jianhua Lu
maintainerPATCH v9 2/2 backlight: ktz8866: Add support for Kinetic KTZ8866 backlight
Add support for Kinetic KTZ8866 backlight, which is used in
Xiaomi tablet, Mi Pad 5 series. This driver lightly based on
downstream implementation [1].
[1] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/video/backlight/ktz8866.c
---
Changes in v2:
- Add missing staitc modifier to ktz8866_write function.
Changes in v3:
- Add 2022 to Copyright line.
- Sort headers.
- Remove meaningless comment.
- Use definitions instead of hardcoding.
- Add missing maintainer info.
Changes in v4:
- Change 2022 to 2023.
- Remove useless macro and enum.
- Describe settings by devicetree.
- Move header file to C file.
Changes in v5:
- Change "2023" to "2022, 2023" in Copyright line.
- Set scale property for backlight.
Changes in v6:
- Correct devicetree property name.
Changes in v7:
- Remove unnecessary sleep statement.
- Fix code style.
- Add vddpos and vddneg supply devicetree parse.
- Add enabel-gpio devicetree parse.
Changes in v8:
- Modify devicetree parse according to dt bindings.
No changes in v9
MAINTAINERS | 6 + drivers/video/backlight/Kconfig | 8 ++ drivers/video/backlight/Makefile | 1 + drivers/video/backlight/ktz8866.c | 209 ++++++++++++++++++++++++++++++ 4 files changed, 224 insertions(+) create mode 100644 drivers/video/backlight/ktz8866.c
MAINTAINERS +6 -0
@@ -11674,6 +11674,12 @@ M: John Hawley <[email protected]> S: Maintained F: tools/testing/ktest +KTZ8866 BACKLIGHT DRIVER +M: Jianhua Lu <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml +F: drivers/video/backlight/ktz8866.c + L3MDEV M: David Ahern <[email protected]> L: [email protected]
drivers/video/backlight/Kconfig +8 -0
@@ -190,6 +190,14 @@ config BACKLIGHT_KTD253 which is a 1-wire GPIO-controlled backlight found in some mobile phones. +config BACKLIGHT_KTZ8866 + tristate "Backlight Driver for Kinetic KTZ8866" + depends on I2C + select REGMAP_I2C + help + Say Y to enable the backlight driver for the Kinetic KTZ8866 + found in Xiaomi Mi Pad 5 series. + config BACKLIGHT_LM3533 tristate "Backlight Driver for LM3533" depends on MFD_LM3533
drivers/video/backlight/Makefile +1 -0
@@ -36,6 +36,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_KTZ8866) += ktz8866.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/ktz8866.c new file +209 -0
209 lines not on this page · raw message
Signature · 1 line
2.39.1
Re: [PATCH v9 2/2] backlight: ktz8866: Add support for Kinetic KTZ8866 backlight
Quoted 6 lines · Jianhua Lu
Add support for Kinetic KTZ8866 backlight, which is used in
Xiaomi tablet, Mi Pad 5 series. This driver lightly based on
downstream implementation [1].
[1] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/video/backlight/ktz8866.cSigned-off-by Jianhua Lu <[email protected]>
Thanks for all the changes!
Daniel.
Re: [PATCH v9 2/2] backlight: ktz8866: Add support for Kinetic KTZ8866 backlight
In reply to Jianhua LuQuoted 39 lines · Jianhua Lu
Add support for Kinetic KTZ8866 backlight, which is used in
Xiaomi tablet, Mi Pad 5 series. This driver lightly based on
downstream implementation [1].
[1] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/video/backlight/ktz8866.cSigned-off-by Jianhua Lu <[email protected]>---
Changes in v2:
- Add missing staitc modifier toktz8866_writefunction.Changes in v3:
- Add 2022 to Copyright line.
- Sort headers.
- Remove meaningless comment.
- Use definitions instead of hardcoding.
- Add missing maintainer info.Changes in v4:
- Change 2022 to 2023.
- Remove useless macro and enum.
- Describe settings by devicetree.
- Move header file to C file.Changes in v5:
- Change "2023" to "2022, 2023" in Copyright line.
- Set scale property for backlight.Changes in v6:
- Correct devicetree property name.Changes in v7:
- Remove unnecessary sleep statement.
- Fix code style.
- Add vddpos and vddneg supply devicetree parse.
- Add enabel-gpio devicetree parse.Changes in v8:
- Modify devicetree parse according to dt bindings.
Quoted 8 lines
No changes in v9
MAINTAINERS | 6 + drivers/video/backlight/Kconfig | 8 ++ drivers/video/backlight/Makefile | 1 + drivers/video/backlight/ktz8866.c | 209 ++++++++++++++++++++++++++++++ 4 files changed, 224 insertions(+) create mode 100644 drivers/video/backlight/ktz8866.c
Applied, thanks
Signature · 1 line
Lee Jones [李琼斯]
Quoted 4 lines · Jianhua Lu
Add Kinetic KTZ8866 backlight binding documentation.
Signed-off-by Jianhua Lu <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>
Daniel.
Quoted 31 lines · Jianhua Lu
Add Kinetic KTZ8866 backlight binding documentation.
Signed-off-by Jianhua Lu <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>---
Changes in v2:
- Remove "items" between "compatible" and "const: kinetic,ktz8866".
- Change "additionalProperties" to "unevaluatedProperties".Changes in v3:
- Add Krzysztof's R-b.Changes in v4:
- Drop Krzysztof's R-b.
- Add some new properties.Changes in v5:
- Add missing enum under property description.
- Rename uncorrect properties.Changes in v6:
- Correct wrong property suffix and description.Changes in v7:
- Add vddpos and vddeg supply.
- Use enable-gpios instead of defining enable pin.Changes in v8:
- Rename current ramping time.
- Rename led ramping time.
Quoted 7 lines
Changes in v9:
- Add Krzysztof's R-b.
- Add missing 1μs to the enum of "kinetic,led-enable-ramp-delay-ms"..../leds/backlight/kinetic,ktz8866.yaml | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml
Applied, thanks
Signature · 1 line
Lee Jones [李琼斯]