LMU Common code intro
Subsystems (3)
v3 cover LMU Common code intro
Hello
I have added the Reviewed-by for dt bindings as well as made the Kconfig change pointed out for the common code flag
Dan
Dan Murphy (7):
dt-bindings: mfd: LMU: Fix lm3632 dt binding example
dt-bindings: mfd: LMU: Add the ramp up/down property
dt-bindings: mfd: LMU: Add ti,brightness-resolution
leds: TI LMU: Add common code for TI LMU devices
dt-bindings: ti-lmu: Modify dt bindings for the LM3697
mfd: ti-lmu: Remove support for LM3697
leds: lm3697: Introduce the lm3697 driver
.../devicetree/bindings/leds/leds-lm3697.txt | 73 ++++ .../devicetree/bindings/mfd/ti-lmu.txt | 56 ++- drivers/leds/Kconfig | 15 + drivers/leds/Makefile | 2 + drivers/leds/leds-lm3697.c | 395 ++++++++++++++++++ drivers/leds/ti-lmu-led-common.c | 155 +++++++ drivers/mfd/Kconfig | 2 +- drivers/mfd/ti-lmu.c | 17 - include/linux/mfd/ti-lmu-register.h | 44 -- include/linux/mfd/ti-lmu.h | 1 - include/linux/ti-lmu-led-common.h | 47 +++ 11 files changed, 712 insertions(+), 95 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3697.txt create mode 100644 drivers/leds/leds-lm3697.c create mode 100644 drivers/leds/ti-lmu-led-common.c create mode 100644 include/linux/ti-lmu-led-common.h
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v3 1/7 dt-bindings: mfd: LMU: Fix lm3632 dt binding example
Fix the lm3632 dt binding examples as the LCM enable GPIOs are defined as enable GPIOs per the regulator/lm363x-regulator.txt bindings document.
---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058757/
v2 - There was no v2 I add this patch on top of this series
Documentation/devicetree/bindings/mfd/ti-lmu.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/ti-lmu.txt +2 -2
@@ -104,8 +104,8 @@ lm3632@11 { regulators { compatible = "ti,lm363x-regulator"; - ti,lcm-en1-gpio = <&pioC 0 GPIO_ACTIVE_HIGH>; /* PC0 */ - ti,lcm-en2-gpio = <&pioC 1 GPIO_ACTIVE_HIGH>; /* PC1 */ + enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>, + <&pioC 1 GPIO_ACTIVE_HIGH>; vboost { regulator-name = "lcd_boost";
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v3 2/7 dt-bindings: mfd: LMU: Add the ramp up/down property
In reply to Dan MurphyDocument the ramp-up and ramp-down property in the binding. Removing the "sec" from the property definition as seconds is implied.
---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058759/
v2 - Fixed commit message as this was not just a modification but adding documentation
https://lore.kernel.org/patchwork/patch/1054504/
.../devicetree/bindings/mfd/ti-lmu.txt | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/mfd/ti-lmu.txt +13 -7
@@ -25,6 +25,12 @@ Required properties: Optional property: - enable-gpios: A GPIO specifier for hardware enable pin. + - ramp-up-ms: Current ramping from one brightness level to + the a higher brightness level. + Range from 2048 us - 117.44 s + - ramp-down-ms: Current ramping from one brightness level to + the a lower brightness level. + Range from 2048 us - 117.44 s Required node: - backlight: All LMU devices have backlight child nodes.
@@ -90,7 +96,7 @@ lm3631@29 { lcd_bl { led-sources = <0 1>; - ramp-up-msec = <300>; + ramp-up-ms = <300>; }; }; };
@@ -152,15 +158,15 @@ lm3633@36 { main { label = "main_lcd"; led-sources = <1 2>; - ramp-up-msec = <500>; - ramp-down-msec = <500>; + ramp-up-ms = <500>; + ramp-down-ms = <500>; }; front { label = "front_lcd"; led-sources = <0>; - ramp-up-msec = <1000>; - ramp-down-msec = <0>; + ramp-up-ms = <1000>; + ramp-down-ms = <0>; }; };
@@ -212,8 +218,8 @@ lm3697@36 { lcd { led-sources = <0 1 2>; - ramp-up-msec = <200>; - ramp-down-msec = <200>; + ramp-up-ms = <200>; + ramp-down-ms = <200>; }; };
Signature · 1 line
2.21.0.5.gaeb582a983
Re: [PATCH v3 2/7] dt-bindings: mfd: LMU: Add the ramp up/down property
Quoted 21 lines · Dan Murphy
Document the ramp-up and ramp-down property in the binding. Removing the "sec" from the property definition as seconds is implied.
Reviewed-by Rob Herring <[email protected]>Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058759/
v2 - Fixed commit message as this was not just a modification but adding documentation
https://lore.kernel.org/patchwork/patch/1054504/.../devicetree/bindings/mfd/ti-lmu.txt | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)Documentation/devicetree/bindings/mfd/ti-lmu.txt +0
-0
Documentation/devicetree/bindings/mfd/ti-lmu.txt Required properties: · line 26
Quoted 2 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt +0
-0@@ -25,6 +25,12 @@ Required properties: Optional property:
"properties".
Documentation/devicetree/bindings/mfd/ti-lmu.txt Required properties: · line 33
Quoted 7 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt +6
-0- enable-gpios: A GPIO specifier for hardware enable pin. + - ramp-up-ms: Current ramping from one brightness level to + the a higher brightness level. + Range from 2048 us - 117.44 s + - ramp-down-ms: Current ramping from one brightness level to + the a lower brightness level. + Range from 2048 us - 117.44 s
Can you use ramp-up/down-us for consistency?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH v3 2/7] dt-bindings: mfd: LMU: Add the ramp up/down property
Pavel
Quoted 23 lines · Pavel Machek
Quoted 22 lines · Dan Murphy
Document the ramp-up and ramp-down property in the binding. Removing the "sec" from the property definition as seconds is implied.
Reviewed-by Rob Herring <[email protected]>Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058759/
v2 - Fixed commit message as this was not just a modification but adding documentation
https://lore.kernel.org/patchwork/patch/1054504/.../devicetree/bindings/mfd/ti-lmu.txt | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)Documentation/devicetree/bindings/mfd/ti-lmu.txt +0
-0@@ -25,6 +25,12 @@ Required properties:
Quoted 4 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt Required properties: · line 26
Quoted 1 line
Documentation/devicetree/bindings/mfd/ti-lmu.txt +0
-0Optional property:"properties".
Ack
Quoted 9 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt Required properties: · line 33
Quoted 7 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt +6
-0- enable-gpios: A GPIO specifier for hardware enable pin. + - ramp-up-ms: Current ramping from one brightness level to + the a higher brightness level. + Range from 2048 us - 117.44 s + - ramp-down-ms: Current ramping from one brightness level to + the a lower brightness level. + Range from 2048 us - 117.44 sCan you use ramp-up/down-us for consistency?
Sure I can change it to ramp-up/down-us.
I just converted it ramp-up/down-msec to ramp-ramp-up/down-ms.
Probably makes more sense anyway with the range actually given is in us.
Dan
Quoted 2 lines
Pavel
PATCH v3 3/7 dt-bindings: mfd: LMU: Add ti,brightness-resolution
In reply to Dan MurphyAdd ti,brightness-resolution to the TI LMU binding to define whether the device uses 8-bit brightness or 11-bit brightness.
---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058763/
v2 - New patch. Add brightness resolution to ti-lmu.txt. See patch comments for context. - https://lore.kernel.org/patchwork/patch/1054501/
Documentation/devicetree/bindings/mfd/ti-lmu.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/mfd/ti-lmu.txt +11 -0
@@ -31,6 +31,16 @@ Optional property: - ramp-down-ms: Current ramping from one brightness level to the a lower brightness level. Range from 2048 us - 117.44 s + - ti,brightness-resolution - This determines whether to use 8 bit brightness + mode or 11 bit brightness mode. If this value is + not set the device is defaulted to the preferred + 8bit brightness mode per 7.3.4.1 of the data + sheet. This setting can either be in the parent + node or as part of the LED child nodes. This + is determined by the part itself if the strings + have a common brightness register or individual + brightness registers. + The values are 255 (8bit) or 2047 (11bit). Required node: - backlight: All LMU devices have backlight child nodes.
@@ -217,6 +227,7 @@ lm3697@36 { compatible = "ti,lm3697-backlight"; lcd { + ti,brightness-resolution = <255>; led-sources = <0 1 2>; ramp-up-ms = <200>; ramp-down-ms = <200>;
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v3 4/7 leds: TI LMU: Add common code for TI LMU devices
In reply to Dan MurphyCreate a TI LMU common framework for TI LMU devices that share common features.
Currently the runtime ramp and brightness setting have been identified as common features with common register settings.
This work is derived from Milo Kims TI LMU MFD code.
---
v3 - No changes - https://lore.kernel.org/patchwork/patch/1058764/
v2 - Added support for the brightness resolution parameter as it is a global parameter for all LMU devices, no other changes were made -
https://lore.kernel.org/patchwork/patch/1054500/
drivers/leds/Kconfig | 8 ++ drivers/leds/Makefile | 1 + drivers/leds/ti-lmu-led-common.c | 155 ++++++++++++++++++++++++++++++ include/linux/ti-lmu-led-common.h | 47 +++++++++ 4 files changed, 211 insertions(+) create mode 100644 drivers/leds/ti-lmu-led-common.c create mode 100644 include/linux/ti-lmu-led-common.h
drivers/leds/Kconfig +8 -0
@@ -776,6 +776,14 @@ config LEDS_NIC78BX To compile this driver as a module, choose M here: the module will be called leds-nic78bx. +config LEDS_TI_LMU_COMMON + tristate "LED driver for TI LMU" + depends on REGMAP + help + Say Y to enable the LED driver for TI LMU devices. + This supports common features between the TI LM3532, LM3631, LM3632, + LM3633, LM3695 and LM3697. + comment "LED Triggers" source "drivers/leds/trigger/Kconfig"
drivers/leds/Makefile +1 -0
@@ -80,6 +80,7 @@ obj-$(CONFIG_LEDS_MT6323) += leds-mt6323.o obj-$(CONFIG_LEDS_LM3692X) += leds-lm3692x.o obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o obj-$(CONFIG_LEDS_LM3601X) += leds-lm3601x.o +obj-$(CONFIG_LEDS_TI_LMU_COMMON) += ti-lmu-led-common.o # LED SPI Drivers obj-$(CONFIG_LEDS_CR0014114) += leds-cr0014114.o
drivers/leds/ti-lmu-led-common.c new file +155 -0
155 lines not on this page · raw message
include/linux/ti-lmu-led-common.h new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
2.21.0.5.gaeb582a983
Re: [PATCH v3 4/7] leds: TI LMU: Add common code for TI LMU devices
drivers/leds/Kconfig config LEDS_NIC78BX · line 780
Quoted 10 lines · Dan Murphy
drivers/leds/Kconfig +2
-0@@ -776,6 +776,14 @@ config LEDS_NIC78BX To compile this driver as a module, choose M here: the module will be called leds-nic78bx. +config LEDS_TI_LMU_COMMON + tristate "LED driver for TI LMU"
what does LMU mean?
drivers/leds/Kconfig config LEDS_NIC78BX · line 785
Quoted 5 lines
drivers/leds/Kconfig +5
-0+ depends on REGMAP + help + Say Y to enable the LED driver for TI LMU devices. + This supports common features between the TI LM3532, LM3631, LM3632, + LM3633, LM3695 and LM3697.
Fix help indentation above to use tab + 2 spaces consistently.
drivers/leds/Kconfig config LEDS_NIC78BX · line 788
Quoted 2 lines
drivers/leds/Kconfig +0
-0comment "LED Triggers" source "drivers/leds/trigger/Kconfig"
thanks.
Signature · 1 line
~Randy
Re: [PATCH v3 4/7] leds: TI LMU: Add common code for TI LMU devices
Randy
Quoted 9 lines · Randy Dunlap
Quoted 8 lines · Dan Murphy
drivers/leds/Kconfig +0
-0@@ -776,6 +776,14 @@ config LEDS_NIC78BX To compile this driver as a module, choose M here: the module will be called leds-nic78bx.
Quoted 4 lines
drivers/leds/Kconfig config LEDS_NIC78BX · line 780
Quoted 2 lines
drivers/leds/Kconfig +2
-0+config LEDS_TI_LMU_COMMON + tristate "LED driver for TI LMU"what does LMU mean?
Lighting management unit it is defined in the DT documentation
Quoted 9 lines
drivers/leds/Kconfig config LEDS_NIC78BX · line 785
Quoted 6 lines
drivers/leds/Kconfig +5
-0+ depends on REGMAP + help + Say Y to enable the LED driver for TI LMU devices. + This supports common features between the TI LM3532, LM3631, LM3632, + LM3633, LM3695 and LM3697.Fix help indentation above to use tab + 2 spaces consistently.
UGH I wish I had this comment 2 weeks ago.
But I can fix it
Dan
Quoted 6 lines
drivers/leds/Kconfig config LEDS_NIC78BX · line 788
Quoted 2 lines
drivers/leds/Kconfig +0
-0comment "LED Triggers" source "drivers/leds/trigger/Kconfig"thanks.
Re: [PATCH v3 4/7] leds: TI LMU: Add common code for TI LMU devices
Quoted 29 lines · Dan Murphy
Randy
Quoted 9 lines · Randy Dunlap
Quoted 8 lines · Dan Murphy
drivers/leds/Kconfig +0
-0@@ -776,6 +776,14 @@ config LEDS_NIC78BX To compile this driver as a module, choose M here: the module will be called leds-nic78bx.Quoted 4 lines
drivers/leds/Kconfig config LEDS_NIC78BX · line 780
Quoted 2 lines
drivers/leds/Kconfig +2
-0+config LEDS_TI_LMU_COMMON + tristate "LED driver for TI LMU"what does LMU mean?
Lighting management unit it is defined in the DT documentation
Quoted 9 lines
drivers/leds/Kconfig config LEDS_NIC78BX · line 785
Quoted 6 lines
drivers/leds/Kconfig +5
-0+ depends on REGMAP + help + Say Y to enable the LED driver for TI LMU devices. + This supports common features between the TI LM3532, LM3631, LM3632, + LM3633, LM3695 and LM3697.Fix help indentation above to use tab + 2 spaces consistently.
Quoted 2 lines
UGH I wish I had this comment 2 weeks ago.
But I can fix it
I will amend this while merging, no need to resend.
Signature · 2 lines
Best regards, Jacek Anaszewski
Re: [PATCH v3 4/7] leds: TI LMU: Add common code for TI LMU devices
Jacek
Quoted 26 lines · Jacek Anaszewski
Quoted 25 lines · Dan Murphy
Randy
Quoted 12 lines · Randy Dunlap
Quoted 9 lines · Dan Murphy
drivers/leds/Kconfig +0
-0@@ -776,6 +776,14 @@ config LEDS_NIC78BXTo compile this driver as a module, choose M here: the module will be called leds-nic78bx.
+configLEDS_TI_LMU_COMMON
+ tristate "LED driver for TI LMU"what does LMU mean?
Lighting management unit it is defined in the DT documentation
Quoted 7 lines
Quoted 6 lines
+ depends on REGMAP
+ help
+ Say Y to enable the LED driver for TI LMU devices.
+ This supports common features between the TI LM3532, LM3631, LM3632, + LM3633, LM3695 and LM3697.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Fix help indentation above to use tab + 2 spaces consistently.
UGH I wish I had this comment 2 weeks ago.
But I can fix itI will amend this while merging, no need to resend.
Thank you. I will wait to rebase/repost the LM36274 patchset until after the this series is merged.
Honestly the only change to the LM36274 patchset is adding Rob's RB to the dt patches and rebasing the Kconfig.
Dan
PATCH v3 5/7 dt-bindings: ti-lmu: Modify dt bindings for the LM3697
In reply to Dan MurphyThe LM3697 is a single function LED driver. The single function LED driver needs to reside in the LED directory as a dedicated LED driver and not as a MFD device. The device does have common brightness and ramp features and those can be accomodated by a TI LMU framework.
The LM3697 dt binding needs to be moved from the ti-lmu.txt and a dedicated LED dt binding needs to be added. The new LM3697 LED dt binding will then reside in the Documentation/devicetree/bindings/leds directory and follow the current LED and general bindings guidelines.
---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058762/
v2 - Made changes to reference ti,brightness-resolution to the ti-lmu.txt -
https://lore.kernel.org/patchwork/patch/1054501/
.../devicetree/bindings/leds/leds-lm3697.txt | 73 +++++++++++++++++++ .../devicetree/bindings/mfd/ti-lmu.txt | 27 +------ 2 files changed, 74 insertions(+), 26 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3697.txt
Documentation/devicetree/bindings/leds/leds-lm3697.txt new file +73 -0
@@ -0,0 +1,73 @@ +* Texas Instruments - LM3697 Highly Efficient White LED Driver + +The LM3697 11-bit LED driver provides high- +performance backlight dimming for 1, 2, or 3 series +LED strings while delivering up to 90% efficiency. + +This device is suitable for display and keypad Lighting + +Required properties: + - compatible: + "ti,lm3697" + - reg : I2C slave address + - #address-cells : 1 + - #size-cells : 0 + +Optional properties: + - enable-gpios : GPIO pin to enable/disable the device + - vled-supply : LED supply + +Required child properties: + - reg : 0 - LED is Controlled by bank A + 1 - LED is Controlled by bank B + - led-sources : Indicates which HVLED string is associated to which + control bank. This is a zero based property so + HVLED1 = 0, HVLED2 = 1, HVLED3 = 2. + Additional information is contained + in Documentation/devicetree/bindings/leds/common.txt + +Optional child properties: + - ti,brightness-resolution - see Documentation/devicetree/bindings/mfd/ti-lmu.txt + - ramp-up-ms: see Documentation/devicetree/bindings/mfd/ti-lmu.txt + - ramp-down-ms: see Documentation/devicetree/bindings/mfd/ti-lmu.txt + - label : see Documentation/devicetree/bindings/leds/common.txt + - linux,default-trigger : + see Documentation/devicetree/bindings/leds/common.txt + +Example: + +HVLED string 1 and 3 are controlled by control bank A and HVLED 2 string is +controlled by control bank B. + +led-controller@36 { + compatible = "ti,lm3697"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x36>; + + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + vled-supply = <&vbatt>; + + led@0 { + reg = <0>; + led-sources = <0 2>; + ti,brightness-resolution = <2047>; + ramp-up-ms = <5000>; + ramp-down-ms = <1000>; + label = "white:first_backlight_cluster"; + linux,default-trigger = "backlight"; + }; + + led@1 { + reg = <1>; + led-sources = <1>; + ti,brightness-resolution = <255>; + ramp-up-ms = <500>; + ramp-down-ms = <1000>; + label = "white:second_backlight_cluster"; + linux,default-trigger = "backlight"; + }; +} + +For more product information please see the link below: +http://www.ti.com/lit/ds/symlink/lm3697.pdf
Documentation/devicetree/bindings/mfd/ti-lmu.txt +1 -26
@@ -8,7 +8,6 @@ TI LMU driver supports lighting devices below. LM3632 Backlight and regulator LM3633 Backlight, LED and fault monitor LM3695 Backlight - LM3697 Backlight and fault monitor Required properties: - compatible: Should be one of:
@@ -16,11 +15,10 @@ Required properties: "ti,lm3632" "ti,lm3633" "ti,lm3695" - "ti,lm3697" - reg: I2C slave address. 0x11 for LM3632 0x29 for LM3631 - 0x36 for LM3633, LM3697 + 0x36 for LM3633 0x63 for LM3695 Optional property:
@@ -51,7 +49,6 @@ Optional nodes: Required properties: - compatible: Should be one of: "ti,lm3633-fault-monitor" - "ti,lm3697-fault-monitor" - leds: LED properties for LM3633. Please refer to [2]. - regulators: Regulator properties for LM3631 and LM3632. Please refer to [3].
@@ -216,25 +213,3 @@ lm3695@63 { }; }; }; - -lm3697@36 { - compatible = "ti,lm3697"; - reg = <0x36>; - - enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>; - - backlight { - compatible = "ti,lm3697-backlight"; - - lcd { - ti,brightness-resolution = <255>; - led-sources = <0 1 2>; - ramp-up-ms = <200>; - ramp-down-ms = <200>; - }; - }; - - fault-monitor { - compatible = "ti,lm3697-fault-monitor"; - }; -};
Signature · 1 line
2.21.0.5.gaeb582a983
Re: [PATCH v3 5/7] dt-bindings: ti-lmu: Modify dt bindings for the LM3697
Quoted 30 lines · Dan Murphy
The LM3697 is a single function LED driver. The single function LED driver needs to reside in the LED directory as a dedicated LED driver and not as a MFD device. The device does have common brightness and ramp features and those can be accomodated by a TI LMU framework.
The LM3697 dt binding needs to be moved from the ti-lmu.txt and a dedicated LED dt binding needs to be added. The new LM3697 LED dt binding will then reside in the
Documentation/devicetree/bindings/ledsdirectory and follow the current LED and general bindings guidelines.Reviewed-by Rob Herring <[email protected]>Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058762/
v2 - Made changes to reference ti,brightness-resolution to the ti-lmu.txt -
https://lore.kernel.org/patchwork/patch/1054501/.../devicetree/bindings/leds/leds-lm3697.txt | 73 +++++++++++++++++++ .../devicetree/bindings/mfd/ti-lmu.txt | 27 +------ 2 files changed, 74 insertions(+), 26 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3697.txtDocumentation/devicetree/bindings/leds/leds-lm3697.txt new file +0
-0
Documentation/devicetree/bindings/leds/leds-lm3697.txt line 7
Quoted 7 lines
Documentation/devicetree/bindings/leds/leds-lm3697.txt new file +7
-0@@ -0,0 +1,73 @@ +* Texas Instruments - LM3697 Highly Efficient White LED Driver + +The LM3697 11-bit LED driver provides high- +performance backlight dimming for 1, 2, or 3 series +LED strings while delivering up to 90% efficiency. + +This device is suitable for display and keypad Lighting
"lightning."
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH v3 5/7] dt-bindings: ti-lmu: Modify dt bindings for the LM3697
Quoted 25 lines · Pavel Machek
Quoted 24 lines · Dan Murphy
The LM3697 is a single function LED driver. The single function LED driver needs to reside in the LED directory as a dedicated LED driver and not as a MFD device. The device does have common brightness and ramp features and those can be accomodated by a TI LMU framework.
The LM3697 dt binding needs to be moved from the ti-lmu.txt and a dedicated LED dt binding needs to be added. The new LM3697 LED dt binding will then reside in the
Documentation/devicetree/bindings/ledsdirectory and follow the current LED and general bindings guidelines.Reviewed-by Rob Herring <[email protected]>Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058762/
v2 - Made changes to reference ti,brightness-resolution to the ti-lmu.txt -
https://lore.kernel.org/patchwork/patch/1054501/.../devicetree/bindings/leds/leds-lm3697.txt | 73 +++++++++++++++++++ .../devicetree/bindings/mfd/ti-lmu.txt | 27 +------ 2 files changed, 74 insertions(+), 26 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3697.txt
Quoted 15 lines
Documentation/devicetree/bindings/leds/leds-lm3697.txt line 7
Quoted 13 lines
Documentation/devicetree/bindings/leds/leds-lm3697.txt new file +7
-0@@ -0,0 +1,73 @@ +* Texas Instruments - LM3697 Highly Efficient White LED Driver + +The LM3697 11-bit LED driver provides high- +performance backlight dimming for 1, 2, or 3 series +LED strings while delivering up to 90% efficiency. + +This device is suitable for display and keypad Lighting"lightning."
Heh. Don't think you meant lightning but I get what you are saying
s/Lighting/lighting
Dan
Quoted 2 lines
Pavel
Re: [PATCH v3 5/7] dt-bindings: ti-lmu: Modify dt bindings for the LM3697
Quoted 44 lines · Dan Murphy
Quoted 25 lines · Pavel Machek
Quoted 24 lines · Dan Murphy
The LM3697 is a single function LED driver. The single function LED driver needs to reside in the LED directory as a dedicated LED driver and not as a MFD device. The device does have common brightness and ramp features and those can be accomodated by a TI LMU framework.
The LM3697 dt binding needs to be moved from the ti-lmu.txt and a dedicated LED dt binding needs to be added. The new LM3697 LED dt binding will then reside in the
Documentation/devicetree/bindings/ledsdirectory and follow the current LED and general bindings guidelines.Reviewed-by Rob Herring <[email protected]>Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes added Reviewed-by Rob - https://lore.kernel.org/patchwork/patch/1058762/
v2 - Made changes to reference ti,brightness-resolution to the ti-lmu.txt -
https://lore.kernel.org/patchwork/patch/1054501/.../devicetree/bindings/leds/leds-lm3697.txt | 73 +++++++++++++++++++ .../devicetree/bindings/mfd/ti-lmu.txt | 27 +------ 2 files changed, 74 insertions(+), 26 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3697.txtQuoted 15 lines
Documentation/devicetree/bindings/leds/leds-lm3697.txt line 7
Quoted 13 lines
Documentation/devicetree/bindings/leds/leds-lm3697.txt new file +7
-0@@ -0,0 +1,73 @@ +* Texas Instruments - LM3697 Highly Efficient White LED Driver + +The LM3697 11-bit LED driver provides high- +performance backlight dimming for 1, 2, or 3 series +LED strings while delivering up to 90% efficiency. + +This device is suitable for display and keypad Lighting"lightning."
Quoted 3 lines
Heh. Don't think you meant lightning but I get what you are saying
s/Lighting/lighting
Yep. Sorry :-). Plus I'd add a dot (".") at the end of sentence.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v3 6/7 mfd: ti-lmu: Remove support for LM3697
In reply to Dan MurphyRemove support for the LM3697 from the ti-lmu driver in favor of a dedicated LED driver.
---
v3 - No changes - https://lore.kernel.org/patchwork/patch/1058760/
v2 - Fixed commit message LF, removed leds/Kconfig from patch. -
https://lore.kernel.org/patchwork/patch/1054502/
drivers/mfd/Kconfig | 2 +- drivers/mfd/ti-lmu.c | 17 ----------- include/linux/mfd/ti-lmu-register.h | 44 ----------------------------- include/linux/mfd/ti-lmu.h | 1 - 4 files changed, 1 insertion(+), 63 deletions(-)
drivers/mfd/Kconfig +1 -1
@@ -1312,7 +1312,7 @@ config MFD_TI_LMU help Say yes here to enable support for TI LMU chips. - TI LMU MFD supports LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697. + TI LMU MFD supports LM3532, LM3631, LM3632, LM3633, and LM3695. It consists of backlight, LED and regulator driver. It provides consistent device controls for lighting functions.
drivers/mfd/ti-lmu.c +0 -17
@@ -111,20 +111,6 @@ static const struct mfd_cell lm3695_devices[] = { }, }; -static const struct mfd_cell lm3697_devices[] = { - { - .name ="ti-lmu-backlight" , - .id =LM3697 , - .of_compatible ="ti,lm3697-backlight" , - }, -/* Monitoring driver for open/short circuit detection */ - { - .name ="ti-lmu-fault-monitor" , - .id =LM3697 , - .of_compatible ="ti,lm3697-fault-monitor" , - }, -}; -#define TI_LMU_DATA (chip, max_reg) \ static const struct ti_lmu_data chip##_data = \ { \
@@ -137,7 +123,6 @@ TI_LMU_DATA(lm3631, LM3631_MAX_REG);TI_LMU_DATA (lm3632,LM3632_MAX_REG );TI_LMU_DATA (lm3633,LM3633_MAX_REG );TI_LMU_DATA (lm3695,LM3695_MAX_REG ); -TI_LMU_DATA (lm3697,LM3697_MAX_REG );static int ti_lmu_probe (struct i2c_client *cl,const struct i2c_device_id *id) {
@@ -206,7 +191,6 @@ static const struct of_device_id ti_lmu_of_match[] = { { .compatible = "ti,lm3632", .data = &lm3632_data }, { .compatible = "ti,lm3633", .data = &lm3633_data }, { .compatible = "ti,lm3695", .data = &lm3695_data }, - { .compatible = "ti,lm3697", .data = &lm3697_data }, { } };MODULE_DEVICE_TABLE (of, ti_lmu_of_match);
@@ -216,7 +200,6 @@ static const struct i2c_device_id ti_lmu_ids[] = { { "lm3632", LM3632 }, { "lm3633", LM3633 }, { "lm3695", LM3695 }, - { "lm3697", LM3697 }, { } };MODULE_DEVICE_TABLE (i2c, ti_lmu_ids);
include/linux/mfd/ti-lmu-register.h +0 -44
48 lines not on this page · raw message
include/linux/mfd/ti-lmu.h +0 -1
@@ -26,7 +26,6 @@ enum ti_lmu_id {LM3632 ,LM3633 ,LM3695 , -LM3697 , LMU_MAX_ID, };
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v3 7/7 leds: lm3697: Introduce the lm3697 driver
In reply to Dan MurphyIntroduce the lm3697 LED driver for backlighting and display.
Datasheet location:
http://www.ti.com/lit/ds/symlink/lm3697.pdf
---
v3 - Moved TI_COMMON_LMU flag above LM3697 flag for inheritance also fixed removed REGMAP dependency - v1 comments https://lore.kernel.org/patchwork/patch/1054503/
v2 comments https://lore.kernel.org/patchwork/patch/1058761/
v2 - Made changes to get max_brightness from ti_lmu common code, fixed commit message extra LF otherwise no additional changes - https://lore.kernel.org/patchwork/patch/1054503/
drivers/leds/Kconfig | 7 + drivers/leds/Makefile | 1 + drivers/leds/leds-lm3697.c | 395 +++++++++++++++++++++++++++++++++++++ 3 files changed, 403 insertions(+) create mode 100644 drivers/leds/leds-lm3697.c
drivers/leds/Kconfig +7 -0
@@ -784,6 +784,13 @@ config LEDS_TI_LMU_COMMON This supports common features between the TI LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697. +config LEDS_LM3697 + tristate "LED driver for LM3697" + depends on LEDS_TI_LMU_COMMON + help + Say Y to enable the LM3697 LED driver for TI LMU devices. + This supports the LED device LM3697. + comment "LED Triggers" source "drivers/leds/trigger/Kconfig"
drivers/leds/Makefile +1 -0
@@ -80,6 +80,7 @@ obj-$(CONFIG_LEDS_MT6323) += leds-mt6323.o obj-$(CONFIG_LEDS_LM3692X) += leds-lm3692x.o obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o obj-$(CONFIG_LEDS_LM3601X) += leds-lm3601x.o +obj-$(CONFIG_LEDS_LM3697) += leds-lm3697.o obj-$(CONFIG_LEDS_TI_LMU_COMMON) += ti-lmu-led-common.o # LED SPI Drivers
drivers/leds/leds-lm3697.c new file +395 -0
395 lines not on this page · raw message
Signature · 1 line
2.21.0.5.gaeb582a983
Hi Lee,
This patch set has dependency on the previous one for lm3532, which also touches ti-lmu.txt bindings, and for which I already created immutable branch. Now if I created another immutable branch for this patch set we would have to resolve conflicts between the two, as they would both be based on 5.1-rc1. Adds much overhead and is error prone. Therefore I propose to apply this patch set on top of my merge of LED tree with the immutable branch for lm3532.
Please let me know if you see it differently. I'll wait for your response until Friday, and then proceed with the above as I think it should be harmless for MFD.
Best regards,
Jacek Anaszewski
Quoted 33 lines · Dan Murphy
Hello
I have added the Reviewed-by for dt bindings as well as made the
Kconfigchange pointed out for the common code flagDan
Dan Murphy (7):
dt-bindings: mfd: LMU: Fix lm3632 dt binding example
dt-bindings: mfd: LMU: Add the ramp up/down property
dt-bindings: mfd: LMU: Add ti,brightness-resolution
leds: TI LMU: Add common code for TI LMU devices
dt-bindings: ti-lmu: Modify dt bindings for the LM3697
mfd: ti-lmu: Remove support for LM3697
leds: lm3697: Introduce the lm3697 driver.../devicetree/bindings/leds/leds-lm3697.txt | 73 ++++ .../devicetree/bindings/mfd/ti-lmu.txt | 56 ++- drivers/leds/Kconfig | 15 + drivers/leds/Makefile | 2 + drivers/leds/leds-lm3697.c | 395 ++++++++++++++++++ drivers/leds/ti-lmu-led-common.c | 155 +++++++ drivers/mfd/Kconfig | 2 +- drivers/mfd/ti-lmu.c | 17 - include/linux/mfd/ti-lmu-register.h | 44 -- include/linux/mfd/ti-lmu.h | 1 - include/linux/ti-lmu-led-common.h | 47 +++ 11 files changed, 712 insertions(+), 95 deletions(-)create mode 100644
Documentation/devicetree/bindings/leds/leds-lm3697.txtcreate mode 100644drivers/leds/leds-lm3697.c
create mode 100644drivers/leds/ti-lmu-led-common.c
create mode 100644include/linux/ti-lmu-led-common.h
Ekhm, I forgot to add the main recipient.
Adding Lee.
Quoted 53 lines · Jacek Anaszewski
Hi Lee,
This patch set has dependency on the previous one for lm3532, which also touches ti-lmu.txt bindings, and for which I already created immutable branch. Now if I created another immutable branch for this patch set we would have to resolve conflicts between the two, as they would both be based on 5.1-rc1. Adds much overhead and is error prone. Therefore I propose to apply this patch set on top of my merge of LED tree with the immutable branch for lm3532.
Please let me know if you see it differently. I'll wait for your response until Friday, and then proceed with the above as I think it should be harmless for MFD.
Best regards,
Jacek AnaszewskiQuoted 33 lines · Dan Murphy
Hello
I have added the Reviewed-by for dt bindings as well as made the
Kconfigchange pointed out for the common code flagDan
Dan Murphy (7):
dt-bindings: mfd: LMU: Fix lm3632 dt binding example
dt-bindings: mfd: LMU: Add the ramp up/down property
dt-bindings: mfd: LMU: Add ti,brightness-resolution
leds: TI LMU: Add common code for TI LMU devices
dt-bindings: ti-lmu: Modify dt bindings for the LM3697
mfd: ti-lmu: Remove support for LM3697
leds: lm3697: Introduce the lm3697 driver.../devicetree/bindings/leds/leds-lm3697.txt | 73 ++++ .../devicetree/bindings/mfd/ti-lmu.txt | 56 ++- drivers/leds/Kconfig | 15 + drivers/leds/Makefile | 2 + drivers/leds/leds-lm3697.c | 395 ++++++++++++++++++ drivers/leds/ti-lmu-led-common.c | 155 +++++++ drivers/mfd/Kconfig | 2 +- drivers/mfd/ti-lmu.c | 17 - include/linux/mfd/ti-lmu-register.h | 44 -- include/linux/mfd/ti-lmu.h | 1 - include/linux/ti-lmu-led-common.h | 47 +++
11 files changed, 712 insertions(+), 95 deletions(-)create mode 100644
Documentation/devicetree/bindings/leds/leds-lm3697.txtcreate mode 100644drivers/leds/leds-lm3697.c
create mode 100644drivers/leds/ti-lmu-led-common.c
create mode 100644include/linux/ti-lmu-led-common.h
Signature · 2 lines
Best regards, Jacek Anaszewski
Quoted 18 lines · Jacek Anaszewski
Ekhm, I forgot to add the main recipient.
Adding Lee.
Quoted 13 lines · Jacek Anaszewski
Hi Lee,
This patch set has dependency on the previous one for lm3532, which also touches ti-lmu.txt bindings, and for which I already created immutable branch. Now if I created another immutable branch for this patch set we would have to resolve conflicts between the two, as they would both be based on 5.1-rc1. Adds much overhead and is error prone. Therefore I propose to apply this patch set on top of my merge of LED tree with the immutable branch for lm3532.
Please let me know if you see it differently. I'll wait for your response until Friday, and then proceed with the above as I think it should be harmless for MFD.
Looks like this set wasn't sent until -rc6 which is when I normally stop applying significant patches. I think it's best that we wait until the next rotation. That way all this dependency related hoop-jumping just goes away.
Quoted 39 lines
Quoted 38 lines · Dan Murphy
Quoted 35 lines
Hello
I have added the Reviewed-by for dt bindings as well as made the
Kconfigchange
pointed out for the common code flagDan
Dan Murphy (7):
dt-bindings: mfd: LMU: Fix lm3632 dt binding example
dt-bindings: mfd: LMU: Add the ramp up/down property
dt-bindings: mfd: LMU: Add ti,brightness-resolution
leds: TI LMU: Add common code for TI LMU devices
dt-bindings: ti-lmu: Modify dt bindings for the LM3697
mfd: ti-lmu: Remove support for LM3697
leds: lm3697: Introduce the lm3697 driver.../devicetree/bindings/leds/leds-lm3697.txt | 73 ++++ .../devicetree/bindings/mfd/ti-lmu.txt | 56 ++- drivers/leds/Kconfig | 15 + drivers/leds/Makefile | 2 + drivers/leds/leds-lm3697.c | 395 ++++++++++++++++++ drivers/leds/ti-lmu-led-common.c | 155 +++++++ drivers/mfd/Kconfig | 2 +- drivers/mfd/ti-lmu.c | 17 - include/linux/mfd/ti-lmu-register.h | 44 -- include/linux/mfd/ti-lmu.h | 1 - include/linux/ti-lmu-led-common.h | 47 +++
11 files changed, 712 insertions(+), 95 deletions(-)create mode 100644
Documentation/devicetree/bindings/leds/leds-lm3697.txtcreate mode 100644drivers/leds/leds-lm3697.ccreate mode 100644drivers/leds/ti-lmu-led-common.ccreate mode 100644include/linux/ti-lmu-led-common.h
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog