dt-bindings: vendor-prefixes: Add Shanghai Awinic Technology Co., Ltd.
Subsystems (2)
PATCH v2 1/3 dt-bindings: vendor-prefixes: Add Shanghai Awinic Technology Co., Ltd.
From: Nikita Travkin <[email protected]>
Add the "awinic" vendor prefix for Shanghai Awinic Technology Co., Ltd.
Website: https://www.awinic.com/
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -133,6 +133,8 @@ patternProperties: description: Shanghai AVIC Optoelectronics Co., Ltd. "^avnet,.*": description: Avnet, Inc. + "^awinic,.*": + description: Shanghai Awinic Technology Co., Ltd. "^axentia,.*": description: Axentia Technologies AB "^axis,.*":
Signature · 1 line
2.20.1
PATCH v2 2/3 dt-bindings: leds: Add binding for aw2013
From: Nikita Travkin <[email protected]>
Add YAML devicetree binding for AWINIC AW2013 3-channel led driver
--- .../devicetree/bindings/leds/leds-aw2013.yaml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-aw2013.yaml
Documentation/devicetree/bindings/leds/leds-aw2013.yaml new file +91 -0
@@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-aw2013.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AWINIC AW2013 3-channel LED Driver + +maintainers: + - Nikita Travkin <[email protected]> + +description: | + The AW2013 is a 3-channel LED driver with I2C interface. It can control + LED brightness with PWM output. + +properties: + compatible: + const: awinic,aw2013 + + reg: + maxItems: 1 + + vcc-supply: + description: Regulator providing power to the "VCC" pin. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[0-2]$": + type: object + allOf: + - $ref: common.yaml# + + properties: + reg: + description: Index of the LED. + minimum: 0 + maximum: 2 + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/leds/common.h> + + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@45 { + compatible = "awinic,aw2013"; + reg = <0x45>; + #address-cells = <1>; + #size-cells = <0>; + + vcc-supply = <&pm8916_l17>; + + led@0 { + reg = <0>; + led-max-microamp = <5000>; + function = LED_FUNCTION_INDICATOR; + color = <LED_COLOR_ID_RED>; + }; + + led@1 { + reg = <1>; + led-max-microamp = <5000>; + function = LED_FUNCTION_INDICATOR; + color = <LED_COLOR_ID_GREEN>; + }; + + led@2 { + reg = <2>; + led-max-microamp = <5000>; + function = LED_FUNCTION_INDICATOR; + color = <LED_COLOR_ID_BLUE>; + }; + }; + }; +...
Signature · 1 line
2.20.1
Re: [PATCH v2 2/3] dt-bindings: leds: Add binding for aw2013
Quoted 10 lines · On Mon, 11 May 2020 16:11:27 +0500, wrote:
From: Nikita Travkin <[email protected]>
Add YAML devicetree binding for AWINIC AW2013 3-channel led driver
Signed-off-by Nikita Travkin <[email protected]>--- .../devicetree/bindings/leds/leds-aw2013.yaml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-aw2013.yaml
PATCH v2 3/3 leds: add aw2013 driver
In reply to [email protected]From: Nikita Travkin <[email protected]>
This commit adds support for AWINIC AW2013 3-channel LED driver. The chip supports 3 PWM channels and is controlled with I2C.
---
Changes in v2:
- Handling of situations where one of delays for brightness_set() was zero is fixed.
- probe() is reworked to do led registration at the time of dt parsing. Support for "default-state" property was removed:
Keeping the old state properly appers to be tricky and doesn't worth the effort. For other state "default-on" trigger can be used.
--- drivers/leds/Kconfig | 10 + drivers/leds/Makefile | 1 + drivers/leds/leds-aw2013.c | 436 +++++++++++++++++++++++++++++++++++++ 3 files changed, 447 insertions(+) create mode 100644 drivers/leds/leds-aw2013.c
drivers/leds/Kconfig +10 -0
@@ -103,6 +103,16 @@ config LEDS_AS3645A controller. V4L2 flash API is provided as well if CONFIG_V4L2_FLASH_API is enabled. +config LEDS_AW2013 + tristate "LED support for Awinic AW2013" + depends on LEDS_CLASS && I2C && OF + help + This option enables support for the AW2013 3-channel + LED driver. + + To compile this driver as a module, choose M here: the module + will be called leds-aw2013. + config LEDS_BCM6328 tristate "LED Support for Broadcom BCM6328" depends on LEDS_CLASS
drivers/leds/Makefile +1 -0
@@ -15,6 +15,7 @@ obj-$(CONFIG_LEDS_APU) += leds-apu.o obj-$(CONFIG_LEDS_ARIEL) += leds-ariel.o obj-$(CONFIG_LEDS_AS3645A) += leds-as3645a.o obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o +obj-$(CONFIG_LEDS_AW2013) += leds-aw2013.o obj-$(CONFIG_LEDS_BCM6328) += leds-bcm6328.o obj-$(CONFIG_LEDS_BCM6358) += leds-bcm6358.o obj-$(CONFIG_LEDS_BD2802) += leds-bd2802.o
drivers/leds/leds-aw2013.c new file +436 -0
436 lines not on this page · raw message
Signature · 1 line
2.20.1
Re: [PATCH v2 3/3] leds: add aw2013 driver
Quoted 6 lines · On Mon 2020-05-11 16:11:28, [email protected] wrote:
From: Nikita Travkin <[email protected]>
This commit adds support for AWINIC AW2013 3-channel LED driver. The chip supports 3 PWM channels and is controlled with I2C.
Signed-off-by Nikita Travkin <[email protected]>
Thanks, I applied 2 and 3/. 1/ should go through Rob AFAICT.
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 10 lines · On Mon, 11 May 2020 16:11:26 +0500, wrote:
From: Nikita Travkin <[email protected]>
Add the "awinic" vendor prefix for Shanghai Awinic Technology Co., Ltd.
Website: https://www.awinic.com/Signed-off-by Nikita Travkin <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Quoted 6 lines · Rob Herring
Quoted 5 lines · On Mon, 11 May 2020 16:11:26 +0500, wrote:
From: Nikita Travkin <[email protected]>
Add the "awinic" vendor prefix for Shanghai Awinic Technology Co., Ltd.
Website: https://www.awinic.com/
Quoted 7 lines
Quoted 5 lines
Signed-off-by Nikita Travkin <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)Reviewed-by Rob Herring <[email protected]>
I can take 2/ and 3/ of the series, but I believe we'll get conflicts if I change vendor-prefixes.yaml in the LED tree. Can you take this one?
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Rob Herring
maintainerQuoted 14 lines · Pavel Machek
Quoted 12 lines · Rob Herring
Quoted 10 lines · On Mon, 11 May 2020 16:11:26 +0500, wrote:
From: Nikita Travkin <[email protected]>
Add the "awinic" vendor prefix for Shanghai Awinic Technology Co., Ltd.
Website: https://www.awinic.com/Signed-off-by Nikita Travkin <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Quoted 5 lines
Quoted 1 line
Reviewed-by Rob Herring <[email protected]>I can take 2/ and 3/ of the series, but I believe we'll get conflicts if I change
vendor-prefixes.yamlin the LED tree. Can you take this one?
Okay, applied.
Rob