leds: rt4505: Add DT binding document for Richtek RT4505
Subsystems (2)
PATCH v3 1/2 leds: rt4505: Add DT binding document for Richtek RT4505
From: ChiYuan Huang <[email protected]>
Add DT binding document for Richtek RT4505 flash LED controller.
---
Changes since v3
- Port this patch to led for-next tree.
- Merge Acks in the commit context.
- Reorder the patch series from the docs first.
Changes since v2
- Create flash directory into drvers/leds.
- Coding style fix to meet 80 charactors per line limit.
- Refine the description in the Kconfig help text.
- Change all descriptions for 'led' text to uppercase 'LED'.
--- .../devicetree/bindings/leds/leds-rt4505.yaml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-rt4505.yaml
Documentation/devicetree/bindings/leds/leds-rt4505.yaml new file +57 -0
@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-rt4505.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT4505 Single Channel LED Driver + +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + The RT4505 is a flash LED driver that can support up to 375mA and 1.5A for + torch and flash mode, respectively. + + The data sheet can be found at: + https://www.richtek.com/assets/product_file/RT4505/DS4505-02.pdf + +properties: + compatible: + const: richtek,rt4505 + + reg: + description: I2C slave address of the controller. + maxItems: 1 + + led: + type: object + $ref: common.yaml# + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/leds/common.h> + + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@63 { + compatible = "richtek,rt4505"; + reg = <0x63>; + + rt4505_flash: led { + function = LED_FUNCTION_FLASH; + color = <LED_COLOR_ID_WHITE>; + led-max-microamp = <375000>; + flash-max-microamp = <1500000>; + flash-max-timeout-us = <800000>; + }; + }; + };
Signature · 1 line
2.7.4
PATCH v3 2/2 leds: rt4505: Add support for Richtek RT4505 flash LED controller
From: ChiYuan Huang <[email protected]>
Add support for RT4505 flash LED controller. It can support up to 1.5A flash current with hardware timeout and low input voltage protection.
--- drivers/leds/flash/Kconfig | 11 + drivers/leds/flash/Makefile | 1 + drivers/leds/flash/leds-rt4505.c | 430 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 442 insertions(+) create mode 100644 drivers/leds/flash/leds-rt4505.c
drivers/leds/flash/Kconfig +11 -0
@@ -2,6 +2,17 @@ if LEDS_CLASS_FLASH +config LEDS_RT4505 + tristate "LED support for RT4505 flashlight controller" + depends on I2C && OF + depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS + select REGMAP_I2C + help + This option enables support for the RT4505 flash LED controller. + RT4505 includes torch and flash functions with programmable current. + And it's commonly used to compensate the illuminance for the camera + inside the mobile product like as phones or tablets. + config LEDS_RT8515 tristate "LED support for Richtek RT8515 flash/torch LED" depends on GPIOLIB
drivers/leds/flash/Makefile +1 -0
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_LEDS_RT4505) += leds-rt4505.o obj-$(CONFIG_LEDS_RT8515) += leds-rt8515.o
drivers/leds/flash/leds-rt4505.c new file +430 -0
430 lines not on this page · raw message
Signature · 1 line
2.7.4
Pavel Machek
AppliedRe: [PATCH v3 2/2] leds: rt4505: Add support for Richtek RT4505 flash LED controller
Hi!
Quoted 5 lines
Add support for RT4505 flash LED controller. It can support up to 1.5A flash current with hardware timeout and low input voltage protection.
Signed-off-by ChiYuan Huang <[email protected]>Acked-by Jacek Anaszewski <[email protected]>
Thank you, applied and pushed out.
Best regards,
Pavel
Signature · 1 line
http://www.livejournal.com/~pavelmachek