TI LMU and Dedicated Drivers
Subsystems (3)
v2 cover TI LMU and Dedicated Drivers
All
The following v2 patchset has been debugged and updated to support the LM3697, LM3632 and LM3633. The TI LMU common code has been used and can be extended where need be. If this approach is acceptable I will make code changes based on review and submit v3 with additional bindings updates for full review and merge.
These 3 LED drivers should be functional to provide basic lighting experiences. Other features like PWM support will be included later and maybe part of the common code.
I usually list all the deltas in my patch sets but due to the major rip in the drivers I would repeat myself just saying that there are too many changes to list.
Dan
Dan Murphy (8):
dt-bindings: ti-lmu: Remove LM3697
mfd: ti-lmu: Remove support for LM3697
dt-bindings: leds: Add bindings for lm3697 driver
leds: lm3697: Introduce the lm3697 driver
dt-bindings: leds: Add support for the LM3633
leds: lm3633: Introduce the lm3633 driver
dt-bindings: leds: Add the LM3632 LED dt binding
leds: lm3632: Introduce the TI LM3632 driver
Pavel Machek (1):
leds: add TI LMU backlight driver
.../devicetree/bindings/leds/leds-lm3632.txt | 53 ++ .../devicetree/bindings/leds/leds-lm3633.txt | 102 +++ .../devicetree/bindings/leds/leds-lm3697.txt | 98 +++ .../devicetree/bindings/mfd/ti-lmu.txt | 26 +- drivers/leds/Kconfig | 30 + drivers/leds/Makefile | 4 + drivers/leds/leds-lm3632.c | 646 ++++++++++++++++++ drivers/leds/leds-lm3633.c | 557 +++++++++++++++ drivers/leds/leds-lm3697.c | 382 +++++++++++ drivers/leds/ti-lmu-led-common.c | 138 ++++ drivers/leds/ti-lmu-led-common.h | 54 ++ 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 - 15 files changed, 2066 insertions(+), 88 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3632.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3697.txt create mode 100644 drivers/leds/leds-lm3632.c create mode 100644 drivers/leds/leds-lm3633.c create mode 100644 drivers/leds/leds-lm3697.c create mode 100644 drivers/leds/ti-lmu-led-common.c create mode 100644 drivers/leds/ti-lmu-led-common.h
Signature · 1 line
2.19.0
RFC PATCH v2 1/9 leds: add TI LMU backlight driver
From: Pavel Machek <[email protected]>
This adds backlight support for the following TI LMU
chips: LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697.
It controls LEDs on Droid 4
smartphone, including keyboard and screen backlights.
[add LED subsystem support for keyboard backlight and rework DT binding according to Rob Herrings feedback]
--- drivers/leds/Kconfig | 8 ++ drivers/leds/Makefile | 1 + drivers/leds/ti-lmu-led-common.c | 138 +++++++++++++++++++++++++++++++ drivers/leds/ti-lmu-led-common.h | 54 ++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 drivers/leds/ti-lmu-led-common.c create mode 100644 drivers/leds/ti-lmu-led-common.h
drivers/leds/Kconfig +8 -0
@@ -756,6 +756,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
@@ -78,6 +78,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 +138 -0
138 lines not on this page · raw message
drivers/leds/ti-lmu-led-common.h new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
2.19.0
RFC PATCH v2 2/9 dt-bindings: ti-lmu: Remove LM3697
In reply to Dan MurphyRemove support for the LM3697 LED device
from the ti-lmu. The LM3697 will be supported
via a stand alone LED driver.
--- .../devicetree/bindings/mfd/ti-lmu.txt | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-)
Documentation/devicetree/bindings/mfd/ti-lmu.txt +1 -25
@@ -9,7 +9,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:
@@ -18,11 +17,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 0x38 for LM3532 0x63 for LM3695
@@ -38,7 +36,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].
@@ -220,24 +217,3 @@ lm3695@63 { }; }; }; - -lm3697@36 { - compatible = "ti,lm3697"; - reg = <0x36>; - - enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>; - - backlight { - compatible = "ti,lm3697-backlight"; - - lcd { - led-sources = <0 1 2>; - ramp-up-msec = <200>; - ramp-down-msec = <200>; - }; - }; - - fault-monitor { - compatible = "ti,lm3697-fault-monitor"; - }; -};
Signature · 1 line
2.19.0
RFC PATCH v2 3/9 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.
--- 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
@@ -1293,7 +1293,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
@@ -128,20 +128,6 @@ static struct mfd_cell lm3695_devices[] = { }, }; -static 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 = \ { \
@@ -155,7 +141,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 const struct of_device_id ti_lmu_of_match[] = { { .compatible ="ti,lm3532" , .data = &lm3532_data },
@@ -163,7 +148,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);
@@ -237,7 +221,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.19.0
RFC PATCH v2 4/9 dt-bindings: leds: Add bindings for lm3697 driver
In reply to Dan MurphyAdd the device tree bindings for the lm3697
LED driver for backlighting and display.
--- .../devicetree/bindings/leds/leds-lm3697.txt | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3697.txt
Documentation/devicetree/bindings/leds/leds-lm3697.txt new file +98 -0
@@ -0,0 +1,98 @@ +* 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. Each element in the array is associated + with a specific HVLED string. Element 0 is HVLED1, + element 1 is HVLED2 and element 2 HVLED3. + Additional information is contained + in Documentation/devicetree/bindings/leds/common.txt + 0 - HVLED is not active in this control bank + 1 - HVLED string is controlled by this control bank + +Optional child properties: + - runtime-ramp-up-msec: Current ramping from one brightness level to + the a higher brightness level. + Range from 2048 us - 117.44 s + - runtime-ramp-down-msec: Current ramping from one brightness level to + the a lower brightness level. + Range from 2048 us - 117.44 s + - 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"; + reg = <0x36>; + #address-cells = <1>; + #size-cells = <0>; + + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + vled-supply = <&vbatt>; + + led@0 { + reg = <0>; + led-sources = <1 0 1>; + runtime-ramp-up-msec = <5000>; + runtime-ramp-down-msec = <1000>; + label = "white:first_backlight_cluster"; + linux,default-trigger = "backlight"; + }; + + led@1 { + reg = <1>; + led-sources = <0 1 0>; + runtime-ramp-up-msec = <500>; + runtime-ramp-down-msec = <1000>; + label = "white:second_backlight_cluster"; + linux,default-trigger = "backlight"; + }; +} + +All HVLED strings controlled by control bank A + +led-controller@36 { + compatible = "ti,lm3697"; + reg = <0x36>; + #address-cells = <1>; + #size-cells = <0>; + + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + vled-supply = <&vbatt>; + + led@0 { + reg = <0>; + led-sources = <1 1 1>; + runtime-ramp-up-msec = <500>; + runtime-ramp-down-msec = <1000>; + label = "white:backlight_cluster"; + linux,default-trigger = "backlight"; + }; +} + +For more product information please see the link below: +http://www.ti.com/lit/ds/symlink/lm3697.pdf
Signature · 1 line
2.19.0
RFC PATCH v2 5/9 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
--- drivers/leds/Kconfig | 8 +- drivers/leds/Makefile | 1 + drivers/leds/leds-lm3697.c | 382 +++++++++++++++++++++++++++++++++++++ 3 files changed, 390 insertions(+), 1 deletion(-) create mode 100644 drivers/leds/leds-lm3697.c
drivers/leds/Kconfig +7 -1
@@ -756,9 +756,15 @@ config LEDS_NIC78BX To compile this driver as a module, choose M here: the module will be called leds-nic78bx. +config LEDS_LM3697 + tristate "LED driver for LM3697" + depends on LEDS_TI_LMU_COMMON + help + Say Y to enable the LED driver for TI LMU devices. + This supports the LED device LM3697. + 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,
drivers/leds/Makefile +1 -0
@@ -78,6 +78,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 +382 -0
382 lines not on this page · raw message
Signature · 1 line
2.19.0
RFC PATCH v2 6/9 dt-bindings: leds: Add support for the LM3633
In reply to Dan MurphyAdd support for the TI LM3633 LED driver.
This device has 9 control banks 3 high voltage
LED channels and 6 low voltage LED channels.
Data sheet:
http://www.ti.com/lit/ds/symlink/lm3633.pdf
--- .../devicetree/bindings/leds/leds-lm3633.txt | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt
Documentation/devicetree/bindings/leds/leds-lm3633.txt new file +102 -0
@@ -0,0 +1,102 @@ +* Texas Instruments - LM3633 Lighting Power Solution for Smartphone Handsets + +The LM3633 is a complete power source for +backlight, keypad, and indicator LEDs in smartphone +handsets. + +This device is suitable for display and keypad Lighting + +Required properties: + - compatible: + "ti,lm3633" + - 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 - HVLED is Controlled by bank A + 1 - HVLED is Controlled by bank B + 2,3,4 - LVLED1, 2 and 3 are Controlled by bank C, D and E + 5,6,7 - LVLED4, 5 and 6 are Controlled by bank F, G and H + - led-sources : Indicates which LED string is associated to which + control bank. + 0 - LED is not active in this control bank + 1 - LED string is controlled by this control bank + +Optional child properties: + - runtime-ramp-up-msec: Current ramping from one brightness level to + the a higher brightness level. + Range from 2048 us - 117.44 s + - runtime-ramp-down-msec: Current ramping from one brightness level to + the a lower brightness level. + Range from 2048 us - 117.44 s + - label : see Documentation/devicetree/bindings/leds/common.txt + - linux,default-trigger : + see Documentation/devicetree/bindings/leds/common.txt + +Example: +Control bank C output to 3 LVLEDs and Control F, G and H have independent +controls of the LVLEDs. + +led-controller@36 { + compatible = "ti,lm3633"; + reg = <0x36>; + #address-cells = <1>; + #size-cells = <0>; + + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + led@0 { + reg = <0>; + led-sources = < 1 0 1 >; + label = "white:backlight"; + ramp-up-ms = <100000>; + ramp-down-ms = <1000>; + linux,default-trigger = "backlight"; + }; + + led@1 { + reg = <1>; + led-sources = < 0 1 0 >; + label = "white:light"; + ramp-up-ms = <100000>; + ramp-down-ms = <1000>; + }; + + led@2 { + reg = <2>; + led-sources = <1>; + ramp-up-ms = <100000>; + ramp-down-ms = <1000>; + label = "white:indicator1"; + }; + + led@5 { + reg = <5>; + led-sources = <1>; + ramp-up-ms = <100000>; + ramp-down-ms = <1000>; + label = "red:light"; + }; + + led@6 { + reg = <6>; + led-sources = <1>; + ramp-up-ms = <41940>; + ramp-down-ms = <1000>; + label = "green:light"; + }; + + led@7 { + reg = <7>; + led-sources = <1>; + ramp-up-ms = <100000>; + ramp-down-ms = <1000>; + label = "blue:light"; + }; +}; +For more product information please see the link below: +http://www.ti.com/lit/ds/symlink/lm3633.pdf
Signature · 1 line
2.19.0
RFC PATCH v2 7/9 leds: lm3633: Introduce the lm3633 driver
In reply to Dan MurphyIntroduce the LED LM3633 driver. This LED
driver has 9 total LED outputs with runtime
internal ramp configurations.
Data sheet:
http://www.ti.com/lit/ds/symlink/lm3633.pdf
--- drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-lm3633.c | 557 +++++++++++++++++++++++++++++++++++++ 3 files changed, 566 insertions(+) create mode 100644 drivers/leds/leds-lm3633.c
drivers/leds/Kconfig +8 -0
@@ -763,8 +763,16 @@ config LEDS_LM3697 Say Y to enable the LED driver for TI LMU devices. This supports the LED device LM3697. +config LEDS_LM3633 + tristate "LED driver for LM3633" + depends on LEDS_TI_LMU_COMMON + help + Say Y to enable the LED driver for TI LMU devices. + This supports the LED device LM3633. + 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,
drivers/leds/Makefile +1 -0
@@ -79,6 +79,7 @@ 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_LM3633) += leds-lm3633.o obj-$(CONFIG_LEDS_TI_LMU_COMMON) += ti-lmu-led-common.o # LED SPI Drivers
drivers/leds/leds-lm3633.c new file +557 -0
557 lines not on this page · raw message
Signature · 1 line
2.19.0
RFC PATCH v2 8/9 dt-bindings: leds: Add the LM3632 LED dt binding
In reply to Dan MurphyAdd the TI LM3632 LED binding.
--- .../devicetree/bindings/leds/leds-lm3632.txt | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3632.txt
Documentation/devicetree/bindings/leds/leds-lm3632.txt new file +53 -0
@@ -0,0 +1,53 @@ +* Texas Instruments - lm3632 Single-Chip Backlight and 1.5-A Flash LED Driver + +The LM3632A integrates LED drivers for both +the backlight of the LCD panel and the camera flash +along with the bias power for the LCD panel into one +device. + +Required properties: + - compatible : Can be one of the following + "ti,lm3632" + - reg : I2C slave address + - #address-cells : 1 + - #size-cells : 0 + +Required child properties: + - reg : 0 - Indicates a backlight mode + 1 - Indicates a Torch/Strobe (white LED) mode + +Required properties for flash LED child nodes: + See Documentation/devicetree/bindings/leds/common.txt + - flash-max-microamp : Range from 100mA - 1.5A + - flash-max-timeout-us : Range from 32ms - 1024ms + - led-max-microamp : Range from 25mA - 375mA + +Optional child properties: + - label : see Documentation/devicetree/bindings/leds/common.txt + - linux,default-trigger : + see Documentation/devicetree/bindings/leds/common.txt + +Example: +led-controller@11 { + compatible = "ti,lm3632"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x11>; + + led@0 { + reg = <0>; + label = "white:backlight"; + linux,default-trigger = "backlight"; + }; + + led@1 { + reg = <1>; + label = "white:torch"; + led-max-microamp = <375000>; + flash-max-microamp = <1500000>; + flash-max-timeout-us = <1000000>; + }; +} + +For more product information please see the links below: +http://www.ti.com/product/LM3632
Signature · 1 line
2.19.0
RFC PATCH v2 9/9 leds: lm3632: Introduce the TI LM3632 driver
In reply to Dan MurphyAdd the dedicated TI LM3632 LED driver. This LED device is capable of driving a backlight display.
In addition to the backlight the device has control of a strobe and torch output.
Data sheet:
http://www.ti.com/lit/ds/symlink/lm3632a.pdf
--- drivers/leds/Kconfig | 10 +- drivers/leds/Makefile | 1 + drivers/leds/leds-lm3632.c | 646 +++++++++++++++++++++++++++++++++++++ 3 files changed, 656 insertions(+), 1 deletion(-) create mode 100644 drivers/leds/leds-lm3632.c
drivers/leds/Kconfig +9 -1
@@ -764,8 +764,16 @@ config LEDS_LM3697 This supports the LED device LM3697. config LEDS_LM3633 - tristate "LED driver for LM3633" + tristate "LED driver for LM3632" depends on LEDS_TI_LMU_COMMON + help + Say Y to enable the LED driver for TI LMU devices. + This supports the LED device LM3632. + +config LEDS_LM3632 + tristate "LED driver for LM3632" + depends on LEDS_TI_LMU_COMMON + depends on LEDS_CLASS_FLASH help Say Y to enable the LED driver for TI LMU devices. This supports the LED device LM3633.
drivers/leds/Makefile +1 -0
@@ -79,6 +79,7 @@ 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_LM3632) += leds-lm3632.o obj-$(CONFIG_LEDS_LM3633) += leds-lm3633.o obj-$(CONFIG_LEDS_TI_LMU_COMMON) += ti-lmu-led-common.o
drivers/leds/leds-lm3632.c new file +646 -0
646 lines not on this page · raw message
Signature · 1 line
2.19.0
Pavel Machek
NAKRe: [RFC PATCH v2 2/9] dt-bindings: ti-lmu: Remove LM3697
In reply to Dan MurphyQuoted 5 lines · Dan Murphy
Remove support for the LM3697 LED device
from the ti-lmu. The LM3697 will be supported
via a stand alone LED driver.Signed-off-by Dan Murphy <[email protected]>
NAK, for reasons I explained before. Please add it to the patch so that it does not get applied by mistake. Ouch and AFAICT Rob was not happy with this either.
Yes, you are creating new drivers, ok; but that does _not_ mean you should create new binding.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [RFC PATCH v2 1/9] leds: add TI LMU backlight driver
In reply to Dan MurphyQuoted 8 lines · Dan Murphy
From: Pavel Machek <[email protected]>
This adds backlight support for the following TI LMU
chips: LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697.It controls LEDs on Droid 4
smartphone, including keyboard and screen backlights.
Quoted 6 lines
Signed-off-by Milo Kim <[email protected]>[add LED subsystem support for keyboard backlight and rework DT binding according to Rob Herrings feedback]
Signed-off-by Sebastian Reichel <[email protected]>[remove backlight subsystem support for now]Signed-off-by Pavel Machek <[email protected]>
So... this driver adds support for LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697 (or it did when I signed it off).
The rest of the series does not really bring any advantages (you claim it may add advantages in future). It takes code out of common driver and duplicates it.
Could we take this patch, get the basic support for LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697, and then split out the drivers when we actually gain some advantage doing so (and also when the costs are clear)?
Thanks,
Pavel
Quoted 7 lines
drivers/leds/Kconfig | 8 ++ drivers/leds/Makefile | 1 + drivers/leds/ti-lmu-led-common.c | 138 +++++++++++++++++++++++++++++++ drivers/leds/ti-lmu-led-common.h | 54 ++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 drivers/leds/ti-lmu-led-common.c create mode 100644 drivers/leds/ti-lmu-led-common.h
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [RFC PATCH v2 1/9] leds: add TI LMU backlight driver
Pavel
Quoted 16 lines · Pavel Machek
Quoted 8 lines · Dan Murphy
From: Pavel Machek <[email protected]>
This adds backlight support for the following TI LMU
chips: LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697.It controls LEDs on Droid 4
smartphone, including keyboard and screen backlights.Quoted 6 lines
Signed-off-by Milo Kim <[email protected]>[add LED subsystem support for keyboard backlight and rework DT binding according to Rob Herrings feedback]
Signed-off-by Sebastian Reichel <[email protected]>[remove backlight subsystem support for now]Signed-off-by Pavel Machek <[email protected]>
Quoted 2 lines
So... this driver adds support for LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697 (or it did when I signed it off).
Yes I have to pull these out of the patch.
Quoted 4 lines
The rest of the series does not really bring any advantages (you claim it may add advantages in future). It takes code out of common driver and duplicates it.
I disagree. Honestly using that ideallogy all LED drivers should use the common code as it is a wrapper around regmap and a few if statements.
The 3632 adds the proper LED flash class support coupled with proper backlight support. The 3633 adds the proper support for LV and HV LED support.
Duplicate code that I could find is put in the common file.
This patch set adds the LED devices as all other LED devices are added in the LED directory.
Quoted 5 lines
Could we take this patch, get the basic support for LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697, and then split out the drivers when we actually gain some advantage doing so (and also when the costs are clear)?
We have debated this over and over and now we have 3 different implementations available we need to collude on which one we want to support.
Jacek I defer to you and Pavel since you are both LED maintainers.
I can support the dedicated LED drivers but I cannot support the TI LMU only implementation.
Dan
Quoted 13 lines
Thanks,
Pavel
Quoted 7 lines
drivers/leds/Kconfig | 8 ++ drivers/leds/Makefile | 1 + drivers/leds/ti-lmu-led-common.c | 138 +++++++++++++++++++++++++++++++ drivers/leds/ti-lmu-led-common.h | 54 ++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 drivers/leds/ti-lmu-led-common.c create mode 100644 drivers/leds/ti-lmu-led-common.h
Signature · 2 lines
------------------ Dan Murphy
Re: [RFC PATCH v2 1/9] leds: add TI LMU backlight driver
Quoted 45 lines · Dan Murphy
Pavel
Quoted 16 lines · Pavel Machek
Quoted 8 lines · Dan Murphy
From: Pavel Machek <[email protected]>
This adds backlight support for the following TI LMU
chips: LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697.It controls LEDs on Droid 4
smartphone, including keyboard and screen backlights.Quoted 6 lines
Signed-off-by Milo Kim <[email protected]>[add LED subsystem support for keyboard backlight and rework DT binding according to Rob Herrings feedback]
Signed-off-by Sebastian Reichel <[email protected]>[remove backlight subsystem support for now]Signed-off-by Pavel Machek <[email protected]>Quoted 2 lines
So... this driver adds support for LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697 (or it did when I signed it off).
Yes I have to pull these out of the patch.
Quoted 4 lines
The rest of the series does not really bring any advantages (you claim it may add advantages in future). It takes code out of common driver and duplicates it.
I disagree. Honestly using that ideallogy all LED drivers should use the common code as it is a wrapper around regmap and a few if statements.
The 3632 adds the proper LED flash class support coupled with proper backlight support. The 3633 adds the proper support for LV and HV LED support.
Duplicate code that I could find is put in the common file.
This patch set adds the LED devices as all other LED devices are added in the LED directory.Quoted 5 lines
Could we take this patch, get the basic support for LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697, and then split out the drivers when we actually gain some advantage doing so (and also when the costs are clear)?
Quoted 6 lines
We have debated this over and over and now we have 3 different implementations available we need to collude on which one we want to support.
Jacek I defer to you and Pavel since you are both LED maintainers.
I can support the dedicated LED drivers but I cannot support the TI LMU only implementation.
I uphold my previous opinion - please go ahead with moving the support for non-MFD devices from MFD subsystem to the LED subsystem. And yes - along with the bindings. This is semantically correct, and yet we don't have mainline users.
Pavel - you will have to engage more people for your crusade to prevail. For now, to speed up the things, I am forced to ignore your NAK. So NAK to your NAK. Sorry.
Signature · 2 lines
Best regards, Jacek Anaszewski
Re: [RFC PATCH v2 1/9] leds: add TI LMU backlight driver
Hi!
Quoted 7 lines
Quoted 6 lines
We have debated this over and over and now we have 3 different implementations available we need to collude on which one we want to support.
Jacek I defer to you and Pavel since you are both LED maintainers.
I can support the dedicated LED drivers but I cannot support the TI LMU only implementation.
Quoted 8 lines
I uphold my previous opinion - please go ahead with moving the support for non-MFD devices from MFD subsystem to the LED subsystem. And yes - along with the bindings. This is semantically correct, and yet we don't have mainline users.
Pavel - you will have to engage more people for your crusade to prevail. For now, to speed up the things, I am forced to ignore your NAK. So NAK to your NAK. Sorry.
No need to be sorry :-).
Lets ignore the code for now, as code can be changed easily.
Bindings are not something you or I maintain, so we don't have final word there, and I have feeling this is not going to go past device tree maintainers. [AFAICT: you can move binding in Documentation/ to different place, that's not a problem; but creating a new binding when old one exists is.]
If you and Dan feel that is okay, you are welcome to try to get the patches past Rob, just please retain the NAK so that he remembers the discussion, and so that it is clear that I don't like the changes.
I believe smart thing to do is to try to do that before working further on the code, but of course, its all up to you :-).
Friends,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [RFC PATCH v2 1/9] leds: add TI LMU backlight driver
Hello
Quoted 28 lines · Pavel Machek
Hi!
Quoted 7 lines
Quoted 6 lines
We have debated this over and over and now we have 3 different implementations available we need to collude on which one we want to support.
Jacek I defer to you and Pavel since you are both LED maintainers.
I can support the dedicated LED drivers but I cannot support the TI LMU only implementation.
Quoted 8 lines
I uphold my previous opinion - please go ahead with moving the support for non-MFD devices from MFD subsystem to the LED subsystem. And yes - along with the bindings. This is semantically correct, and yet we don't have mainline users.
Pavel - you will have to engage more people for your crusade to prevail. For now, to speed up the things, I am forced to ignore your NAK. So NAK to your NAK. Sorry.
No need to be sorry :-).
Lets ignore the code for now, as code can be changed easily.
Bindings are not something you or I maintain, so we don't have final word there, and I have feeling this is not going to go past device tree maintainers. [AFAICT: you can move binding in
Documentation/to different place, that's not a problem; but creating a new binding when old one exists is.]
Quoted 6 lines
If you and Dan feel that is okay, you are welcome to try to get the patches past Rob, just please retain the NAK so that he remembers the discussion, and so that it is clear that I don't like the changes.
I believe smart thing to do is to try to do that before working further on the code, but of course, its all up to you :-).
I was looking for the review for the ti-lmu.txt binding on patchworks to see what the comments were on the review or any explanation from reviewers to why this implementation was done in the MFD.
Maybe there is some historical context that needs to be learned from here from 1.5 years ago.
I cannot seem to find any review posted in the patchworks archive. I see reviews posted for the ti-lmu-backlight binding but none from the ti-lmu.txt base binding.
Does anyone have a reference to the review?
If there is no review then I am wondering how this binding was accepted. If there is no review and no current users then I would think that binding
modification should be allowed. But thats just my opinion.
Dan
Quoted 4 lines
Friends,
Pavel
Signature · 2 lines
------------------ Dan Murphy
Re: [RFC PATCH v2 1/9] leds: add TI LMU backlight driver
Hello
Quoted 42 lines · Dan Murphy
Hello
Quoted 28 lines · Pavel Machek
Hi!
Quoted 7 lines
Quoted 6 lines
We have debated this over and over and now we have 3 different implementations available we need to collude on which one we want to support.
Jacek I defer to you and Pavel since you are both LED maintainers.
I can support the dedicated LED drivers but I cannot support the TI LMU only implementation.
Quoted 8 lines
I uphold my previous opinion - please go ahead with moving the support for non-MFD devices from MFD subsystem to the LED subsystem. And yes - along with the bindings. This is semantically correct, and yet we don't have mainline users.
Pavel - you will have to engage more people for your crusade to prevail. For now, to speed up the things, I am forced to ignore your NAK. So NAK to your NAK. Sorry.
No need to be sorry :-).
Lets ignore the code for now, as code can be changed easily.
Bindings are not something you or I maintain, so we don't have final word there, and I have feeling this is not going to go past device tree maintainers. [AFAICT: you can move binding in
Documentation/to different place, that's not a problem; but creating a new binding when old one exists is.]Quoted 6 lines
If you and Dan feel that is okay, you are welcome to try to get the patches past Rob, just please retain the NAK so that he remembers the discussion, and so that it is clear that I don't like the changes.
I believe smart thing to do is to try to do that before working further on the code, but of course, its all up to you :-).
I was looking for the review for the ti-lmu.txt binding on patchworks to see what the comments were on the review or any explanation from reviewers to why this implementation was done in the MFD.
Quoted 8 lines
Maybe there is some historical context that needs to be learned from here from 1.5 years ago.
I cannot seem to find any review posted in the patchworks archive. I see reviews posted for the ti-lmu-backlight binding but none from the ti-lmu.txt base binding.
Does anyone have a reference to the review?
I found the review or at least the reference for the ti-lmu.txt binding.
https://lore.kernel.org/patchwork/patch/764180/
Does not appear that the binding was sent to the device tree mail list. (Maybe that email list did not exist in Feb 2017). Especially with the amount of change that is being submitted in the newer patchsets.
Dan
Quoted 14 lines
If there is no review then I am wondering how this binding was accepted. If there is no review and no current users then I would think that binding
modification should be allowed. But thats just my opinion.Dan
Quoted 4 lines
Friends,
Pavel
Signature · 2 lines
------------------ Dan Murphy
Re: [RFC PATCH v2 2/9] dt-bindings: ti-lmu: Remove LM3697
In reply to Pavel MachekHello
Quoted 5 lines · Pavel Machek
Quoted 4 lines · Dan Murphy
Remove support for the LM3697 LED device
from the ti-lmu. The LM3697 will be supported
via a stand alone LED driver.
Quoted 8 lines
Quoted 1 line
Signed-off-by Dan Murphy <[email protected]>NAK, for reasons I explained before. Please add it to the patch so that it does not get applied by mistake. Ouch and AFAICT Rob was not happy with this either.
Yes, you are creating new drivers, ok; but that does _not_ mean you should create new binding.
I am copying my comment here on the review of this original binding for records
I found the review or at least the reference for the ti-lmu.txt binding.
https://lore.kernel.org/patchwork/patch/764180/
Does not appear that the binding was sent to the device tree mail list. (Maybe that email list did not exist in Feb 2017).
Especially with the amount of change that is being submitted in the newer patchsets.
<new content>
Having found this submission and no comments on the review I would think we need to take an exception on these bindings.
Dan
Quoted 2 lines
Pavel
Signature · 2 lines
------------------ Dan Murphy
Re: [RFC PATCH v2 2/9] dt-bindings: ti-lmu: Remove LM3697
Quoted 20 lines · Dan Murphy
Hello
Quoted 5 lines · Pavel Machek
Quoted 4 lines · Dan Murphy
Remove support for the LM3697 LED device
from the ti-lmu. The LM3697 will be supported
via a stand alone LED driver.Quoted 8 lines
Quoted 1 line
Signed-off-by Dan Murphy <[email protected]>NAK, for reasons I explained before. Please add it to the patch so that it does not get applied by mistake. Ouch and AFAICT Rob was not happy with this either.
Yes, you are creating new drivers, ok; but that does _not_ mean you should create new binding.
I am copying my comment here on the review of this original binding for records
Quoted 6 lines
I found the review or at least the reference for the ti-lmu.txt binding.
https://lore.kernel.org/patchwork/patch/764180/
Does not appear that the binding was sent to the device tree mail list. (Maybe that email list did not exist in Feb 2017).
Quick google shows:
https://lwn.net/Articles/666023/
Now can we stop this nonsense? If there is a problem with the binding, submit patches to fix the problem.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [RFC PATCH v2 2/9] dt-bindings: ti-lmu: Remove LM3697
Quoted 23 lines · Pavel Machek
Quoted 22 lines · Dan Murphy
Hello
Quoted 5 lines · Pavel Machek
Quoted 4 lines · Dan Murphy
Remove support for the LM3697 LED device
from the ti-lmu. The LM3697 will be supported
via a stand alone LED driver.Quoted 8 lines
Quoted 1 line
Signed-off-by Dan Murphy <[email protected]>NAK, for reasons I explained before. Please add it to the patch so that it does not get applied by mistake. Ouch and AFAICT Rob was not happy with this either.
Yes, you are creating new drivers, ok; but that does _not_ mean you should create new binding.
I am copying my comment here on the review of this original binding for records
I found the review or at least the reference for the ti-lmu.txt binding.
Quoted 8 lines
Quoted 4 lines
https://lore.kernel.org/patchwork/patch/764180/
Does not appear that the binding was sent to the device tree mail list. (Maybe that email list did not exist in Feb 2017).
Quick google shows:
This link refreshed my memory and allowed me to recall Milo's patch set from the end of 2015, and the related discussion. I had an impression that I had had some request regarding the bindings but there was no follow-up.
I've googled that thread [0] and it proved I was right [1].
Quoted 1 line
From Milo's messages we can infer that there will be next
version of the patch set and it appeared but over a year later [2], and without the leds-lm3633 driver and related bindings, and without drivers/video/backlight/ti-lmu-backlight-core.c.
Patch set gets merged despite dangling DT references.
Dan, I propose you to resend the patch removing the bindings from MFD, and explain the rationale in the patch below commit message after "---" .
Quoted 2 lines
Now can we stop this nonsense? If there is a problem with the binding, submit patches to fix the problem.
[0]
https://lore.kernel.org/lkml/[email protected]/
[1] https://lore.kernel.org/lkml/[email protected]/
[2]
https://www.mail-archive.com/[email protected]/msg1341860.html
Signature · 2 lines
Best regards, Jacek Anaszewski
Re: [RFC PATCH v2 2/9] dt-bindings: ti-lmu: Remove LM3697
Jacek
Quoted 51 lines · Jacek Anaszewski
Quoted 23 lines · Pavel Machek
Quoted 22 lines · Dan Murphy
Hello
Quoted 5 lines · Pavel Machek
Quoted 4 lines · Dan Murphy
Remove support for the LM3697 LED device
from the ti-lmu. The LM3697 will be supported
via a stand alone LED driver.Quoted 8 lines
Quoted 1 line
Signed-off-by Dan Murphy <[email protected]>NAK, for reasons I explained before. Please add it to the patch so that it does not get applied by mistake. Ouch and AFAICT Rob was not happy with this either.
Yes, you are creating new drivers, ok; but that does _not_ mean you should create new binding.
I am copying my comment here on the review of this original binding for records
I found the review or at least the reference for the ti-lmu.txt binding.
Quoted 8 lines
Quoted 4 lines
https://lore.kernel.org/patchwork/patch/764180/
Does not appear that the binding was sent to the device tree mail list. (Maybe that email list did not exist in Feb 2017).
Quick google shows:
This link refreshed my memory and allowed me to recall Milo's patch set from the end of 2015, and the related discussion. I had an impression that I had had some request regarding the bindings but there was no follow-up.
I've googled that thread [0] and it proved I was right [1].
From Milo's messages we can infer that there will be next version of the patch set and it appeared but over a year later [2], and without the leds-lm3633 driver and related bindings, and without
drivers/video/backlight/ti-lmu-backlight-core.c.Patch set gets merged despite dangling DT references.
Dan, I propose you to resend the patch removing the bindings from MFD, and explain the rationale in the patch below commit message after "---" .
Quoted 9 lines
Quoted 2 lines
Now can we stop this nonsense? If there is a problem with the binding, submit patches to fix the problem.
[0]
https://lore.kernel.org/lkml/[email protected]/
[1] https://lore.kernel.org/lkml/[email protected]/
[2]
https://www.mail-archive.com/[email protected]/msg1341860.html
Sounds good I will clean this up and submit a v3 non-RFC edition
Dan
Signature · 2 lines
------------------ Dan Murphy