[PATCH v4 2/2] backlight: rt4831: Apply ocp level from devicetree

2022-06-21 Thread cy_huang
From: ChiYuan Huang Add 'richtek,bled-ocp-microamp' property parsing in device_property_init function. This value may configure prior to the kernel driver. If it's not specified in devicetree, keep the original setting. Else, use clamp to align the value in min/max range and also roundup to choo

[PATCH v4 1/2] dt-bindings: backlight: rt4831: Add the new ocp level property

2022-06-21 Thread cy_huang
From: ChiYuan Huang Add 'richtek,bled-ocp-microamp' property to make it chooseable. The wrong backlight ocp level may affect the backlight channel output current smaller than configured. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson Reviewed-by: Krzysztof Kozlowski --- Since v3:

[PATCH v4 0/2] Add the property to make backlight OCP level selectable

2022-06-21 Thread cy_huang
From: ChiYuan Huang This patch series is to add the backlight ocp level property parsing. Since v4 - Fix wrong macro usage, must be 'DIV_ROUND_UP', not 'roundup' Since v3 - Refine the description for backlight ocp property. - Use the enum to list the supported value. Since v2 - change the pr

[PATCH v3 2/2] backlight: rt4831: Apply ocp level from devicetree

2022-06-08 Thread cy_huang
From: ChiYuan Huang Add 'richtek,bled-ocp-microamp' property parsing in device_property_init function. This value may configure prior to the kernel driver. If it's not specified in devicetree, keep the original setting. Else, use clamp to align the value in min/max range and also roundup to choo

[PATCH v3 1/2] dt-bindings: backlight: rt4831: Add the new ocp level property

2022-06-08 Thread cy_huang
From: ChiYuan Huang Add 'richtek,bled-ocp-microamp' property to make it chooseable. The wrong backlight ocp level may affect the backlight channel output current smaller than configured. Signed-off-by: ChiYuan Huang --- Since v3: - Refine the description for backlight ocp property. - Use the e

[PATCH v3 0/2] Add the property to make backlight OCP level selectable

2022-06-08 Thread cy_huang
From: ChiYuan Huang This patch series is to add the backlight ocp level property parsing. Since v3 - Refine the description for backlight ocp property. - Use the enum to list the supported value. Since v2 - change the property name from the register style 'richtek,bled-ocp-cel' to 'richtek,b

[PATCH v2 2/2] backlight: rt4831: Apply ocp level from devicetree

2022-06-08 Thread cy_huang
From: ChiYuan Huang Add 'richtek,bled-ocp-microamp' property parsing in device_property_init function. This value may configure prior to the kernel driver. If it's not specified in devicetree, keep the original setting. Else, use clamp to align the value in min/max range and also roundup to choo

[PATCH v2 1/2] dt-bindings: backlight: rt4831: Add the new ocp level property

2022-06-08 Thread cy_huang
From: ChiYuan Huang Add 'richtek,bled-ocp-microamp' property to make it chooseable. The wrong backlight ocp level may affect the backlight channel output current smaller than configured. Signed-off-by: ChiYuan Huang --- Since v2: - Change the property name from 'richtek,bled-ocp-sel' to 'rich

[PATCH v2 0/2] Add the property to make backlight OCP level selectable

2022-06-08 Thread cy_huang
From: ChiYuan Huang This patch series is to add the backlight ocp level property parsing. Since v2: - change the property name from the register style 'richtek,bled-ocp-cel' to 'richtek,bled-ocp-microamp'. - Use the clamp and roundup to get the ovp level selector. ChiYuan Huang (2): dt-bind

[PATCH 2/2] backlight: rt4831: Add the property parsing for ocp level selection

2022-05-25 Thread cy_huang
From: ChiYuan Huang Add the property parsing for ocp level selection. Reported-by: Lucas Tsai Signed-off-by: ChiYuan Huang --- drivers/video/backlight/rt4831-backlight.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/video/backlight/rt4831-backlight.c b/drivers/vi

[PATCH 1/2] dt-bindings: backlight: rt4831: Add the new property for ocp level selection

2022-05-25 Thread cy_huang
From: ChiYuan Huang Add the new property for ocp level selection. Signed-off-by: ChiYuan Huang --- .../bindings/leds/backlight/richtek,rt4831-backlight.yaml | 8 include/dt-bindings/leds/rt4831-backlight.h | 5 + 2 files changed, 13 insertions(+) dif

[PATCH 0/2] Add the property to make ocp level selectable

2022-05-25 Thread cy_huang
From: ChiYuan Huang This patch series is to make ocp level selectable. Some application design use small inductor. And it's easy to trigger the over current protection. Due to the OCP limit, It make the brightness current not match the configured value. To meet the HW design, the ocp level have

[PATCH v7 4/4] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-05-17 Thread cy_huang
From: ChiYuan Huang Adds support for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson --- since v7 - Fix typo 'common' to 'commonly' in Kconfig description. --- drivers/video/backlight/Kconfig| 8 ++ drivers/video/backlight/Makefile |

[PATCH v7 3/4] mfd: rt4831: Adds DT binding document for Richtek RT4831

2021-05-17 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring --- .../devicetree/bindings/mfd/richtek,rt4831.yaml| 90 ++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd

[PATCH v7 2/4] backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

2021-05-17 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson --- since v7 - Add allOf property refer to common.yaml. - Remove default-brightness/max-brightness description and refer string. --- .../leds/backlight/richtek,

[PATCH v7 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-05-17 Thread cy_huang
From: ChiYuan Huang This adds support Richtek RT4831 core. It includes four channel WLED driver and Display Bias Voltage outputs. Signed-off-by: ChiYuan Huang --- - Send the patch series for the wrong mail subject. The RT4831 regulator patches are already on main stream, and can be referred to

[PATCH v7 2/4] backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

2021-05-12 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson --- since v7 - Add allOf property refer to common.yaml. - Remove default-brightness/max-brightness description and refer string. --- .../leds/backlight/richtek,

[PATCH v7 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-05-12 Thread cy_huang
From: ChiYuan Huang This adds support Richtek RT4831 core. It includes four channel WLED driver and Display Bias Voltage outputs. Signed-off-by: ChiYuan Huang --- The RT4831 regulator patches are already on main stream, and can be referred to 9351ab8b0cb6 regulator: rt4831: Adds support for Ric

[PATCH v7 4/4] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-05-12 Thread cy_huang
From: ChiYuan Huang Adds support for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson --- since v7 - Fix typo 'common' to 'commonly' in Kconfig description. --- drivers/video/backlight/Kconfig| 8 ++ drivers/video/backlight/Makefile |

[PATCH v7 3/4] mfd: rt4831: Adds DT binding document for Richtek RT4831

2021-05-12 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring --- .../devicetree/bindings/mfd/richtek,rt4831.yaml| 90 ++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd

[RESEND PATCH v6 4/4] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-04-26 Thread cy_huang
From: ChiYuan Huang Adds support for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson --- Resend this v6 patch series to loop devicetree reviewers. For next, if the typo in Kconfig 'common' to 'commonly' can be added the below line Reviewed-by: Daniel Thomp

[RESEND PATCH v6 3/4] mfd: rt4831: Adds DT binding document for Richtek RT4831

2021-04-26 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831. Signed-off-by: ChiYuan Huang --- Resend this v6 patch series to loop devicetree reviewers. --- .../devicetree/bindings/mfd/richtek,rt4831.yaml| 90 ++ 1 file changed, 90 insertions(+) create mode 100644 D

[RESEND PATCH v6 2/4] backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

2021-04-26 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson --- Resend this v6 patch series to loop devicetree reviewers. For next, need to add the below line Reviewed-by: Daniel Thompson --- .../leds/backlight/richtek

[RESEND PATCH v6 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-04-26 Thread cy_huang
From: ChiYuan Huang This adds support Richtek RT4831 core. It includes four channel WLED driver and Display Bias Voltage outputs. Signed-off-by: ChiYuan Huang --- Resend this v6 patch series to loop devicetree reviewers. The RT4831 regulator patches are already on main stream, and can be refer

[PATCH v6 4/4] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-03-28 Thread cy_huang
From: ChiYuan Huang Adds support for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang --- since v6 - Fix Kconfig typo. - Remove internal mutex lock. - Add the prefix for max brightness. - rename init_device_properties to parse_backlight_properties. - Remove some warning message if default

[PATCH v6 2/4] backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

2021-03-28 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang --- .../leds/backlight/richtek,rt4831-backlight.yaml | 65 ++ include/dt-bindings/leds/rt4831-backlight.h| 23 2 files changed, 88 insertions(+) creat

[PATCH v6 3/4] mfd: rt4831: Adds DT binding document for Richtek RT4831

2021-03-28 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831. Signed-off-by: ChiYuan Huang --- .../devicetree/bindings/mfd/richtek,rt4831.yaml| 90 ++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/richtek,rt4831.yaml diff

[PATCH v6 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-03-28 Thread cy_huang
From: ChiYuan Huang This adds support Richtek RT4831 core. It includes four channel WLED driver and Display Bias Voltage outputs. Signed-off-by: ChiYuan Huang --- The RT4831 regulator patches are already on main stream, and can be referred to 9351ab8b0cb6 regulator: rt4831: Adds support for Ric

[PATCH v5 2/6] backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

2020-12-18 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang --- since v5 - Drop the example in dt-binding. Aready full example in mfd dt-binding. since v3 - Move inlcude/dt-bindings/leds/rt4831-backlight.h from patch 0004 to here. - Add dual license

[PATCH v5 3/6] regulator: rt4831: Adds DT binding document for Richtek RT4831 DSV regulator

2020-12-18 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831 DSV regulator. Signed-off-by: ChiYuan Huang --- since v5 - Revert it back from v3 patch. - Drop the example in dt-binding, Already full example in mfd dt-binding. --- .../regulator/richtek,rt4831-regulator.yaml| 35 +++

[PATCH v5 1/6] mfd: rt4831: Adds support for Richtek RT4831 core

2020-12-18 Thread cy_huang
From: ChiYuan Huang This adds support Richtek RT4831 core. It includes four channel WLED driver and Display Bias Voltage outputs. Signed-off-by: ChiYuan Huang --- since v5 - Rename file name from rt4831-core.c to rt4831.c - Change RICHTEK_VID to RICHTEK_VENDOR_ID. - Change gpio_desc nameing fro

[PATCH v5 4/6] mfd: rt4831: Adds DT binding document for Richtek RT4831 core

2020-12-18 Thread cy_huang
From: ChiYuan Huang Adds DT binding document for Richtek RT4831 core. Signed-off-by: ChiYuan Huang --- This patch depends on "backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight" "regulator: rt4831: Adds DT binding document for Richtek RT4831 DSV regulator" since v5 - Re

[PATCH v5 6/6] regulator: rt4831: Adds support for Richtek RT4831 DSV regulator

2020-12-18 Thread cy_huang
From: ChiYuan Huang Adds support for Richtek RT4831 DSV Regulator Signed-off-by: ChiYuan Huang --- drivers/regulator/Kconfig| 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/rt4831-regulator.c | 198 +++ 3 files changed, 209 i

[PATCH v5 5/6] backlight: rt4831: Adds support for Richtek RT4831 backlight

2020-12-18 Thread cy_huang
From: ChiYuan Huang Adds support for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang --- drivers/video/backlight/Kconfig| 8 ++ drivers/video/backlight/Makefile | 1 + drivers/video/backlight/rt4831-backlight.c | 219 + 3 files chang