Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt: bindings: as3645a: Use LED number to refer to LEDs

Use integers (reg property) to tell the number of the LED to the driver
instead of the node name. While both of these approaches are currently
used by the LED bindings, using integers will require less driver changes
for ACPI support. Additionally, it will make possible LED naming using
chip and LED node names, effectively making the label property most useful
for human-readable names only.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>

authored by

Sakari Ailus and committed by
Jacek Anaszewski
75f9f727 af2e658f

+18 -10
+18 -10
Documentation/devicetree/bindings/leds/ams,as3645a.txt
··· 15 15 16 16 compatible : Must be "ams,as3645a". 17 17 reg : The I2C address of the device. Typically 0x30. 18 + #address-cells : 1 19 + #size-cells : 0 18 20 19 21 20 - Required properties of the "flash" child node 21 - ============================================= 22 + Required properties of the flash child node (0) 23 + =============================================== 22 24 25 + reg: 0 23 26 flash-timeout-us: Flash timeout in microseconds. The value must be in 24 27 the range [100000, 850000] and divisible by 50000. 25 28 flash-max-microamp: Maximum flash current in microamperes. Has to be ··· 36 33 and divisible by 50000. 37 34 38 35 39 - Optional properties of the "flash" child node 40 - ============================================= 36 + Optional properties of the flash child node 37 + =========================================== 41 38 42 39 label : The label of the flash LED. 43 40 44 41 45 - Required properties of the "indicator" child node 46 - ================================================= 42 + Required properties of the indicator child node (1) 43 + =================================================== 47 44 45 + reg: 1 48 46 led-max-microamp: Maximum indicator current. The allowed values are 49 47 2500, 5000, 7500 and 10000. 50 48 51 - Optional properties of the "indicator" child node 52 - ================================================= 49 + Optional properties of the indicator child node 50 + =============================================== 53 51 54 52 label : The label of the indicator LED. 55 53 ··· 59 55 ======= 60 56 61 57 as3645a@30 { 58 + #address-cells: 1 59 + #size-cells: 0 62 60 reg = <0x30>; 63 61 compatible = "ams,as3645a"; 64 - flash { 62 + flash@0 { 63 + reg = <0x0>; 65 64 flash-timeout-us = <150000>; 66 65 flash-max-microamp = <320000>; 67 66 led-max-microamp = <60000>; 68 67 ams,input-max-microamp = <1750000>; 69 68 label = "as3645a:flash"; 70 69 }; 71 - indicator { 70 + indicator@1 { 71 + reg = <0x1>; 72 72 led-max-microamp = <10000>; 73 73 label = "as3645a:indicator"; 74 74 };