LM36274 Introduction
Subsystems (4)
v4 cover LM36274 Introduction
Hello
This is patch set v4 for the LM36274. There were no changes made to this patch set except to rebase this on top of the latest TI LMU common code patchset.
This patch set was rebased on the series at:
https://lore.kernel.org/patchwork/project/lkml/list/?series=393071
Dan
Dan Murphy (6):
regulator: lm363x: Make the gpio register enable flexible
dt-bindings: mfd: Add lm36274 bindings to ti-lmu
mfd: ti-lmu: Add LM36274 support to the ti-lmu
regulator: lm363x: Add support for LM36274
dt-bindings: leds: Add LED bindings for the LM36274
leds: lm36274: Introduce the TI LM36274 LED driver
.../devicetree/bindings/leds/leds-lm36274.txt | 82 +++++++++ .../devicetree/bindings/mfd/ti-lmu.txt | 54 ++++++ drivers/leds/Kconfig | 7 + drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 174 ++++++++++++++++++ drivers/mfd/Kconfig | 5 +- drivers/mfd/ti-lmu.c | 14 ++ drivers/regulator/Kconfig | 2 +- drivers/regulator/lm363x-regulator.c | 56 +++++- include/linux/mfd/ti-lmu-register.h | 23 +++ include/linux/mfd/ti-lmu.h | 4 + 11 files changed, 416 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm36274.txt create mode 100644 drivers/leds/leds-lm36274.c
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v4 1/6 regulator: lm363x: Make the gpio register enable flexible
The use of and enablement of the GPIO can be used across devices. Use the enable_reg in the regulator descriptor for the register to write.
--- drivers/regulator/lm363x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/lm363x-regulator.c +2 -2
@@ -263,8 +263,8 @@ static int lm363x_regulator_probe(struct platform_device *pdev)if (gpiod) { cfg.ena_gpiod = gpiod; - - ret =regmap_update_bits (regmap,LM3632_REG_BIAS_CONFIG , + ret =regmap_update_bits (regmap, + lm363x_regulator_desc[id].enable_reg,LM3632_EXT_EN_MASK ,LM3632_EXT_EN_MASK );if (ret) {
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v4 2/6 dt-bindings: mfd: Add lm36274 bindings to ti-lmu
In reply to Dan MurphyAdd the LM36274 backlight driver with regulator support. This is a multi-function device for backlight applications.
Backlight properties will be documented in it's a supplemental bindings document.
Regulator support is documented in the regulator/lm363x-regulator.txt
http://www.ti.com/lit/ds/symlink/lm36274.pdf
--- .../devicetree/bindings/mfd/ti-lmu.txt | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+)
Documentation/devicetree/bindings/mfd/ti-lmu.txt +54 -0
@@ -8,6 +8,7 @@ TI LMU driver supports lighting devices below. LM3632 Backlight and regulator LM3633 Backlight, LED and fault monitor LM3695 Backlight + LM36274 Backlight and regulator Required properties: - compatible: Should be one of:
@@ -15,11 +16,13 @@ Required properties: "ti,lm3632" "ti,lm3633" "ti,lm3695" + "ti,lm36274" - reg: I2C slave address. 0x11 for LM3632 0x29 for LM3631 0x36 for LM3633 0x63 for LM3695 + 0x11 for LM36274 Optional properties: - enable-gpios: A GPIO specifier for hardware enable pin.
@@ -50,12 +53,14 @@ Optional nodes: - compatible: Should be one of: "ti,lm3633-fault-monitor" - leds: LED properties for LM3633. Please refer to [2]. + LED properties for LM36274. Please refer to [4]. - regulators: Regulator properties for LM3631 and LM3632. Please refer to [3]. [1] ../leds/backlight/ti-lmu-backlight.txt [2] ../leds/leds-lm3633.txt [3] ../regulator/lm363x-regulator.txt +[4] ../leds/leds-lm36274.txt lm3631@29 { compatible = "ti,lm3631";
@@ -213,3 +218,52 @@ lm3695@63 { }; }; }; + +lm36274@11 { + compatible = "ti,lm36274"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x11>; + + enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>; + regulators { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lm363x-regulator"; + + enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>, + <&pioC 1 GPIO_ACTIVE_HIGH>; + + vboost { + regulator-name = "lcd_boost"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <7150000>; + regulator-always-on; + }; + + vpos { + regulator-name = "lcd_vpos"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6500000>; + }; + + vneg { + regulator-name = "lcd_vneg"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6500000>; + }; + }; + + backlight { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lm36274-backlight"; + + led@0 { + reg = <0>; + led-sources = <0 2>; + label = "white:backlight_cluster"; + linux,default-trigger = "backlight"; + }; + }; +};
Signature · 1 line
2.21.0.5.gaeb582a983
Re: [PATCH v4 2/6] dt-bindings: mfd: Add lm36274 bindings to ti-lmu
Quoted 8 lines · Dan Murphy
Add the LM36274 backlight driver with regulator support. This is a multi-function device for backlight applications.
Backlight properties will be documented in it's a supplemental bindings document.
Regulator support is documented in the
regulator/lm363x-regulator.txt
Quoted 7 lines
http://www.ti.com/lit/ds/symlink/lm36274.pdf
Reviewed-by Rob Herring <[email protected]>Signed-off-by Dan Murphy <[email protected]>--- .../devicetree/bindings/mfd/ti-lmu.txt | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+)
For my own reference:
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v4 3/6 mfd: ti-lmu: Add LM36274 support to the ti-lmu
In reply to Dan MurphyAdd the LM36274 register support to the ti-lmu MFD driver.
--- drivers/mfd/Kconfig | 5 ++--- drivers/mfd/ti-lmu.c | 14 ++++++++++++++ include/linux/mfd/ti-lmu-register.h | 23 +++++++++++++++++++++++ include/linux/mfd/ti-lmu.h | 4 ++++ 4 files changed, 43 insertions(+), 3 deletions(-)
drivers/mfd/Kconfig +2 -3
@@ -1311,9 +1311,8 @@ config MFD_TI_LMU select REGMAP_I2C help Say yes here to enable support for TI LMU chips. - - TI LMU MFD supports LM3532, LM3631, LM3632, LM3633, and LM3695. - It consists of backlight, LED and regulator driver. + TI LMU MFD supports LM3532, LM3631, LM3632, LM3633, LM3695 and + LM36274. It consists of backlight, LED and regulator driver. It provides consistent device controls for lighting functions. config MFD_OMAP_USB_HOST
drivers/mfd/ti-lmu.c +14 -0
@@ -111,6 +111,17 @@ static const struct mfd_cell lm3695_devices[] = { }, }; +static const struct mfd_cell lm36274_devices[] = { +LM363X_REGULATOR (LM36274_BOOST ), +LM363X_REGULATOR (LM36274_LDO_POS ), +LM363X_REGULATOR (LM36274_LDO_NEG ), + { + .name ="lm36274-leds" , + .id =LM36274 , + .of_compatible ="ti,lm36274-backlight" , + }, +}; +#define TI_LMU_DATA (chip, max_reg) \ static const struct ti_lmu_data chip##_data = \ { \
@@ -123,6 +134,7 @@ 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 (lm36274,LM36274_MAX_REG );static int ti_lmu_probe (struct i2c_client *cl,const struct i2c_device_id *id) {
@@ -191,6 +203,7 @@ 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,lm36274", .data = &lm36274_data }, { } };MODULE_DEVICE_TABLE (of, ti_lmu_of_match);
@@ -200,6 +213,7 @@ static const struct i2c_device_id ti_lmu_ids[] = { { "lm3632", LM3632 }, { "lm3633", LM3633 }, { "lm3695", LM3695 }, + { "lm36274", LM36274 }, { } };MODULE_DEVICE_TABLE (i2c, ti_lmu_ids);
include/linux/mfd/ti-lmu-register.h +23 -0
@@ -189,4 +189,27 @@#define LM3695_REG_BRT_MSB 0x14#define LM3695_MAX_REG 0x14 + +/* LM36274 */ +#define LM36274_REG_REV 0x01 +#define LM36274_REG_BL_CFG_1 0x02 +#define LM36274_REG_BL_CFG_2 0x03 +#define LM36274_REG_BRT_LSB 0x04 +#define LM36274_REG_BRT_MSB 0x05 +#define LM36274_REG_BL_EN 0x08 + +#define LM36274_REG_BIAS_CONFIG_1 0x09 +#define LM36274_EXT_EN_MASK BIT(0) +#define LM36274_EN_VNEG_MASK BIT(1) +#define LM36274_EN_VPOS_MASK BIT(2) + +#define LM36274_REG_BIAS_CONFIG_2 0x0a +#define LM36274_REG_BIAS_CONFIG_3 0x0b +#define LM36274_REG_VOUT_BOOST 0x0c +#define LM36274_REG_VOUT_POS 0x0d +#define LM36274_REG_VOUT_NEG 0x0e +#define LM36274_VOUT_MASK 0x3F + +#define LM36274_MAX_REG 0x13 +#endif
include/linux/mfd/ti-lmu.h +4 -0
@@ -26,6 +26,7 @@ enum ti_lmu_id {LM3632 ,LM3633 ,LM3695 , +LM36274 , LMU_MAX_ID, };
@@ -67,6 +68,9 @@ enum lm363x_regulator_id {LM3632_BOOST ,/* Boost output */ LM3632_LDO_POS ,/* Positive display bias output */ LM3632_LDO_NEG ,/* Negative display bias output */ +LM36274_BOOST ,/* Boost output */ +LM36274_LDO_POS ,/* Positive display bias output */ + LM36274_LDO_NEG, /* Negative display bias output */ };/**
Signature · 1 line
2.21.0.5.gaeb582a983
Re: [PATCH v4 3/6] mfd: ti-lmu: Add LM36274 support to the ti-lmu
Quoted 9 lines · Dan Murphy
Add the LM36274 register support to the ti-lmu MFD driver.
Signed-off-by Dan Murphy <[email protected]>--- drivers/mfd/Kconfig | 5 ++--- drivers/mfd/ti-lmu.c | 14 ++++++++++++++ include/linux/mfd/ti-lmu-register.h | 23 +++++++++++++++++++++++ include/linux/mfd/ti-lmu.h | 4 ++++ 4 files changed, 43 insertions(+), 3 deletions(-)
For my own reference:
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v4 4/6 regulator: lm363x: Add support for LM36274
In reply to Dan MurphyAdding regulator support for the LM36274 backlight driver. This device can leverage this existing code as the functionality and registers are common enough between the LM36274 and the LM363x series of devices.
--- drivers/regulator/Kconfig | 2 +- drivers/regulator/lm363x-regulator.c | 52 ++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-)
drivers/regulator/Kconfig +1 -1
@@ -362,7 +362,7 @@ config REGULATOR_LM363X tristate "TI LM363X voltage regulators" depends on MFD_TI_LMU help - This driver supports LM3631 and LM3632 voltage regulators for + This driver supports LM3631, LM3632 and LM36274 voltage regulators for the LCD bias. One boost output voltage is configurable and always on. Other LDOs are used for the display module.
drivers/regulator/lm363x-regulator.c +52 -0
73 lines not on this page · raw message
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v4 5/6 dt-bindings: leds: Add LED bindings for the LM36274
In reply to Dan MurphyAdd the LM36274 LED specific bindings.
--- .../devicetree/bindings/leds/leds-lm36274.txt | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm36274.txt
Documentation/devicetree/bindings/leds/leds-lm36274.txt new file +82 -0
@@ -0,0 +1,82 @@ +* Texas Instruments LM36274 4-Channel LCD Backlight Driver w/Integrated Bias + +The LM36274 is an integrated four-channel WLED driver and LCD bias supply. +The backlight boost provides the power to bias four parallel LED strings with +up to 29V total output voltage. The 11-bit LED current is programmable via +the I2C bus and/or controlled via a logic level PWM input from 60 μA to 30 mA. + +Parent device properties are documented in ../mfd/ti_lmu.txt +Regulator properties are documented in ../regulator/lm363x-regulator.txt + +Required backlight properties: + - compatible: + "ti,lm36274-backlight" + - reg : 0 + - #address-cells : 1 + - #size-cells : 0 + - led-sources : Indicates which LED strings will be enabled. + Values from 0-3, sources is 0 based so strings will be + source value + 1. + +Optional backlight properties: + - 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. + +lm36274@11 { + compatible = "ti,lm36274"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x11>; + + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + + regulators { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lm363x-regulator"; + + enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>, + <&pioC 1 GPIO_ACTIVE_HIGH>; + + vboost { + regulator-name = "lcd_boost"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <7150000>; + regulator-always-on; + }; + + vpos { + regulator-name = "lcd_vpos"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6500000>; + }; + + vneg { + regulator-name = "lcd_vneg"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6500000>; + }; + }; + + backlight { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lm36274-backlight"; + + led@0 { + reg = <0>; + led-sources = <0 2>; + label = "white:backlight_cluster"; + linux,default-trigger = "backlight"; + }; + }; +}; + +For more product information please see the link below: +http://www.ti.com/lit/ds/symlink/lm36274.pdf
Signature · 1 line
2.21.0.5.gaeb582a983
PATCH v4 6/6 leds: lm36274: Introduce the TI LM36274 LED driver
In reply to Dan MurphyIntroduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
--- drivers/leds/Kconfig | 7 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 174 ++++++++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+) create mode 100644 drivers/leds/leds-lm36274.c
drivers/leds/Kconfig +7 -0
@@ -791,6 +791,13 @@ config LEDS_LM3697 Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697. +config LEDS_LM36274 + tristate "LED driver for LM36274" + depends on LEDS_TI_LMU_COMMON + help + Say Y to enable the LM36274 LED driver for TI LMU devices. + This supports the LED device LM36274. + comment "LED Triggers" source "drivers/leds/trigger/Kconfig"
drivers/leds/Makefile +1 -0
@@ -82,6 +82,7 @@ obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o obj-$(CONFIG_LEDS_LM3601X) += leds-lm3601x.o obj-$(CONFIG_LEDS_TI_LMU_COMMON) += leds-ti-lmu-common.o obj-$(CONFIG_LEDS_LM3697) += leds-lm3697.o +obj-$(CONFIG_LEDS_LM36274) += leds-lm36274.o # LED SPI Drivers obj-$(CONFIG_LEDS_CR0014114) += leds-cr0014114.o
drivers/leds/leds-lm36274.c new file +174 -0
174 lines not on this page · raw message
Signature · 1 line
2.21.0.5.gaeb582a983
Re: [PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver
Hi Dan,
Quoted 20 lines · Dan Murphy
Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
Signed-off-by Dan Murphy <[email protected]>--- drivers/leds/Kconfig | 7 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 174 ++++++++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+)create mode 100644
drivers/leds/leds-lm36274.cdrivers/leds/Kconfig +0
-0
drivers/leds/Kconfig config LEDS_LM3697 · line 796
Quoted 6 lines
drivers/leds/Kconfig +3
-0@@ -791,6 +791,13 @@ config LEDS_LM3697 Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697. +config LEDS_LM36274 + tristate "LED driver for LM36274" + depends on LEDS_TI_LMU_COMMON
Shouldn't we have "depends on MFD_TI_LMU" as well here?
Quoted 3 lines
drivers/leds/Kconfig +3
-0+ help + Say Y to enable the LM36274 LED driver for TI LMU devices. + This supports the LED device LM36274.
Signature · 2 lines
Best regards, Jacek Anaszewski
Re: [PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver
Jacek
Quoted 18 lines · Jacek Anaszewski
Hi Dan,
Quoted 15 lines · Dan Murphy
Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
Signed-off-by Dan Murphy <[email protected]>---
drivers/leds/Kconfig | 7 ++
drivers/leds/Makefile | 1 +drivers/leds/leds-lm36274.c| 174 ++++++++++++++++++++++++++++++++++++3 files changed, 182 insertions(+)create mode 100644
drivers/leds/leds-lm36274.c
Quoted 13 lines
Quoted 10 lines
drivers/leds/Kconfig +0
-0@@ -791,6 +791,13 @@ config LEDS_LM3697Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697.
+configLEDS_LM36274
+ tristate "LED driver for LM36274"
+ depends onLEDS_TI_LMU_COMMONShouldn't we have "depends on
MFD_TI_LMU" as well here?
Actually the LEDS_TI_LMU_COMMON flag should depend on MFD_TI_LMU. Then it would inherit that dependency.
Dan
Quoted 4 lines
Quoted 3 lines
+ help
+ Say Y to enable the LM36274 LED driver for TI LMU devices. + This supports the LED device LM36274.
Re: [PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver
Quoted 35 lines · Dan Murphy
Jacek
Quoted 18 lines · Jacek Anaszewski
Hi Dan,
Quoted 15 lines · Dan Murphy
Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
Signed-off-by Dan Murphy <[email protected]>--- drivers/leds/Kconfig | 7 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 174 ++++++++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+)create mode 100644
drivers/leds/leds-lm36274.cQuoted 13 lines
drivers/leds/Kconfig config LEDS_LM3697 · line 795
Quoted 10 lines
drivers/leds/Kconfig +2
-0@@ -791,6 +791,13 @@ config LEDS_LM3697 Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697. +config LEDS_LM36274 + tristate "LED driver for LM36274" + depends on LEDS_TI_LMU_COMMONShouldn't we have "depends on
MFD_TI_LMU" as well here?
Quoted 2 lines
Actually the
LEDS_TI_LMU_COMMONflag should depend onMFD_TI_LMU. Then it would inherit that dependency.
LEDS_TI_LMU_COMMON does not seem too have any dependency on MFD_TI_LMU, and it would be incorrect to require enabling MFD_TI_LMU for all drivers depending on TI_LMU_COMMON, that can be probed on their own, like leds-lm3697.c .
Signature · 2 lines
Best regards, Jacek Anaszewski
Re: [PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver
Jacek
Quoted 36 lines · Jacek Anaszewski
Quoted 35 lines · Dan Murphy
Jacek
Quoted 31 lines · Jacek Anaszewski
Hi Dan,
Quoted 20 lines · Dan Murphy
Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
Signed-off-by Dan Murphy <[email protected]>---
drivers/leds/Kconfig | 7 ++
drivers/leds/Makefile | 1 +drivers/leds/leds-lm36274.c| 174 ++++++++++++++++++++++++++++++++++++3 files changed, 182 insertions(+)create mode 100644
drivers/leds/leds-lm36274.cdrivers/leds/Kconfig +0
-0@@ -791,6 +791,13 @@ config LEDS_LM3697Quoted 5 lines
Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697.
+configLEDS_LM36274
+ tristate "LED driver for LM36274"
+ depends onLEDS_TI_LMU_COMMONShouldn't we have "depends on
MFD_TI_LMU" as well here?
Quoted 8 lines
Quoted 2 lines
Actually the
LEDS_TI_LMU_COMMONflag should depend onMFD_TI_LMU. Then it would inherit that dependency.
LEDS_TI_LMU_COMMONdoes not seem too have any dependency onMFD_TI_LMU, and it would be incorrect to require enablingMFD_TI_LMUfor all drivers depending onTI_LMU_COMMON, that can be probed on their own, likeleds-lm3697.c.
Correct.
I can update the Kconfigs unless you want to ammend the commits.
Dan
Re: [PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver
Dan,
Quoted 48 lines · Dan Murphy
Jacek
Quoted 36 lines · Jacek Anaszewski
Quoted 35 lines · Dan Murphy
Jacek
Quoted 31 lines · Jacek Anaszewski
Hi Dan,
Quoted 20 lines · Dan Murphy
Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
Signed-off-by Dan Murphy <[email protected]>--- drivers/leds/Kconfig | 7 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 174 ++++++++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+)create mode 100644
drivers/leds/leds-lm36274.cdrivers/leds/Kconfig +0
-0drivers/leds/Kconfig config LEDS_LM3697 · line 795
Quoted 5 lines
drivers/leds/Kconfig +2
-0@@ -791,6 +791,13 @@ config LEDS_LM3697 Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697. +config LEDS_LM36274 + tristate "LED driver for LM36274" + depends on LEDS_TI_LMU_COMMONShouldn't we have "depends on
MFD_TI_LMU" as well here?Quoted 8 lines
Quoted 2 lines
Actually the
LEDS_TI_LMU_COMMONflag should depend onMFD_TI_LMU. Then it would inherit that dependency.
LEDS_TI_LMU_COMMONdoes not seem too have any dependency onMFD_TI_LMU, and it would be incorrect to require enablingMFD_TI_LMUfor all drivers depending onTI_LMU_COMMON, that can be probed on their own, likeleds-lm3697.c.
Quoted 3 lines
Correct.
I can update the Kconfigs unless you want to ammend the commits.
I added "depends on MFD_TI_LMU" to "config LEDS_LM36274". Please verify your patch sets pushed to [0].
Signature · 2 lines
Best regards, Jacek Anaszewski
Re: [PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver
Jacek
Quoted 51 lines · Jacek Anaszewski
Dan,
Quoted 48 lines · Dan Murphy
Jacek
Quoted 44 lines · Jacek Anaszewski
Quoted 35 lines · Dan Murphy
Jacek
Quoted 18 lines · Jacek Anaszewski
Hi Dan,
Quoted 15 lines · Dan Murphy
Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
Signed-off-by Dan Murphy <[email protected]>---
drivers/leds/Kconfig | 7 ++
drivers/leds/Makefile | 1 +drivers/leds/leds-lm36274.c| 174 ++++++++++++++++++++++++++++++++++++3 files changed, 182 insertions(+)create mode 100644
drivers/leds/leds-lm36274.cQuoted 13 lines
Quoted 10 lines
drivers/leds/Kconfig +0
-0@@ -791,6 +791,13 @@ config LEDS_LM3697Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697.
+configLEDS_LM36274
+ tristate "LED driver for LM36274"
+ depends onLEDS_TI_LMU_COMMONShouldn't we have "depends on
MFD_TI_LMU" as well here?Quoted 2 lines
Actually the
LEDS_TI_LMU_COMMONflag should depend onMFD_TI_LMU. Then it would inherit that dependency.
LEDS_TI_LMU_COMMONdoes not seem too have any dependency onMFD_TI_LMU, and it would be incorrect to require enablingMFD_TI_LMUfor all drivers depending onTI_LMU_COMMON, that can be probed on their own, likeleds-lm3697.c.
Quoted 7 lines
Quoted 3 lines
Correct.
I can update the Kconfigs unless you want to ammend the commits.
I added "depends on
MFD_TI_LMU" to "configLEDS_LM36274". Please verify your patch sets pushed to [0].
Pulled
Built
tested
verified
Good to go
Dan
Re: [PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver
Quoted 62 lines · Dan Murphy
Jacek
Quoted 51 lines · Jacek Anaszewski
Dan,
Quoted 48 lines · Dan Murphy
Jacek
Quoted 44 lines · Jacek Anaszewski
Quoted 35 lines · Dan Murphy
Jacek
Quoted 18 lines · Jacek Anaszewski
Hi Dan,
Quoted 15 lines · Dan Murphy
Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file.
The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits.
Signed-off-by Dan Murphy <[email protected]>--- drivers/leds/Kconfig | 7 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 174 ++++++++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+)create mode 100644
drivers/leds/leds-lm36274.cQuoted 13 lines
drivers/leds/Kconfig config LEDS_LM3697 · line 795
Quoted 10 lines
drivers/leds/Kconfig +2
-0@@ -791,6 +791,13 @@ config LEDS_LM3697 Say Y to enable the LM3697 LED driver for TI LMU devices. This supports the LED device LM3697. +config LEDS_LM36274 + tristate "LED driver for LM36274" + depends on LEDS_TI_LMU_COMMONShouldn't we have "depends on
MFD_TI_LMU" as well here?Quoted 2 lines
Actually the
LEDS_TI_LMU_COMMONflag should depend onMFD_TI_LMU. Then it would inherit that dependency.
LEDS_TI_LMU_COMMONdoes not seem too have any dependency onMFD_TI_LMU, and it would be incorrect to require enablingMFD_TI_LMUfor all drivers depending onTI_LMU_COMMON, that can be probed on their own, likeleds-lm3697.c.Quoted 7 lines
Quoted 3 lines
Correct.
I can update the Kconfigs unless you want to ammend the commits.
I added "depends on
MFD_TI_LMU" to "configLEDS_LM36274". Please verify your patch sets pushed to [0].
Quoted 6 lines
Pulled
Built
tested
verifiedGood to go
Thanks! Merged.
Signature · 2 lines
Best regards, Jacek Anaszewski
I need acks from regulator framework maintainer for patches 1/6 and 4/6.
Adding Liam and Mark.
Quoted 34 lines · Dan Murphy
Hello
This is patch set v4 for the LM36274. There were no changes made to this patch set except to rebase this on top of the latest TI LMU common code patchset.
This patch set was rebased on the series at:
https://lore.kernel.org/patchwork/project/lkml/list/?series=393071Dan
Dan Murphy (6):
regulator: lm363x: Make the gpio register enable flexible
dt-bindings: mfd: Add lm36274 bindings to ti-lmu
mfd: ti-lmu: Add LM36274 support to the ti-lmu
regulator: lm363x: Add support for LM36274
dt-bindings: leds: Add LED bindings for the LM36274
leds: lm36274: Introduce the TI LM36274 LED driver.../devicetree/bindings/leds/leds-lm36274.txt | 82 +++++++++ .../devicetree/bindings/mfd/ti-lmu.txt | 54 ++++++ drivers/leds/Kconfig | 7 + drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 174 ++++++++++++++++++ drivers/mfd/Kconfig | 5 +- drivers/mfd/ti-lmu.c | 14 ++ drivers/regulator/Kconfig | 2 +- drivers/regulator/lm363x-regulator.c | 56 +++++- include/linux/mfd/ti-lmu-register.h | 23 +++ include/linux/mfd/ti-lmu.h | 4 + 11 files changed, 416 insertions(+), 6 deletions(-)create mode 100644
Documentation/devicetree/bindings/leds/leds-lm36274.txtcreate mode 100644drivers/leds/leds-lm36274.c
Signature · 2 lines
Best regards, Jacek Anaszewski