Skip to contentSkip to conversation

TI LMU common Framework

PATCH Superseded Dan Murphy 6 participants 28 messages Oct 11, 2018 – Oct 24, 2018

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

v3 cover TI LMU common Framework

All

I have updated the patch set and addressed some of the comments. Thanks to Pavel, he found the lm3639 back light driver that is similar enough to the LM3632 device. So I removed that device from this patch series.

I am in the process of adding the LM3632 to the LM3639 back light driver as well as adding additional improvements to that driver.

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: ti-lmu: Remove LM3633
mfd: ti-lmu: Remove support for LM3633
dt-bindings: leds: Add support for the LM3633
leds: lm3633: Introduce the lm3633 driver

Pavel Machek (1):
leds: add TI LMU backlight driver

 .../devicetree/bindings/leds/leds-lm3633.txt  | 102 ++++
 .../devicetree/bindings/leds/leds-lm3697.txt  |  98 +++
 .../devicetree/bindings/mfd/ti-lmu.txt        |  72 ---
 drivers/leds/Kconfig                          |  22 +
 drivers/leds/Makefile                         |   3 +
 drivers/leds/leds-lm3633.c                    | 556 ++++++++++++++++++
 drivers/leds/leds-lm3697.c                    | 381 ++++++++++++
 drivers/leds/ti-lmu-led-common.c              | 138 +++++
 drivers/mfd/Kconfig                           |   2 +-
 drivers/mfd/ti-lmu.c                          |  38 --
 include/linux/mfd/ti-lmu-register.h           |  44 --
 include/linux/mfd/ti-lmu.h                    |   1 -
 include/linux/ti-lmu-led-common.h             |  59 ++
 13 files changed, 1360 insertions(+), 156 deletions(-)
 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-lm3633.c
 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.19.0
author
#1 lore raw

PATCH v3 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]

[remove backlight subsystem support for now]
---
 drivers/leds/Kconfig              |   8 ++
 drivers/leds/Makefile             |   1 +
 drivers/leds/ti-lmu-led-common.c  | 138 ++++++++++++++++++++++++++++++
 include/linux/ti-lmu-led-common.h |  59 +++++++++++++
 4 files changed, 206 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
index 44097a3e0fcc..dc717b30d9d3 100644
@@ -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
index 420b5d2cfa62..e09bb27bc7ea 100644
@@ -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

include/linux/ti-lmu-led-common.h new file +59 -0

59 lines not on this page · raw message

Signature · 1 line
2.19.0
author
#2 lore raw

PATCH v3 2/9 dt-bindings: ti-lmu: Remove LM3697

In reply to Dan Murphy

Remove 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
index c885cf89b8ce..920f910be4e9 100644
@@ -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
#3 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 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.

NAK.

Pavel

Quoted 57 lines

index c885cf89b8ce..920f910be4e9 100644

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 · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#4 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Pavel

Quoted 8 lines · Pavel Machek
Quoted 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.

NAK.

Thanks for the NAK.

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

Quoted 61 lines

Pavel

Quoted 57 lines

index c885cf89b8ce..920f910be4e9 100644

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 · 2 lines
------------------
Dan Murphy
#5 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 10 lines · Dan Murphy

Pavel

Quoted 7 lines · Pavel Machek
Quoted 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.

Quoted 7 lines
Quoted 1 line

NAK.

Thanks for the NAK.

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

I confirm. LM3697 is a standalone device and not a cell of any MFD device.

Waiting for DT maintainer's ack.

Best regards,
Jacek Anaszewski

Quoted 60 lines
Quoted 58 lines
Quoted 57 lines

index c885cf89b8ce..920f910be4e9 100644

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";
-	};
-};
maintainer
#6 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 15 lines · Jacek Anaszewski
Quoted 14 lines · Dan Murphy

Pavel

Quoted 8 lines · Pavel Machek
Quoted 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.

NAK.

Thanks for the NAK.

Quoted 8 lines
Quoted 3 lines

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

I confirm. LM3697 is a standalone device and not a cell of any MFD device.

Waiting for DT maintainer's ack.

You all sort out what you want... I can't follow it all, and I'm not going to spend the time trying to figure out what is going on here.

As this is worded, changing the driver is a Linux problem and irrelevant to the binding. Now if you want to move documentation to a location that makes more sense, then fine. But structure patches that way and make it clear that from an binding ABI perspective, nothing is changing.

Rob

#7 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Hi!

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line

NAK.

Thanks for the NAK.

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

Quoted 7 lines
Quoted 4 lines

I confirm. LM3697 is a standalone device and not a cell of any MFD device.

Waiting for DT maintainer's ack.

You all sort out what you want... I can't follow it all, and I'm not going to spend the time trying to figure out what is going on here.

This is what I want:

Quoted 4 lines

As this is worded, changing the driver is a Linux problem and irrelevant to the binding. Now if you want to move documentation to a location that makes more sense, then fine. But structure patches that way and make it clear that from an binding ABI perspective, nothing is changing.

...but apparently I did not have enough authority to get it.

(I'm ok with move, and it is possible that binding does need some fixups besides the move; still it should be done as fixup not as a new binding).

Thanks,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#8 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 27 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line

NAK.

Thanks for the NAK.

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

Quoted 7 lines
Quoted 4 lines

I confirm. LM3697 is a standalone device and not a cell of any MFD device.

Waiting for DT maintainer's ack.

You all sort out what you want... I can't follow it all, and I'm not going to spend the time trying to figure out what is going on here.

This is what I want:

Quoted 4 lines

As this is worded, changing the driver is a Linux problem and irrelevant to the binding. Now if you want to move documentation to a location that makes more sense, then fine. But structure patches that way and make it clear that from an binding ABI perspective, nothing is changing.

Quoted 5 lines

...but apparently I did not have enough authority to get it.

(I'm ok with move, and it is possible that binding does need some fixups besides the move; still it should be done as fixup not as a new binding).

There is a fundamental question - should the bindings be considered an ABI, even though there is no mainline "*.dts" implementation basing on these bindings?

This patch fixes the issues of bindings in a way that would change the ABI, if only it existed. But it apparently doesn't exist in mainline. Unless a DT documentation itself constitutes an ABI.

I'd like to have it clarified at this occasion, and that's why I kindly ask for DT maintainer's ack or NACK for this modification of bindings.

For a reference we have a nice summary of the MFD driver and related bindings' flaws in [0] and [1].

[0] https://lkml.org/lkml/2018/9/7/774
[1] https://lkml.org/lkml/2018/9/11/984

Signature · 2 lines
Best regards,
Jacek Anaszewski
maintainer
#9 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 31 lines · Jacek Anaszewski
Quoted 29 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line

NAK.

Thanks for the NAK.

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

Quoted 7 lines
Quoted 4 lines

I confirm. LM3697 is a standalone device and not a cell of any MFD device.

Waiting for DT maintainer's ack.

You all sort out what you want... I can't follow it all, and I'm not going to spend the time trying to figure out what is going on here.

This is what I want:

Quoted 4 lines

As this is worded, changing the driver is a Linux problem and irrelevant to the binding. Now if you want to move documentation to a location that makes more sense, then fine. But structure patches that way and make it clear that from an binding ABI perspective, nothing is changing.

...but apparently I did not have enough authority to get it.

Quoted 7 lines
Quoted 3 lines

(I'm ok with move, and it is possible that binding does need some fixups besides the move; still it should be done as fixup not as a new binding).

There is a fundamental question - should the bindings be considered an ABI, even though there is no mainline "*.dts" implementation basing on these bindings?

In theory there could be out of tree users. Having a dts file using it in tree shouldn't be a requirement to maintain the ABI IMO. However, a lack of dts is one piece of determining whether this is in use or not.

Quoted 8 lines

This patch fixes the issues of bindings in a way that would change the ABI, if only it existed. But it apparently doesn't exist in mainline. Unless a DT documentation itself constitutes an ABI.

I'd like to have it clarified at this occasion, and that's why I kindly ask for DT maintainer's ack or NACK for this modification of bindings.

Quoted 5 lines

For a reference we have a nice summary of the MFD driver and related bindings' flaws in [0] and [1].

[0] https://lkml.org/lkml/2018/9/7/774
[1] https://lkml.org/lkml/2018/9/11/984

Given this one seems to have not really been finished, it's probably okay to make changes in this case. Still, it would be good to see patches structured so that it's obvious we're breaking things. But how the patches are structured doesn't matter until there's some agreement on the end result.

Rob

#10 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 56 lines · Rob Herring
Quoted 31 lines · Jacek Anaszewski
Quoted 29 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line

NAK.

Thanks for the NAK.

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

Quoted 7 lines
Quoted 4 lines

I confirm. LM3697 is a standalone device and not a cell of any MFD device.

Waiting for DT maintainer's ack.

You all sort out what you want... I can't follow it all, and I'm not going to spend the time trying to figure out what is going on here.

This is what I want:

Quoted 4 lines

As this is worded, changing the driver is a Linux problem and irrelevant to the binding. Now if you want to move documentation to a location that makes more sense, then fine. But structure patches that way and make it clear that from an binding ABI perspective, nothing is changing.

...but apparently I did not have enough authority to get it.

Quoted 7 lines
Quoted 3 lines

(I'm ok with move, and it is possible that binding does need some fixups besides the move; still it should be done as fixup not as a new binding).

There is a fundamental question - should the bindings be considered an ABI, even though there is no mainline "*.dts" implementation basing on these bindings?

In theory there could be out of tree users. Having a dts file using it in tree shouldn't be a requirement to maintain the ABI IMO. However, a lack of dts is one piece of determining whether this is in use or not.

Quoted 11 lines

This patch fixes the issues of bindings in a way that would change the ABI, if only it existed. But it apparently doesn't exist in mainline. Unless a DT documentation itself constitutes an ABI.

I'd like to have it clarified at this occasion, and that's why I kindly ask for DT maintainer's ack or NACK for this modification of bindings.

For a reference we have a nice summary of the MFD driver and related bindings' flaws in [0] and [1].

Quoted 8 lines
Quoted 2 lines

[0] https://lkml.org/lkml/2018/9/7/774
[1] https://lkml.org/lkml/2018/9/11/984

Given this one seems to have not really been finished, it's probably okay to make changes in this case. Still, it would be good to see patches structured so that it's obvious we're breaking things. But how the patches are structured doesn't matter until there's some agreement on the end result.

OK, so if I'm getting it right, the correct patch structure in this case means that changes removing bindings from MFD and moving them along with the modifications to the LED subsystem should be placed in a single patch.

Dan, could you please arrange the next patch set version accordingly?

Signature · 2 lines
Best regards,
Jacek Anaszewski
author
#11 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Jacek

Quoted 66 lines · Jacek Anaszewski
Quoted 56 lines · Rob Herring
Quoted 31 lines · Jacek Anaszewski
Quoted 29 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line

NAK.

Thanks for the NAK.

This NAK was NAK'd by other maintainer in the V2 RFC patchset

https://lore.kernel.org/patchwork/patch/993171/

Quoted 7 lines
Quoted 4 lines

I confirm. LM3697 is a standalone device and not a cell of any MFD device.

Waiting for DT maintainer's ack.

You all sort out what you want... I can't follow it all, and I'm not going to spend the time trying to figure out what is going on here.

This is what I want:

Quoted 4 lines

As this is worded, changing the driver is a Linux problem and irrelevant to the binding. Now if you want to move documentation to a location that makes more sense, then fine. But structure patches that way and make it clear that from an binding ABI perspective, nothing is changing.

...but apparently I did not have enough authority to get it.

Quoted 7 lines
Quoted 3 lines

(I'm ok with move, and it is possible that binding does need some fixups besides the move; still it should be done as fixup not as a new binding).

There is a fundamental question - should the bindings be considered an ABI, even though there is no mainline "*.dts" implementation basing on these bindings?

In theory there could be out of tree users. Having a dts file using it in tree shouldn't be a requirement to maintain the ABI IMO. However, a lack of dts is one piece of determining whether this is in use or not.

Quoted 11 lines

This patch fixes the issues of bindings in a way that would change the ABI, if only it existed. But it apparently doesn't exist in mainline. Unless a DT documentation itself constitutes an ABI.

I'd like to have it clarified at this occasion, and that's why I kindly ask for DT maintainer's ack or NACK for this modification of bindings.

For a reference we have a nice summary of the MFD driver and related bindings' flaws in [0] and [1].

Quoted 8 lines
Quoted 2 lines

[0] https://lkml.org/lkml/2018/9/7/774
[1] https://lkml.org/lkml/2018/9/11/984

Given this one seems to have not really been finished, it's probably okay to make changes in this case. Still, it would be good to see patches structured so that it's obvious we're breaking things. But how the patches are structured doesn't matter until there's some agreement on the end result.

Quoted 6 lines

OK, so if I'm getting it right, the correct patch structure in this case means that changes removing bindings from MFD and moving them along with the modifications to the LED subsystem should be placed in a single patch.

Dan, could you please arrange the next patch set version accordingly?

Yes I can squash the DT bindings patches and call it a "move and modify"

Dan

Quoted 1 line
Signature · 2 lines
------------------
Dan Murphy
#12 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Hi!

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Given this one seems to have not really been finished, it's probably okay to make changes in this case. Still, it would be good to see patches structured so that it's obvious we're breaking things. But how the patches are structured doesn't matter until there's some agreement on the end result.

Quoted 8 lines
Quoted 6 lines

OK, so if I'm getting it right, the correct patch structure in this case means that changes removing bindings from MFD and moving them along with the modifications to the LED subsystem should be placed in a single patch.

Dan, could you please arrange the next patch set version accordingly?

Yes I can squash the DT bindings patches and call it a "move and modify"

You can do move without problems. But if you plan to modify them, please try to change as little as possible, make it separate patch and explain why new version is better than old one.

Thanks,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#13 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Thanks

Quoted 13 lines · Pavel Machek

Hi!

Quoted 11 lines
Quoted 11 lines
Quoted 5 lines

Given this one seems to have not really been finished, it's probably okay to make changes in this case. Still, it would be good to see patches structured so that it's obvious we're breaking things. But how the patches are structured doesn't matter until there's some agreement on the end result.

OK, so if I'm getting it right, the correct patch structure in this case means that changes removing bindings from MFD and moving them along with the modifications to the LED subsystem should be placed in a single patch.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Dan, could you please arrange the next patch set version accordingly?

Yes I can squash the DT bindings patches and call it a "move and modify"

You can do move without problems. But if you plan to modify them, please try to change as little as possible, make it separate patch and explain why new version is better than old one.

I have been thinking of how to do this. Since the 2 devices are part of the current binding there really is not a way to move them. Since there are still MFD capable devices available.

I would still need to remove the current active binding and create a new binding in the LED bindings directory.

I would have to remove and create in the same patch.

Dan

Quoted 3 lines

Thanks,
Pavel

Signature · 2 lines
------------------
Dan Murphy
#14 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Hi!

Quoted 20 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines

Given this one seems to have not really been finished, it's probably okay to make changes in this case. Still, it would be good to see patches structured so that it's obvious we're breaking things. But how the patches are structured doesn't matter until there's some agreement on the end result.

OK, so if I'm getting it right, the correct patch structure in this case means that changes removing bindings from MFD and moving them along with the modifications to the LED subsystem should be placed in a single patch.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Dan, could you please arrange the next patch set version accordingly?

Yes I can squash the DT bindings patches and call it a "move and modify"

You can do move without problems. But if you plan to modify them, please try to change as little as possible, make it separate patch and explain why new version is better than old one.

Quoted 8 lines

I have been thinking of how to do this. Since the 2 devices are part of the current binding there really is not a way to move them. Since there are still MFD capable devices available.

I would still need to remove the current active binding and create a new binding in the LED bindings directory.

I would have to remove and create in the same patch.

Yeah, and this all is a sign that you should just keep the current binding, and make your code use it, see?

You are free to use Sebastian's updated binding. It has "suggested by:
Rob" or something like that on it, so it should be fine.

You can add note to bindings/leds pointing to mfd binding.

Now... this is what I've suggested before. If you don't agree, you may want to contact Tony Lindgren, IIRC he works for TI, too, and might be willing to help.

Thank you,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#15 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 26 lines · Pavel Machek

Hi!

Quoted 24 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines

Given this one seems to have not really been finished, it's probably okay to make changes in this case. Still, it would be good to see patches structured so that it's obvious we're breaking things. But how the patches are structured doesn't matter until there's some agreement on the end result.

OK, so if I'm getting it right, the correct patch structure in this case means that changes removing bindings from MFD and moving them along with the modifications to the LED subsystem should be placed in a single patch.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Dan, could you please arrange the next patch set version accordingly?

Yes I can squash the DT bindings patches and call it a "move and modify"

You can do move without problems. But if you plan to modify them, please try to change as little as possible, make it separate patch and explain why new version is better than old one.

I have been thinking of how to do this. Since the 2 devices are part of the current binding there really is not a way to move them. Since there are still MFD capable devices available.

Quoted 7 lines
Quoted 4 lines

I would still need to remove the current active binding and create a new binding in the LED bindings directory.

I would have to remove and create in the same patch.

Yeah, and this all is a sign that you should just keep the current binding, and make your code use it, see?

No I don't actually see this as a sign. This is just operational issues nothing to do with actually correcting the incomplete unused bindings.

And actually moving and creating the bindings in the same patch makes sense as the change is self contained in a single patch and is easier to track.

Quoted 9 lines

You are free to use Sebastian's updated binding. It has "suggested by:
Rob" or something like that on it, so it should be fine.

You can add note to bindings/leds pointing to mfd binding.

Now... this is what I've suggested before. If you don't agree, you may want to contact Tony Lindgren, IIRC he works for TI, too, and might be willing to help.

I will ping Tony just to close the loop. I will be posting v4 today after making the changes. I was hoping to have some code review prior to posting v4 but have not received any comments so v4 will just be a patch rearrangement.

Dan

Quoted 4 lines

Thank you,
Pavel

Signature · 2 lines
------------------
Dan Murphy
#16 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 9 lines · Dan Murphy
Quoted 4 lines · Pavel Machek

Now... this is what I've suggested before. If you don't agree, you may want to contact Tony Lindgren, IIRC he works for TI, too, and might be willing to help.

I will ping Tony just to close the loop. I will be posting v4 today after making the changes. I was hoping to have some code review prior to posting v4 but have not received any comments so v4 will just be a patch rearrangement.

I guess not much to ping here though as I know little about these chips :) As long as Rob is happy with the binding changes I'll be happy too.

Regards,

Tony

#17 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Dan Murphy
Quoted 4 lines · Pavel Machek

Now... this is what I've suggested before. If you don't agree, you may want to contact Tony Lindgren, IIRC he works for TI, too, and might be willing to help.

Quoted 7 lines
Quoted 3 lines

I will ping Tony just to close the loop. I will be posting v4 today after making the changes. I was hoping to have some code review prior to posting v4 but have not received any comments so v4 will just be a patch rearrangement.

I guess not much to ping here though as I know little about these chips :) As long as Rob is happy with the binding changes I'll be happy too.

Well, question is more "how to make Rob happy". I see v4 is out, let me comment on that.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#18 lore raw

Re: [PATCH v3 2/9] dt-bindings: ti-lmu: Remove LM3697

In reply to Dan Murphy
Quoted 3 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.

What's with the odd 50 char line wrapping?

Quoted 4 lines
---
 .../devicetree/bindings/mfd/ti-lmu.txt        | 26 +------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

For the code:

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
author
#19 lore raw

PATCH v3 3/9 mfd: ti-lmu: Remove support for LM3697

In reply to Dan Murphy

Remove support for the LM3697 from the ti-lmu
driver in favor of a dedicated LED driver.

---
 drivers/leds/Kconfig                |  2 +-
 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 -
 5 files changed, 2 insertions(+), 64 deletions(-)
drivers/leds/Kconfig +1 -1
index dc717b30d9d3..853014dbb1c2 100644
@@ -762,7 +762,7 @@ config LEDS_TI_LMU_COMMON
 	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.
+	  LM3633, and LM3695.
 
 comment "LED Triggers"
 source "drivers/leds/trigger/Kconfig"
drivers/mfd/Kconfig +1 -1
index 11841f4b7b2b..9b04dd527c68 100644
@@ -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
index cfb411cde51c..b6bfa99a29dd 100644
@@ -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
index 09d5f30384e5..bc9272f08f47 100644
@@ -26,7 +26,6 @@ enum ti_lmu_id {
 	LM3632,
 	LM3633,
 	LM3695,
-	LM3697,
 	LMU_MAX_ID,
 };
 
Signature · 1 line
2.19.0
author
#20 lore raw

PATCH v3 4/9 dt-bindings: leds: Add bindings for lm3697 driver

In reply to Dan Murphy

Add 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
new file mode 100644
index 000000000000..4bb2ed51025b
@@ -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
maintainer
#21 lore raw

Re: [PATCH v3 4/9] dt-bindings: leds: Add bindings for lm3697 driver

Quoted 2 lines · Dan Murphy

Add the device tree bindings for the lm3697
LED driver for backlighting and display.

Bindings are for h/w, not drivers...

Quoted 114 lines
---
 .../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
new file mode 100644
index 000000000000..4bb2ed51025b
@@ -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
author
#22 lore raw

Re: [PATCH v3 4/9] dt-bindings: leds: Add bindings for lm3697 driver

Rob

Thanks for the review.

Quoted 6 lines · Rob Herring
Quoted 2 lines · Dan Murphy

Add the device tree bindings for the lm3697
LED driver for backlighting and display.

Bindings are for h/w, not drivers...

ACK

Dan

Quoted 114 lines
Quoted 114 lines
---
 .../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
new file mode 100644
index 000000000000..4bb2ed51025b
@@ -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
Signature · 2 lines
------------------
Dan Murphy
author
#23 lore raw

PATCH v3 5/9 leds: lm3697: Introduce the lm3697 driver

In reply to Dan Murphy

Introduce 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 | 381 +++++++++++++++++++++++++++++++++++++
 3 files changed, 389 insertions(+), 1 deletion(-)
 create mode 100644 drivers/leds/leds-lm3697.c
drivers/leds/Kconfig +7 -1
index 853014dbb1c2..7d9a98044be4 100644
@@ -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
index e09bb27bc7ea..6fbce7cfc41c 100644
@@ -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 +381 -0

381 lines not on this page · raw message

Signature · 1 line
2.19.0
author
#24 lore raw

PATCH v3 6/9 dt-bindings: ti-lmu: Remove LM3633

In reply to Dan Murphy

Remove support for the LM3633 LED device
from the ti-lmu. The LM3633 will be supported
via a stand alone LED driver.

---
 .../devicetree/bindings/mfd/ti-lmu.txt        | 48 -------------------
 1 file changed, 48 deletions(-)
Documentation/devicetree/bindings/mfd/ti-lmu.txt +0 -48
index 920f910be4e9..573e88578d3d 100644
@@ -7,7 +7,6 @@ TI LMU driver supports lighting devices below.
   LM3532       Backlight
   LM3631       Backlight and regulator
   LM3632       Backlight and regulator
-  LM3633       Backlight, LED and fault monitor
   LM3695       Backlight
 
 Required properties:
@@ -15,12 +14,10 @@ Required properties:
                 "ti,lm3532"
                 "ti,lm3631"
                 "ti,lm3632"
-                "ti,lm3633"
                 "ti,lm3695"
   - reg: I2C slave address.
          0x11 for LM3632
          0x29 for LM3631
-         0x36 for LM3633
          0x38 for LM3532
          0x63 for LM3695
 
@@ -157,51 +154,6 @@ lm3632@11 {
 	};
 };
 
-lm3633@36 {
-	compatible = "ti,lm3633";
-	reg = <0x36>;
-
-	enable-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>;
-
-	backlight {
-		compatible = "ti,lm3633-backlight";
-
-		main {
-			label = "main_lcd";
-			led-sources = <1 2>;
-			ramp-up-msec = <500>;
-			ramp-down-msec = <500>;
-		};
-
-		front {
-			label = "front_lcd";
-			led-sources = <0>;
-			ramp-up-msec = <1000>;
-			ramp-down-msec = <0>;
-		};
-	};
-
-	leds {
-		compatible = "ti,lm3633-leds";
-
-		chan1 {
-			label = "status";
-			led-sources = <1>;
-			led-max-microamp = <6000>;
-		};
-
-		chan345 {
-			label = "rgb";
-			led-sources = <3 4 5>;
-			led-max-microamp = <10000>;
-		};
-	};
-
-	fault-monitor {
-		compatible = "ti,lm3633-fault-monitor";
-	};
-};
-
 lm3695@63 {
 	compatible = "ti,lm3695";
 	reg = <0x63>;
Signature · 1 line
2.19.0
author
#25 lore raw

PATCH v3 7/9 mfd: ti-lmu: Remove support for LM3633

In reply to Dan Murphy

Remove support for the LM3633 from the ti-lmu
driver in favor of a dedicated LED driver.

---
 drivers/mfd/Kconfig  |  2 +-
 drivers/mfd/ti-lmu.c | 21 ---------------------
 2 files changed, 1 insertion(+), 22 deletions(-)
drivers/mfd/Kconfig +1 -1
index 9b04dd527c68..225cb3be350c 100644
@@ -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, and LM3695.
+	  TI LMU MFD supports LM3532, LM3631, LM3632, and LM3695.
 	  It consists of backlight, LED and regulator driver.
 	  It provides consistent device controls for lighting functions.
 
drivers/mfd/ti-lmu.c +0 -21
index b6bfa99a29dd..2cf8a23cba52 100644
@@ -102,24 +102,6 @@ static struct mfd_cell lm3632_devices[] = {
 	},
 };
 
-static struct mfd_cell lm3633_devices[] = {
-	{
-		.name          = "ti-lmu-backlight",
-		.id            = LM3633,
-		.of_compatible = "ti,lm3633-backlight",
-	},
-	{
-		.name          = "lm3633-leds",
-		.of_compatible = "ti,lm3633-leds",
-	},
-	/* Monitoring driver for open/short circuit detection */
-	{
-		.name          = "ti-lmu-fault-monitor",
-		.id            = LM3633,
-		.of_compatible = "ti,lm3633-fault-monitor",
-	},
-};
-
 static struct mfd_cell lm3695_devices[] = {
 	{
 		.name          = "ti-lmu-backlight",
@@ -139,14 +121,12 @@ static const struct ti_lmu_data chip##_data =	\
 TI_LMU_DATA(lm3532, LM3532_MAX_REG);
 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);
 
 static const struct of_device_id ti_lmu_of_match[] = {
 	{ .compatible = "ti,lm3532", .data = &lm3532_data },
 	{ .compatible = "ti,lm3631", .data = &lm3631_data },
 	{ .compatible = "ti,lm3632", .data = &lm3632_data },
-	{ .compatible = "ti,lm3633", .data = &lm3633_data },
 	{ .compatible = "ti,lm3695", .data = &lm3695_data },
 	{ }
 };
@@ -219,7 +199,6 @@ static const struct i2c_device_id ti_lmu_ids[] = {
 	{ "lm3532", LM3532 },
 	{ "lm3631", LM3631 },
 	{ "lm3632", LM3632 },
-	{ "lm3633", LM3633 },
 	{ "lm3695", LM3695 },
 	{ }
 };
Signature · 1 line
2.19.0
author
#26 lore raw

PATCH v3 8/9 dt-bindings: leds: Add support for the LM3633

In reply to Dan Murphy

Add 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
new file mode 100644
index 000000000000..d791b891ea6e
@@ -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
author
#27 lore raw

PATCH v3 9/9 leds: lm3633: Introduce the lm3633 driver

In reply to Dan Murphy

Introduce 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 | 556 +++++++++++++++++++++++++++++++++++++
 3 files changed, 565 insertions(+)
 create mode 100644 drivers/leds/leds-lm3633.c
drivers/leds/Kconfig +8 -0
index 7d9a98044be4..1f9093e5d902 100644
@@ -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
index 6fbce7cfc41c..6ec006892fc0 100644
@@ -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 +556 -0

556 lines not on this page · raw message

Signature · 1 line
2.19.0