diff mbox

[PATCHv6] media: i2c/adp1653: Documentation for devicetree support for adp1653

Message ID 20150404074337.GA31064@amd (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Machek April 4, 2015, 7:43 a.m. UTC
Documentation for adp1653 binding.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

---

Please apply.

Sorry, wrong version of patch was sent last time.
									Pavel

Comments

Sakari Ailus April 4, 2015, 10:24 a.m. UTC | #1
Hi Pavel,

On Sat, Apr 04, 2015 at 09:43:37AM +0200, Pavel Machek wrote:
> 
> Documentation for adp1653 binding.

s/binding/bindings/

> 
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> ---
> 
> Please apply.
> 
> Sorry, wrong version of patch was sent last time.
> 									Pavel
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/adp1653.txt b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
> new file mode 100644
> index 0000000..4607ce3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
> @@ -0,0 +1,37 @@
> +* Analog Devices ADP1653 flash LED driver
> +
> +Required Properties:
> +
> +  - compatible: Must contain be "adi,adp1653"

s/be //

> +
> +  - reg: I2C slave address
> +
> +  - enable-gpios: Reference to the GPIO that controls the power for the chip.

How about:

enable-gpios: Specifier of the GPIO connected to EN pin

I can make the changes if you're ok with that, otherwise please send v7. Then
I'll apply that to my tree.
Pavel Machek April 4, 2015, 5:11 p.m. UTC | #2
Hi!

> enable-gpios: Specifier of the GPIO connected to EN pin
> 
> I can make the changes if you're ok with that, otherwise please send v7. Then
> I'll apply that to my tree.

I'm ok with that.

Thanks,
						Pavel
Sakari Ailus April 4, 2015, 8:03 p.m. UTC | #3
On Sat, Apr 04, 2015 at 07:11:16PM +0200, Pavel Machek wrote:
> Hi!
> 
> > enable-gpios: Specifier of the GPIO connected to EN pin
> > 
> > I can make the changes if you're ok with that, otherwise please send v7. Then
> > I'll apply that to my tree.
> 
> I'm ok with that.

Thanks. The patch is applied here:

	git://linuxtv.org/sailus/media_tree.git, branch adp1653
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/adp1653.txt b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
new file mode 100644
index 0000000..4607ce3
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
@@ -0,0 +1,37 @@ 
+* Analog Devices ADP1653 flash LED driver
+
+Required Properties:
+
+  - compatible: Must contain be "adi,adp1653"
+
+  - reg: I2C slave address
+
+  - enable-gpios: Reference to the GPIO that controls the power for the chip.
+
+There are two LED outputs available - flash and indicator. One LED is
+represented by one child node, nodes need to be named "flash" and "indicator".
+
+Required properties of the LED child node:
+- max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+
+Required properties of the flash LED child node:
+
+- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
+
+Example:
+
+	adp1653: led-controller@30 {
+		compatible = "adi,adp1653";
+		reg = <0x30>;
+		enable-gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>; /* 88 */
+
+		flash {
+			flash-timeout-us = <500000>;
+			flash-max-microamp = <320000>;
+			max-microamp = <50000>;
+		};
+		indicator {
+			max-microamp = <17500>;
+		};
+	};