All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] backlight: document sysfs interfaces
@ 2018-01-26 14:48 ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:48 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

Patchset contains documentation of the sysfs interfaces for the
following five backlight drivers-
1) lp8788
2) lp855x
3) lm3639
4) adp5520
5) adp8860

It was compiled from data sheets, reading code and git history logs.

Aishwarya Pant (5):
  backlight: lp8788: document sysfs attributes
  backlight: lp855: document sysfs attributes
  backlight: lm3639: document sysfs attributes
  backlight: adp5520: document sysfs attributes
  backlight: adp8860: document sysfs attributes

 .../ABI/testing/sysfs-class-backlight-adp5520      | 31 +++++++++++++
 .../ABI/testing/sysfs-class-backlight-adp8860      | 54 ++++++++++++++++++++++
 .../ABI/testing/sysfs-class-backlight-lm3639       | 13 ++++++
 .../ABI/testing/sysfs-class-backlight-lp855x       | 19 ++++++++
 .../ABI/testing/sysfs-class-backlight-lp8788       | 10 ++++
 5 files changed, 127 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788

-- 
2.16.1

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 0/5] backlight: document sysfs interfaces
@ 2018-01-26 14:48 ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:48 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

Patchset contains documentation of the sysfs interfaces for the
following five backlight drivers-
1) lp8788
2) lp855x
3) lm3639
4) adp5520
5) adp8860

It was compiled from data sheets, reading code and git history logs.

Aishwarya Pant (5):
  backlight: lp8788: document sysfs attributes
  backlight: lp855: document sysfs attributes
  backlight: lm3639: document sysfs attributes
  backlight: adp5520: document sysfs attributes
  backlight: adp8860: document sysfs attributes

 .../ABI/testing/sysfs-class-backlight-adp5520      | 31 +++++++++++++
 .../ABI/testing/sysfs-class-backlight-adp8860      | 54 ++++++++++++++++++++++
 .../ABI/testing/sysfs-class-backlight-lm3639       | 13 ++++++
 .../ABI/testing/sysfs-class-backlight-lp855x       | 19 ++++++++
 .../ABI/testing/sysfs-class-backlight-lp8788       | 10 ++++
 5 files changed, 127 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788

-- 
2.16.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 1/5] backlight: lp8788: document sysfs attributes
  2018-01-26 14:48 ` Aishwarya Pant
@ 2018-01-26 14:50   ` Aishwarya Pant
  -1 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:50 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Milo Kim
  Cc: Julia Lawall

Add documentation for sysfs interfaces of lp8788 backlight driver by
looking through the code and the git commit history.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
new file mode 100644
index 000000000000..c0e565c8d63d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
@@ -0,0 +1,10 @@
+sysfs interface for Texas Instruments lp8788 mfd backlight driver
+-----------------------------------------------------------------
+
+What:		/sys/class/backlight/<backlight>/bl_ctl_mode
+Date:		Feb, 2013
+KernelVersion:	v3.10
+Contact:	Milo Kim <milo.kim@ti.com>
+Description:
+		(RO) Displays whether the brightness is controlled by the PWM
+		input("PWM based") or the I2C register("Register based").
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 1/5] backlight: lp8788: document sysfs attributes
@ 2018-01-26 14:50   ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:50 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Milo Kim
  Cc: Julia Lawall

Add documentation for sysfs interfaces of lp8788 backlight driver by
looking through the code and the git commit history.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
new file mode 100644
index 000000000000..c0e565c8d63d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
@@ -0,0 +1,10 @@
+sysfs interface for Texas Instruments lp8788 mfd backlight driver
+-----------------------------------------------------------------
+
+What:		/sys/class/backlight/<backlight>/bl_ctl_mode
+Date:		Feb, 2013
+KernelVersion:	v3.10
+Contact:	Milo Kim <milo.kim@ti.com>
+Description:
+		(RO) Displays whether the brightness is controlled by the PWM
+		input("PWM based") or the I2C register("Register based").
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 2/5] backlight: lp855x: document sysfs attributes
  2018-01-26 14:48 ` Aishwarya Pant
@ 2018-01-26 14:53   ` Aishwarya Pant
  -1 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:53 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Milo Kim
  Cc: Julia Lawall

Add documentation for sysfs interface of Texas Instruments lp855x
backlight driver by reading code and looking through git commit logs.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 .../ABI/testing/sysfs-class-backlight-lp855x          | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
new file mode 100644
index 000000000000..5b9d38958875
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
@@ -0,0 +1,19 @@
+sysfs interface for Texas Instruments lp855x backlight driver
+------------------------------------------------------------
+
+What:		/sys/class/backlight/<backlight>/chip_id
+Date:		Mar, 2012
+KernelVersion:	v3.10
+Contact:	Milo Kim <milo.kim@ti.com>
+Description:
+		(RO) Displays the lp8755x chip id. Possible values are:
+		lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557.
+
+
+What:		/sys/class/backlight/<backlight>/bl_ctl_mode
+Date:		Mar, 2012
+KernelVersion:	v3.10
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description:
+		(RO) Displays whether the brightness is controlled by the pwm
+		input("pwm based) or the i2c register("register based").
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 2/5] backlight: lp855x: document sysfs attributes
@ 2018-01-26 14:53   ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:53 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Milo Kim
  Cc: Julia Lawall

Add documentation for sysfs interface of Texas Instruments lp855x
backlight driver by reading code and looking through git commit logs.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 .../ABI/testing/sysfs-class-backlight-lp855x          | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
new file mode 100644
index 000000000000..5b9d38958875
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
@@ -0,0 +1,19 @@
+sysfs interface for Texas Instruments lp855x backlight driver
+------------------------------------------------------------
+
+What:		/sys/class/backlight/<backlight>/chip_id
+Date:		Mar, 2012
+KernelVersion:	v3.10
+Contact:	Milo Kim <milo.kim@ti.com>
+Description:
+		(RO) Displays the lp8755x chip id. Possible values are:
+		lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557.
+
+
+What:		/sys/class/backlight/<backlight>/bl_ctl_mode
+Date:		Mar, 2012
+KernelVersion:	v3.10
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description:
+		(RO) Displays whether the brightness is controlled by the pwm
+		input("pwm based) or the i2c register("register based").
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 3/5] backlight: lm3639: document sysfs attributes
  2018-01-26 14:48 ` Aishwarya Pant
@ 2018-01-26 14:54   ` Aishwarya Pant
  -1 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:53 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

Add documentation for sysfs interfaces of Texas Instruments lm3639
backlight + flash led driver chip by looking through git commits and
reading code.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lm3639 b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
new file mode 100644
index 000000000000..ec87dc8f4395
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
@@ -0,0 +1,13 @@
+sysfs interface for Texas Instruments lm3639 backlight + flash led driver chip
+------------------------------------------------------------------------------
+
+What:		/sys/class/backlight/<backlight>/bled_mode
+Date:		Oct, 2012
+KernelVersion:	v3.10
+Contact:	Lee Jones <lee.jones@linaro.org>,
+		Daniel Thompson <daniel.thompson@linaro.org>,
+		Jingoo Han <jingoohan1@gmail.com>
+Description:
+		(WO) Write to the backlight mapping mode. The backlight current
+		can be mapped for either exponential (value "0") or linear
+		mapping modes (default).
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 3/5] backlight: lm3639: document sysfs attributes
@ 2018-01-26 14:54   ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:54 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

Add documentation for sysfs interfaces of Texas Instruments lm3639
backlight + flash led driver chip by looking through git commits and
reading code.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lm3639 b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
new file mode 100644
index 000000000000..ec87dc8f4395
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
@@ -0,0 +1,13 @@
+sysfs interface for Texas Instruments lm3639 backlight + flash led driver chip
+------------------------------------------------------------------------------
+
+What:		/sys/class/backlight/<backlight>/bled_mode
+Date:		Oct, 2012
+KernelVersion:	v3.10
+Contact:	Lee Jones <lee.jones@linaro.org>,
+		Daniel Thompson <daniel.thompson@linaro.org>,
+		Jingoo Han <jingoohan1@gmail.com>
+Description:
+		(WO) Write to the backlight mapping mode. The backlight current
+		can be mapped for either exponential (value "0") or linear
+		mapping modes (default).
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 4/5] backlight: adp5520: document sysfs attributes
  2018-01-26 14:48 ` Aishwarya Pant
@ 2018-01-26 14:55   ` Aishwarya Pant
  -1 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:54 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Michael Hennerich
  Cc: Julia Lawall

Add documentation for sysfs interface of adp5520/adp5501 analog devices
backlight driver by reading code and looking through git commit logs.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 .../ABI/testing/sysfs-class-backlight-adp5520      | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp5520 b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
new file mode 100644
index 000000000000..34b6ebafa210
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
@@ -0,0 +1,31 @@
+sysfs interface for analog devices adp5520(01) backlight driver
+---------------------------------------------------------------
+
+The backlight brightness control operates at three different levels for the
+adp5520 and adp5501 devices: daylight (level 1), office (level 2) and dark
+(level 3). By default the brightness operates at the daylight brightness level.
+
+What:		/sys/class/backlight/<backlight>/daylight_max
+What:		/sys/class/backlight/<backlight>/office_max
+What:		/sys/class/backlight/<backlight>/dark_max
+Date:		Sep, 2009
+KernelVersion:	v2.6.32
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Maximum current setting for the backlight when brightness
+		is at one of the three levels (daylight, office or dark). This
+		is an input code between 0 and 127, which is transformed to a
+		value between 0 mA and 30 mA using linear or non-linear
+		algorithms.
+
+What:		/sys/class/backlight/<backlight>/daylight_dim
+What:		/sys/class/backlight/<backlight>/office_dim
+What:		/sys/class/backlight/<backlight>/dark_dim
+Date:		Sep, 2009
+KernelVersion:	v2.6.32
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Dim current setting for the backlight when brightness is at
+		one of the three levels (daylight, office or dark). This is an
+		input code between 0 and 127, which is transformed to a value
+		between 0 mA and 30 mA using linear or non-linear algorithms.
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 4/5] backlight: adp5520: document sysfs attributes
@ 2018-01-26 14:55   ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:55 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Michael Hennerich
  Cc: Julia Lawall

Add documentation for sysfs interface of adp5520/adp5501 analog devices
backlight driver by reading code and looking through git commit logs.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 .../ABI/testing/sysfs-class-backlight-adp5520      | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp5520 b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
new file mode 100644
index 000000000000..34b6ebafa210
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
@@ -0,0 +1,31 @@
+sysfs interface for analog devices adp5520(01) backlight driver
+---------------------------------------------------------------
+
+The backlight brightness control operates at three different levels for the
+adp5520 and adp5501 devices: daylight (level 1), office (level 2) and dark
+(level 3). By default the brightness operates at the daylight brightness level.
+
+What:		/sys/class/backlight/<backlight>/daylight_max
+What:		/sys/class/backlight/<backlight>/office_max
+What:		/sys/class/backlight/<backlight>/dark_max
+Date:		Sep, 2009
+KernelVersion:	v2.6.32
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Maximum current setting for the backlight when brightness
+		is at one of the three levels (daylight, office or dark). This
+		is an input code between 0 and 127, which is transformed to a
+		value between 0 mA and 30 mA using linear or non-linear
+		algorithms.
+
+What:		/sys/class/backlight/<backlight>/daylight_dim
+What:		/sys/class/backlight/<backlight>/office_dim
+What:		/sys/class/backlight/<backlight>/dark_dim
+Date:		Sep, 2009
+KernelVersion:	v2.6.32
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Dim current setting for the backlight when brightness is at
+		one of the three levels (daylight, office or dark). This is an
+		input code between 0 and 127, which is transformed to a value
+		between 0 mA and 30 mA using linear or non-linear algorithms.
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 5/5] backlight: adp8860: document sysfs attributes
  2018-01-26 14:48 ` Aishwarya Pant
@ 2018-01-26 14:55   ` Aishwarya Pant
  -1 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:55 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Michael Hennerich
  Cc: Julia Lawall

Add documentation for sysfs interface of adp8860 series backlight
devices by reading through code and git commits.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 .../ABI/testing/sysfs-class-backlight-adp8860      | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp8860 b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
new file mode 100644
index 000000000000..54d61c788b1b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
@@ -0,0 +1,54 @@
+sysfs interface for analog devices adp8860 backlight driver
+-----------------------------------------------------------
+
+The backlight brightness control operates at three different levels for the
+adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and
+dark (level 3). By default the brightness operates at the daylight brightness
+level.
+
+What:		/sys/class/backlight/<backlight>/ambient_light_level
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RO) 13-bit conversion value for the first light sensor—high
+		byte (Bit 12 to Bit 8). The value is updated every 80 ms (when
+		the light sensor is enabled).
+
+
+What:		/sys/class/backlight/<backlight>/ambient_light_zone
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Read or write the specific level at which the backlight
+		operates. Value "0" enables automatic ambient light sensing, and
+		values "1", "2" or "3" set the control to daylight, office or
+		dark respectively.
+
+
+What:		/sys/class/backlight/<backlight>/l1_daylight_max
+What:		/sys/class/backlight/<backlight>/l2_office_max
+What:		/sys/class/backlight/<backlight>/l3_dark_max
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Maximum current setting for the backlight when brightness
+		is at one of the three levels (daylight, office or dark). This
+		is an input code between 0 and 127, which is transformed to a
+		value between 0 mA and 30 mA using linear or non-linear
+		algorithms.
+
+
+What:		/sys/class/backlight/<backlight>/l1_daylight_dim
+What:		/sys/class/backlight/<backlight>/l2_office_dim
+What:		/sys/class/backlight/<backlight>/l3_dark_dim
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Dim current setting for the backlight when brightness is at
+		one of the three levels (daylight, office or dark). This is an
+		input code between 0 and 127, which is transformed to a value
+		between 0 mA and 30 mA using linear or non-linear algorithms.
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 5/5] backlight: adp8860: document sysfs attributes
@ 2018-01-26 14:55   ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-01-26 14:55 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH, Michael Hennerich
  Cc: Julia Lawall

Add documentation for sysfs interface of adp8860 series backlight
devices by reading through code and git commits.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 .../ABI/testing/sysfs-class-backlight-adp8860      | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860

diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp8860 b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
new file mode 100644
index 000000000000..54d61c788b1b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
@@ -0,0 +1,54 @@
+sysfs interface for analog devices adp8860 backlight driver
+-----------------------------------------------------------
+
+The backlight brightness control operates at three different levels for the
+adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and
+dark (level 3). By default the brightness operates at the daylight brightness
+level.
+
+What:		/sys/class/backlight/<backlight>/ambient_light_level
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RO) 13-bit conversion value for the first light sensor—high
+		byte (Bit 12 to Bit 8). The value is updated every 80 ms (when
+		the light sensor is enabled).
+
+
+What:		/sys/class/backlight/<backlight>/ambient_light_zone
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Read or write the specific level at which the backlight
+		operates. Value "0" enables automatic ambient light sensing, and
+		values "1", "2" or "3" set the control to daylight, office or
+		dark respectively.
+
+
+What:		/sys/class/backlight/<backlight>/l1_daylight_max
+What:		/sys/class/backlight/<backlight>/l2_office_max
+What:		/sys/class/backlight/<backlight>/l3_dark_max
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Maximum current setting for the backlight when brightness
+		is at one of the three levels (daylight, office or dark). This
+		is an input code between 0 and 127, which is transformed to a
+		value between 0 mA and 30 mA using linear or non-linear
+		algorithms.
+
+
+What:		/sys/class/backlight/<backlight>/l1_daylight_dim
+What:		/sys/class/backlight/<backlight>/l2_office_dim
+What:		/sys/class/backlight/<backlight>/l3_dark_dim
+Date:		Apr, 2010
+KernelVersion:	v2.6.35
+Contact:	Michael Hennerich <michael.hennerich@analog.com>
+Description:
+		(RW) Dim current setting for the backlight when brightness is at
+		one of the three levels (daylight, office or dark). This is an
+		input code between 0 and 127, which is transformed to a value
+		between 0 mA and 30 mA using linear or non-linear algorithms.
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
  2018-01-26 14:50   ` Aishwarya Pant
  (?)
@ 2018-01-31 11:07   ` Daniel Thompson
  2018-01-31 11:51       ` Jani Nikula
  -1 siblings, 1 reply; 36+ messages in thread
From: Daniel Thompson @ 2018-01-31 11:07 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: Lee Jones, Jingoo Han, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev, linux-kernel, Jonathan Corbet, Greg KH, Milo Kim,
	Julia Lawall

On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
> Add documentation for sysfs interfaces of lp8788 backlight driver by
> looking through the code and the git commit history.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> new file mode 100644
> index 000000000000..c0e565c8d63d
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> @@ -0,0 +1,10 @@
> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
> +-----------------------------------------------------------------
> +
> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> +Date:		Feb, 2013
> +KernelVersion:	v3.10
> +Contact:	Milo Kim <milo.kim@ti.com>
> +Description:
> +		(RO) Displays whether the brightness is controlled by the PWM
> +		input("PWM based") or the I2C register("Register based").

I rather dislike drivers with this type of "bonus" sysfs controls. I'm
struggling to come up with any reason why the userspace would want to
read this control (and I think bl_ctl_mode gets the fewest hits after
searching with google hits of any search I've tried) . It looks to me 
like this is debug information that should never have gone into sysfs 
at all.

So I think this is either something that should go directly into
ABI/obsolete (with a fairly short expiry time) or perhaps simply
remove the property entirely.


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 3/5] backlight: lm3639: document sysfs attributes
  2018-01-26 14:54   ` Aishwarya Pant
  (?)
@ 2018-01-31 11:34     ` Daniel Thompson
  -1 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-01-31 11:34 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: Lee Jones, Jingoo Han, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev, linux-kernel, Jonathan Corbet, Greg KH,
	Julia Lawall

On Fri, Jan 26, 2018 at 08:23:57PM +0530, Aishwarya Pant wrote:
> Add documentation for sysfs interfaces of Texas Instruments lm3639
> backlight + flash led driver chip by looking through git commits and
> reading code.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lm3639 b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
> new file mode 100644
> index 000000000000..ec87dc8f4395
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
> @@ -0,0 +1,13 @@
> +sysfs interface for Texas Instruments lm3639 backlight + flash led driver chip
> +------------------------------------------------------------------------------
> +
> +What:		/sys/class/backlight/<backlight>/bled_mode
> +Date:		Oct, 2012
> +KernelVersion:	v3.10
> +Contact:	Lee Jones <lee.jones@linaro.org>,
> +		Daniel Thompson <daniel.thompson@linaro.org>,
> +		Jingoo Han <jingoohan1@gmail.com>

We've recently added a ML to MAINTAINERS (see
https://patchwork.kernel.org/patch/10169327/ ). I think a better Contact
might simply be:

Contact:	dri-devel@lists.freedesktop.org


> +Description:
> +		(WO) Write to the backlight mapping mode. The backlight current
> +		can be mapped for either exponential (value "0") or linear
> +		mapping modes (default).

The ambiguity of meaning w.r.t. linear or exponential is something of a thorn in 
the side of backlight... and so long as that ambiguity remains this
control is something the userspace may want to poke (albeit only once
during boot).

If you repost with an updated contact then please add my ack for this patch:
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 3/5] backlight: lm3639: document sysfs attributes
@ 2018-01-31 11:34     ` Daniel Thompson
  0 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-01-31 11:34 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, Jingoo Han,
	Jonathan Corbet, linux-kernel, dri-devel, Julia Lawall, Greg KH,
	Lee Jones

On Fri, Jan 26, 2018 at 08:23:57PM +0530, Aishwarya Pant wrote:
> Add documentation for sysfs interfaces of Texas Instruments lm3639
> backlight + flash led driver chip by looking through git commits and
> reading code.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lm3639 b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
> new file mode 100644
> index 000000000000..ec87dc8f4395
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
> @@ -0,0 +1,13 @@
> +sysfs interface for Texas Instruments lm3639 backlight + flash led driver chip
> +------------------------------------------------------------------------------
> +
> +What:		/sys/class/backlight/<backlight>/bled_mode
> +Date:		Oct, 2012
> +KernelVersion:	v3.10
> +Contact:	Lee Jones <lee.jones@linaro.org>,
> +		Daniel Thompson <daniel.thompson@linaro.org>,
> +		Jingoo Han <jingoohan1@gmail.com>

We've recently added a ML to MAINTAINERS (see
https://patchwork.kernel.org/patch/10169327/ ). I think a better Contact
might simply be:

Contact:	dri-devel@lists.freedesktop.org


> +Description:
> +		(WO) Write to the backlight mapping mode. The backlight current
> +		can be mapped for either exponential (value "0") or linear
> +		mapping modes (default).

The ambiguity of meaning w.r.t. linear or exponential is something of a thorn in 
the side of backlight... and so long as that ambiguity remains this
control is something the userspace may want to poke (albeit only once
during boot).

If you repost with an updated contact then please add my ack for this patch:
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 3/5] backlight: lm3639: document sysfs attributes
@ 2018-01-31 11:34     ` Daniel Thompson
  0 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-01-31 11:34 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, Jingoo Han,
	Jonathan Corbet, linux-kernel, dri-devel, Julia Lawall, Greg KH,
	Lee Jones

On Fri, Jan 26, 2018 at 08:23:57PM +0530, Aishwarya Pant wrote:
> Add documentation for sysfs interfaces of Texas Instruments lm3639
> backlight + flash led driver chip by looking through git commits and
> reading code.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lm3639 b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
> new file mode 100644
> index 000000000000..ec87dc8f4395
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lm3639
> @@ -0,0 +1,13 @@
> +sysfs interface for Texas Instruments lm3639 backlight + flash led driver chip
> +------------------------------------------------------------------------------
> +
> +What:		/sys/class/backlight/<backlight>/bled_mode
> +Date:		Oct, 2012
> +KernelVersion:	v3.10
> +Contact:	Lee Jones <lee.jones@linaro.org>,
> +		Daniel Thompson <daniel.thompson@linaro.org>,
> +		Jingoo Han <jingoohan1@gmail.com>

We've recently added a ML to MAINTAINERS (see
https://patchwork.kernel.org/patch/10169327/ ). I think a better Contact
might simply be:

Contact:	dri-devel@lists.freedesktop.org


> +Description:
> +		(WO) Write to the backlight mapping mode. The backlight current
> +		can be mapped for either exponential (value "0") or linear
> +		mapping modes (default).

The ambiguity of meaning w.r.t. linear or exponential is something of a thorn in 
the side of backlight... and so long as that ambiguity remains this
control is something the userspace may want to poke (albeit only once
during boot).

If you repost with an updated contact then please add my ack for this patch:
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
  2018-01-31 11:07   ` Daniel Thompson
  2018-01-31 11:51       ` Jani Nikula
@ 2018-01-31 11:51       ` Jani Nikula
  0 siblings, 0 replies; 36+ messages in thread
From: Jani Nikula @ 2018-01-31 11:51 UTC (permalink / raw)
  To: Daniel Thompson, Aishwarya Pant
  Cc: Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz, Jingoo Han,
	Jonathan Corbet, linux-kernel, dri-devel, Julia Lawall, Greg KH,
	Lee Jones

On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
>> Add documentation for sysfs interfaces of lp8788 backlight driver by
>> looking through the code and the git commit history.
>> 
>> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
>> ---
>>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> 
>> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> new file mode 100644
>> index 000000000000..c0e565c8d63d
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> @@ -0,0 +1,10 @@
>> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
>> +-----------------------------------------------------------------
>> +
>> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
>> +Date:		Feb, 2013
>> +KernelVersion:	v3.10
>> +Contact:	Milo Kim <milo.kim@ti.com>
>> +Description:
>> +		(RO) Displays whether the brightness is controlled by the PWM
>> +		input("PWM based") or the I2C register("Register based").
>
> I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> struggling to come up with any reason why the userspace would want to
> read this control (and I think bl_ctl_mode gets the fewest hits after
> searching with google hits of any search I've tried) . It looks to me 
> like this is debug information that should never have gone into sysfs 
> at all.

Agreed. I think the same holds for the other extra sysfs attributes. At
worst, having these prevents the backlight class from adding the names
later on, which is just backwards.

BR,
Jani.


>
> So I think this is either something that should go directly into
> ABI/obsolete (with a fairly short expiry time) or perhaps simply
> remove the property entirely.
>
>
> Daniel.
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
@ 2018-01-31 11:51       ` Jani Nikula
  0 siblings, 0 replies; 36+ messages in thread
From: Jani Nikula @ 2018-01-31 11:51 UTC (permalink / raw)
  To: Daniel Thompson, Aishwarya Pant
  Cc: Milo Kim, linux-fbdev, Jonathan Corbet, Jingoo Han,
	Bartlomiej Zolnierkiewicz, linux-kernel, dri-devel, Julia Lawall,
	Greg KH, Lee Jones

On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
>> Add documentation for sysfs interfaces of lp8788 backlight driver by
>> looking through the code and the git commit history.
>> 
>> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
>> ---
>>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> 
>> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> new file mode 100644
>> index 000000000000..c0e565c8d63d
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> @@ -0,0 +1,10 @@
>> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
>> +-----------------------------------------------------------------
>> +
>> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
>> +Date:		Feb, 2013
>> +KernelVersion:	v3.10
>> +Contact:	Milo Kim <milo.kim@ti.com>
>> +Description:
>> +		(RO) Displays whether the brightness is controlled by the PWM
>> +		input("PWM based") or the I2C register("Register based").
>
> I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> struggling to come up with any reason why the userspace would want to
> read this control (and I think bl_ctl_mode gets the fewest hits after
> searching with google hits of any search I've tried) . It looks to me 
> like this is debug information that should never have gone into sysfs 
> at all.

Agreed. I think the same holds for the other extra sysfs attributes. At
worst, having these prevents the backlight class from adding the names
later on, which is just backwards.

BR,
Jani.


>
> So I think this is either something that should go directly into
> ABI/obsolete (with a fairly short expiry time) or perhaps simply
> remove the property entirely.
>
>
> Daniel.
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
@ 2018-01-31 11:51       ` Jani Nikula
  0 siblings, 0 replies; 36+ messages in thread
From: Jani Nikula @ 2018-01-31 11:51 UTC (permalink / raw)
  To: Daniel Thompson, Aishwarya Pant
  Cc: Milo Kim, linux-fbdev, Jonathan Corbet, Jingoo Han,
	Bartlomiej Zolnierkiewicz, linux-kernel, dri-devel, Julia Lawall,
	Greg KH, Lee Jones

On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
>> Add documentation for sysfs interfaces of lp8788 backlight driver by
>> looking through the code and the git commit history.
>> 
>> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
>> ---
>>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> 
>> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> new file mode 100644
>> index 000000000000..c0e565c8d63d
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
>> @@ -0,0 +1,10 @@
>> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
>> +-----------------------------------------------------------------
>> +
>> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
>> +Date:		Feb, 2013
>> +KernelVersion:	v3.10
>> +Contact:	Milo Kim <milo.kim@ti.com>
>> +Description:
>> +		(RO) Displays whether the brightness is controlled by the PWM
>> +		input("PWM based") or the I2C register("Register based").
>
> I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> struggling to come up with any reason why the userspace would want to
> read this control (and I think bl_ctl_mode gets the fewest hits after
> searching with google hits of any search I've tried) . It looks to me 
> like this is debug information that should never have gone into sysfs 
> at all.

Agreed. I think the same holds for the other extra sysfs attributes. At
worst, having these prevents the backlight class from adding the names
later on, which is just backwards.

BR,
Jani.


>
> So I think this is either something that should go directly into
> ABI/obsolete (with a fairly short expiry time) or perhaps simply
> remove the property entirely.
>
>
> Daniel.
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/5] backlight: lp855x: document sysfs attributes
  2018-01-26 14:53   ` Aishwarya Pant
  (?)
@ 2018-02-01 11:06     ` Daniel Thompson
  -1 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-02-01 11:06 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: Lee Jones, Jingoo Han, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev, linux-kernel, Jonathan Corbet, Greg KH, Milo Kim,
	Julia Lawall

On Fri, Jan 26, 2018 at 08:23:00PM +0530, Aishwarya Pant wrote:
> Add documentation for sysfs interface of Texas Instruments lp855x
> backlight driver by reading code and looking through git commit logs.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  .../ABI/testing/sysfs-class-backlight-lp855x          | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> new file mode 100644
> index 000000000000..5b9d38958875
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> @@ -0,0 +1,19 @@
> +sysfs interface for Texas Instruments lp855x backlight driver
> +------------------------------------------------------------
> +
> +What:		/sys/class/backlight/<backlight>/chip_id
> +Date:		Mar, 2012
> +KernelVersion:	v3.10
> +Contact:	Milo Kim <milo.kim@ti.com>
> +Description:
> +		(RO) Displays the lp8755x chip id. Possible values are:
> +		lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557.
> +
> +
> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> +Date:		Mar, 2012
> +KernelVersion:	v3.10
> +Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
> +Description:
> +		(RO) Displays whether the brightness is controlled by the pwm
> +		input("pwm based) or the i2c register("register based").

Since like the first patch in the series, these look like they are for
debugging. That thread is still active but whatever the outcome of that
thread please assume it also applies to this patch.


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/5] backlight: lp855x: document sysfs attributes
@ 2018-02-01 11:06     ` Daniel Thompson
  0 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-02-01 11:06 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz, Jingoo Han,
	Jonathan Corbet, linux-kernel, dri-devel, Julia Lawall, Greg KH,
	Lee Jones

On Fri, Jan 26, 2018 at 08:23:00PM +0530, Aishwarya Pant wrote:
> Add documentation for sysfs interface of Texas Instruments lp855x
> backlight driver by reading code and looking through git commit logs.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  .../ABI/testing/sysfs-class-backlight-lp855x          | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> new file mode 100644
> index 000000000000..5b9d38958875
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> @@ -0,0 +1,19 @@
> +sysfs interface for Texas Instruments lp855x backlight driver
> +------------------------------------------------------------
> +
> +What:		/sys/class/backlight/<backlight>/chip_id
> +Date:		Mar, 2012
> +KernelVersion:	v3.10
> +Contact:	Milo Kim <milo.kim@ti.com>
> +Description:
> +		(RO) Displays the lp8755x chip id. Possible values are:
> +		lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557.
> +
> +
> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> +Date:		Mar, 2012
> +KernelVersion:	v3.10
> +Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
> +Description:
> +		(RO) Displays whether the brightness is controlled by the pwm
> +		input("pwm based) or the i2c register("register based").

Since like the first patch in the series, these look like they are for
debugging. That thread is still active but whatever the outcome of that
thread please assume it also applies to this patch.


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/5] backlight: lp855x: document sysfs attributes
@ 2018-02-01 11:06     ` Daniel Thompson
  0 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-02-01 11:06 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz, Jingoo Han,
	Jonathan Corbet, linux-kernel, dri-devel, Julia Lawall, Greg KH,
	Lee Jones

On Fri, Jan 26, 2018 at 08:23:00PM +0530, Aishwarya Pant wrote:
> Add documentation for sysfs interface of Texas Instruments lp855x
> backlight driver by reading code and looking through git commit logs.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  .../ABI/testing/sysfs-class-backlight-lp855x          | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> new file mode 100644
> index 000000000000..5b9d38958875
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> @@ -0,0 +1,19 @@
> +sysfs interface for Texas Instruments lp855x backlight driver
> +------------------------------------------------------------
> +
> +What:		/sys/class/backlight/<backlight>/chip_id
> +Date:		Mar, 2012
> +KernelVersion:	v3.10
> +Contact:	Milo Kim <milo.kim@ti.com>
> +Description:
> +		(RO) Displays the lp8755x chip id. Possible values are:
> +		lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557.
> +
> +
> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> +Date:		Mar, 2012
> +KernelVersion:	v3.10
> +Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
> +Description:
> +		(RO) Displays whether the brightness is controlled by the pwm
> +		input("pwm based) or the i2c register("register based").

Since like the first patch in the series, these look like they are for
debugging. That thread is still active but whatever the outcome of that
thread please assume it also applies to this patch.


Daniel.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
  2018-01-31 11:51       ` Jani Nikula
@ 2018-02-01 11:36         ` Daniel Thompson
  -1 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-02-01 11:36 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Aishwarya Pant, Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz,
	Jingoo Han, Jonathan Corbet, linux-kernel, dri-devel,
	Julia Lawall, Greg KH, Lee Jones

On Wed, Jan 31, 2018 at 01:51:21PM +0200, Jani Nikula wrote:
> On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> > On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
> >> Add documentation for sysfs interfaces of lp8788 backlight driver by
> >> looking through the code and the git commit history.
> >> 
> >> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> >> ---
> >>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
> >> 
> >> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> >> new file mode 100644
> >> index 000000000000..c0e565c8d63d
> >> --- /dev/null
> >> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> >> @@ -0,0 +1,10 @@
> >> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
> >> +-----------------------------------------------------------------
> >> +
> >> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> >> +Date:		Feb, 2013
> >> +KernelVersion:	v3.10
> >> +Contact:	Milo Kim <milo.kim@ti.com>
> >> +Description:
> >> +		(RO) Displays whether the brightness is controlled by the PWM
> >> +		input("PWM based") or the I2C register("Register based").
> >
> > I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> > struggling to come up with any reason why the userspace would want to
> > read this control (and I think bl_ctl_mode gets the fewest hits after
> > searching with google hits of any search I've tried) . It looks to me 
> > like this is debug information that should never have gone into sysfs 
> > at all.
> 
> Agreed. I think the same holds for the other extra sysfs attributes. At
> worst, having these prevents the backlight class from adding the names
> later on, which is just backwards.

The problem is that they do exist...

For controls which appear to be misplaced debug attributes I think I am
happy to nuke the values entirely. It is extremely improbable that any
userspace will notice.

Unfortunately some of the controls look like they could be poked by an
custom userspace so I'm quite so confident about nuking these ones...and if we
don't nuke we should document (so thanks Aishwarya!). 


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
@ 2018-02-01 11:36         ` Daniel Thompson
  0 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-02-01 11:36 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Aishwarya Pant, Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz,
	Jingoo Han, Jonathan Corbet, linux-kernel, dri-devel,
	Julia Lawall, Greg KH, Lee Jones

On Wed, Jan 31, 2018 at 01:51:21PM +0200, Jani Nikula wrote:
> On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> > On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
> >> Add documentation for sysfs interfaces of lp8788 backlight driver by
> >> looking through the code and the git commit history.
> >> 
> >> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> >> ---
> >>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
> >> 
> >> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> >> new file mode 100644
> >> index 000000000000..c0e565c8d63d
> >> --- /dev/null
> >> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> >> @@ -0,0 +1,10 @@
> >> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
> >> +-----------------------------------------------------------------
> >> +
> >> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> >> +Date:		Feb, 2013
> >> +KernelVersion:	v3.10
> >> +Contact:	Milo Kim <milo.kim@ti.com>
> >> +Description:
> >> +		(RO) Displays whether the brightness is controlled by the PWM
> >> +		input("PWM based") or the I2C register("Register based").
> >
> > I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> > struggling to come up with any reason why the userspace would want to
> > read this control (and I think bl_ctl_mode gets the fewest hits after
> > searching with google hits of any search I've tried) . It looks to me 
> > like this is debug information that should never have gone into sysfs 
> > at all.
> 
> Agreed. I think the same holds for the other extra sysfs attributes. At
> worst, having these prevents the backlight class from adding the names
> later on, which is just backwards.

The problem is that they do exist...

For controls which appear to be misplaced debug attributes I think I am
happy to nuke the values entirely. It is extremely improbable that any
userspace will notice.

Unfortunately some of the controls look like they could be poked by an
custom userspace so I'm quite so confident about nuking these ones...and if we
don't nuke we should document (so thanks Aishwarya!). 


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/5] backlight: lp855x: document sysfs attributes
  2018-02-01 11:06     ` Daniel Thompson
@ 2018-02-01 15:58       ` Aishwarya Pant
  -1 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-02-01 15:46 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Lee Jones, Jingoo Han, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev, linux-kernel, Jonathan Corbet, Greg KH, Milo Kim,
	Julia Lawall

On Thu, Feb 01, 2018 at 11:06:42AM +0000, Daniel Thompson wrote:
> On Fri, Jan 26, 2018 at 08:23:00PM +0530, Aishwarya Pant wrote:
> > Add documentation for sysfs interface of Texas Instruments lp855x
> > backlight driver by reading code and looking through git commit logs.
> > 
> > Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> > ---
> >  .../ABI/testing/sysfs-class-backlight-lp855x          | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> > new file mode 100644
> > index 000000000000..5b9d38958875
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> > @@ -0,0 +1,19 @@
> > +sysfs interface for Texas Instruments lp855x backlight driver
> > +------------------------------------------------------------
> > +
> > +What:		/sys/class/backlight/<backlight>/chip_id
> > +Date:		Mar, 2012
> > +KernelVersion:	v3.10
> > +Contact:	Milo Kim <milo.kim@ti.com>
> > +Description:
> > +		(RO) Displays the lp8755x chip id. Possible values are:
> > +		lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557.
> > +
> > +
> > +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> > +Date:		Mar, 2012
> > +KernelVersion:	v3.10
> > +Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
> > +Description:
> > +		(RO) Displays whether the brightness is controlled by the pwm
> > +		input("pwm based) or the i2c register("register based").
> 
> Since like the first patch in the series, these look like they are for
> debugging. That thread is still active but whatever the outcome of that
> thread please assume it also applies to this patch.

All right, I'll wait for conclusion on that thread before I re-send the patchset
with the updates.

Aishwarya

> 
> 
> Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/5] backlight: lp855x: document sysfs attributes
@ 2018-02-01 15:58       ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-02-01 15:58 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Lee Jones, Jingoo Han, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev, linux-kernel, Jonathan Corbet, Greg KH, Milo Kim,
	Julia Lawall

On Thu, Feb 01, 2018 at 11:06:42AM +0000, Daniel Thompson wrote:
> On Fri, Jan 26, 2018 at 08:23:00PM +0530, Aishwarya Pant wrote:
> > Add documentation for sysfs interface of Texas Instruments lp855x
> > backlight driver by reading code and looking through git commit logs.
> > 
> > Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> > ---
> >  .../ABI/testing/sysfs-class-backlight-lp855x          | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> > new file mode 100644
> > index 000000000000..5b9d38958875
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x
> > @@ -0,0 +1,19 @@
> > +sysfs interface for Texas Instruments lp855x backlight driver
> > +------------------------------------------------------------
> > +
> > +What:		/sys/class/backlight/<backlight>/chip_id
> > +Date:		Mar, 2012
> > +KernelVersion:	v3.10
> > +Contact:	Milo Kim <milo.kim@ti.com>
> > +Description:
> > +		(RO) Displays the lp8755x chip id. Possible values are:
> > +		lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557.
> > +
> > +
> > +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> > +Date:		Mar, 2012
> > +KernelVersion:	v3.10
> > +Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
> > +Description:
> > +		(RO) Displays whether the brightness is controlled by the pwm
> > +		input("pwm based) or the i2c register("register based").
> 
> Since like the first patch in the series, these look like they are for
> debugging. That thread is still active but whatever the outcome of that
> thread please assume it also applies to this patch.

All right, I'll wait for conclusion on that thread before I re-send the patchset
with the updates.

Aishwarya

> 
> 
> Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 4/5] backlight: adp5520: document sysfs attributes
  2018-01-26 14:55   ` Aishwarya Pant
  (?)
@ 2018-02-01 16:28     ` Michael Hennerich
  -1 siblings, 0 replies; 36+ messages in thread
From: Michael Hennerich @ 2018-02-01 16:28 UTC (permalink / raw)
  To: Aishwarya Pant, Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

On 26.01.2018 15:54, Aishwarya Pant wrote:
> Add documentation for sysfs interface of adp5520/adp5501 analog devices
> backlight driver by reading code and looking through git commit logs.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   .../ABI/testing/sysfs-class-backlight-adp5520      | 31 ++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp5520 b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
> new file mode 100644
> index 000000000000..34b6ebafa210
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
> @@ -0,0 +1,31 @@
> +sysfs interface for analog devices adp5520(01) backlight driver
> +---------------------------------------------------------------
> +
> +The backlight brightness control operates at three different levels for the
> +adp5520 and adp5501 devices: daylight (level 1), office (level 2) and dark
> +(level 3). By default the brightness operates at the daylight brightness level.
> +
> +What:		/sys/class/backlight/<backlight>/daylight_max
> +What:		/sys/class/backlight/<backlight>/office_max
> +What:		/sys/class/backlight/<backlight>/dark_max
> +Date:		Sep, 2009
> +KernelVersion:	v2.6.32
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Maximum current setting for the backlight when brightness
> +		is at one of the three levels (daylight, office or dark). This
> +		is an input code between 0 and 127, which is transformed to a
> +		value between 0 mA and 30 mA using linear or non-linear
> +		algorithms.
> +
> +What:		/sys/class/backlight/<backlight>/daylight_dim
> +What:		/sys/class/backlight/<backlight>/office_dim
> +What:		/sys/class/backlight/<backlight>/dark_dim
> +Date:		Sep, 2009
> +KernelVersion:	v2.6.32
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Dim current setting for the backlight when brightness is at
> +		one of the three levels (daylight, office or dark). This is an
> +		input code between 0 and 127, which is transformed to a value
> +		between 0 mA and 30 mA using linear or non-linear algorithms.
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 4/5] backlight: adp5520: document sysfs attributes
@ 2018-02-01 16:28     ` Michael Hennerich
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Hennerich @ 2018-02-01 16:28 UTC (permalink / raw)
  To: Aishwarya Pant, Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

On 26.01.2018 15:54, Aishwarya Pant wrote:
> Add documentation for sysfs interface of adp5520/adp5501 analog devices
> backlight driver by reading code and looking through git commit logs.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   .../ABI/testing/sysfs-class-backlight-adp5520      | 31 ++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp5520 b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
> new file mode 100644
> index 000000000000..34b6ebafa210
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
> @@ -0,0 +1,31 @@
> +sysfs interface for analog devices adp5520(01) backlight driver
> +---------------------------------------------------------------
> +
> +The backlight brightness control operates at three different levels for the
> +adp5520 and adp5501 devices: daylight (level 1), office (level 2) and dark
> +(level 3). By default the brightness operates at the daylight brightness level.
> +
> +What:		/sys/class/backlight/<backlight>/daylight_max
> +What:		/sys/class/backlight/<backlight>/office_max
> +What:		/sys/class/backlight/<backlight>/dark_max
> +Date:		Sep, 2009
> +KernelVersion:	v2.6.32
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Maximum current setting for the backlight when brightness
> +		is at one of the three levels (daylight, office or dark). This
> +		is an input code between 0 and 127, which is transformed to a
> +		value between 0 mA and 30 mA using linear or non-linear
> +		algorithms.
> +
> +What:		/sys/class/backlight/<backlight>/daylight_dim
> +What:		/sys/class/backlight/<backlight>/office_dim
> +What:		/sys/class/backlight/<backlight>/dark_dim
> +Date:		Sep, 2009
> +KernelVersion:	v2.6.32
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Dim current setting for the backlight when brightness is at
> +		one of the three levels (daylight, office or dark). This is an
> +		input code between 0 and 127, which is transformed to a value
> +		between 0 mA and 30 mA using linear or non-linear algorithms.
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 4/5] backlight: adp5520: document sysfs attributes
@ 2018-02-01 16:28     ` Michael Hennerich
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Hennerich @ 2018-02-01 16:28 UTC (permalink / raw)
  To: Aishwarya Pant, Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

On 26.01.2018 15:54, Aishwarya Pant wrote:
> Add documentation for sysfs interface of adp5520/adp5501 analog devices
> backlight driver by reading code and looking through git commit logs.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   .../ABI/testing/sysfs-class-backlight-adp5520      | 31 ++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp5520 b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
> new file mode 100644
> index 000000000000..34b6ebafa210
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp5520
> @@ -0,0 +1,31 @@
> +sysfs interface for analog devices adp5520(01) backlight driver
> +---------------------------------------------------------------
> +
> +The backlight brightness control operates at three different levels for the
> +adp5520 and adp5501 devices: daylight (level 1), office (level 2) and dark
> +(level 3). By default the brightness operates at the daylight brightness level.
> +
> +What:		/sys/class/backlight/<backlight>/daylight_max
> +What:		/sys/class/backlight/<backlight>/office_max
> +What:		/sys/class/backlight/<backlight>/dark_max
> +Date:		Sep, 2009
> +KernelVersion:	v2.6.32
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Maximum current setting for the backlight when brightness
> +		is at one of the three levels (daylight, office or dark). This
> +		is an input code between 0 and 127, which is transformed to a
> +		value between 0 mA and 30 mA using linear or non-linear
> +		algorithms.
> +
> +What:		/sys/class/backlight/<backlight>/daylight_dim
> +What:		/sys/class/backlight/<backlight>/office_dim
> +What:		/sys/class/backlight/<backlight>/dark_dim
> +Date:		Sep, 2009
> +KernelVersion:	v2.6.32
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Dim current setting for the backlight when brightness is at
> +		one of the three levels (daylight, office or dark). This is an
> +		input code between 0 and 127, which is transformed to a value
> +		between 0 mA and 30 mA using linear or non-linear algorithms.
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 5/5] backlight: adp8860: document sysfs attributes
  2018-01-26 14:55   ` Aishwarya Pant
  (?)
@ 2018-02-01 16:28     ` Michael Hennerich
  -1 siblings, 0 replies; 36+ messages in thread
From: Michael Hennerich @ 2018-02-01 16:28 UTC (permalink / raw)
  To: Aishwarya Pant, Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

On 26.01.2018 15:55, Aishwarya Pant wrote:
> Add documentation for sysfs interface of adp8860 series backlight
> devices by reading through code and git commits.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   .../ABI/testing/sysfs-class-backlight-adp8860      | 54 ++++++++++++++++++++++
>   1 file changed, 54 insertions(+)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp8860 b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
> new file mode 100644
> index 000000000000..54d61c788b1b
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
> @@ -0,0 +1,54 @@
> +sysfs interface for analog devices adp8860 backlight driver
> +-----------------------------------------------------------
> +
> +The backlight brightness control operates at three different levels for the
> +adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and
> +dark (level 3). By default the brightness operates at the daylight brightness
> +level.
> +
> +What:		/sys/class/backlight/<backlight>/ambient_light_level
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RO) 13-bit conversion value for the first light sensor—high
> +		byte (Bit 12 to Bit 8). The value is updated every 80 ms (when
> +		the light sensor is enabled).
> +
> +
> +What:		/sys/class/backlight/<backlight>/ambient_light_zone
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Read or write the specific level at which the backlight
> +		operates. Value "0" enables automatic ambient light sensing, and
> +		values "1", "2" or "3" set the control to daylight, office or
> +		dark respectively.
> +
> +
> +What:		/sys/class/backlight/<backlight>/l1_daylight_max
> +What:		/sys/class/backlight/<backlight>/l2_office_max
> +What:		/sys/class/backlight/<backlight>/l3_dark_max
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Maximum current setting for the backlight when brightness
> +		is at one of the three levels (daylight, office or dark). This
> +		is an input code between 0 and 127, which is transformed to a
> +		value between 0 mA and 30 mA using linear or non-linear
> +		algorithms.
> +
> +
> +What:		/sys/class/backlight/<backlight>/l1_daylight_dim
> +What:		/sys/class/backlight/<backlight>/l2_office_dim
> +What:		/sys/class/backlight/<backlight>/l3_dark_dim
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Dim current setting for the backlight when brightness is at
> +		one of the three levels (daylight, office or dark). This is an
> +		input code between 0 and 127, which is transformed to a value
> +		between 0 mA and 30 mA using linear or non-linear algorithms.
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 5/5] backlight: adp8860: document sysfs attributes
@ 2018-02-01 16:28     ` Michael Hennerich
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Hennerich @ 2018-02-01 16:28 UTC (permalink / raw)
  To: Aishwarya Pant, Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

On 26.01.2018 15:55, Aishwarya Pant wrote:
> Add documentation for sysfs interface of adp8860 series backlight
> devices by reading through code and git commits.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   .../ABI/testing/sysfs-class-backlight-adp8860      | 54 ++++++++++++++++++++++
>   1 file changed, 54 insertions(+)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp8860 b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
> new file mode 100644
> index 000000000000..54d61c788b1b
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
> @@ -0,0 +1,54 @@
> +sysfs interface for analog devices adp8860 backlight driver
> +-----------------------------------------------------------
> +
> +The backlight brightness control operates at three different levels for the
> +adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and
> +dark (level 3). By default the brightness operates at the daylight brightness
> +level.
> +
> +What:		/sys/class/backlight/<backlight>/ambient_light_level
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RO) 13-bit conversion value for the first light sensor—high
> +		byte (Bit 12 to Bit 8). The value is updated every 80 ms (when
> +		the light sensor is enabled).
> +
> +
> +What:		/sys/class/backlight/<backlight>/ambient_light_zone
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Read or write the specific level at which the backlight
> +		operates. Value "0" enables automatic ambient light sensing, and
> +		values "1", "2" or "3" set the control to daylight, office or
> +		dark respectively.
> +
> +
> +What:		/sys/class/backlight/<backlight>/l1_daylight_max
> +What:		/sys/class/backlight/<backlight>/l2_office_max
> +What:		/sys/class/backlight/<backlight>/l3_dark_max
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Maximum current setting for the backlight when brightness
> +		is at one of the three levels (daylight, office or dark). This
> +		is an input code between 0 and 127, which is transformed to a
> +		value between 0 mA and 30 mA using linear or non-linear
> +		algorithms.
> +
> +
> +What:		/sys/class/backlight/<backlight>/l1_daylight_dim
> +What:		/sys/class/backlight/<backlight>/l2_office_dim
> +What:		/sys/class/backlight/<backlight>/l3_dark_dim
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Dim current setting for the backlight when brightness is at
> +		one of the three levels (daylight, office or dark). This is an
> +		input code between 0 and 127, which is transformed to a value
> +		between 0 mA and 30 mA using linear or non-linear algorithms.
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 5/5] backlight: adp8860: document sysfs attributes
@ 2018-02-01 16:28     ` Michael Hennerich
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Hennerich @ 2018-02-01 16:28 UTC (permalink / raw)
  To: Aishwarya Pant, Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
	Jonathan Corbet, Greg KH
  Cc: Julia Lawall

On 26.01.2018 15:55, Aishwarya Pant wrote:
> Add documentation for sysfs interface of adp8860 series backlight
> devices by reading through code and git commits.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   .../ABI/testing/sysfs-class-backlight-adp8860      | 54 ++++++++++++++++++++++
>   1 file changed, 54 insertions(+)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp8860 b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
> new file mode 100644
> index 000000000000..54d61c788b1b
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp8860
> @@ -0,0 +1,54 @@
> +sysfs interface for analog devices adp8860 backlight driver
> +-----------------------------------------------------------
> +
> +The backlight brightness control operates at three different levels for the
> +adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and
> +dark (level 3). By default the brightness operates at the daylight brightness
> +level.
> +
> +What:		/sys/class/backlight/<backlight>/ambient_light_level
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RO) 13-bit conversion value for the first light sensor—high
> +		byte (Bit 12 to Bit 8). The value is updated every 80 ms (when
> +		the light sensor is enabled).
> +
> +
> +What:		/sys/class/backlight/<backlight>/ambient_light_zone
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Read or write the specific level at which the backlight
> +		operates. Value "0" enables automatic ambient light sensing, and
> +		values "1", "2" or "3" set the control to daylight, office or
> +		dark respectively.
> +
> +
> +What:		/sys/class/backlight/<backlight>/l1_daylight_max
> +What:		/sys/class/backlight/<backlight>/l2_office_max
> +What:		/sys/class/backlight/<backlight>/l3_dark_max
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Maximum current setting for the backlight when brightness
> +		is at one of the three levels (daylight, office or dark). This
> +		is an input code between 0 and 127, which is transformed to a
> +		value between 0 mA and 30 mA using linear or non-linear
> +		algorithms.
> +
> +
> +What:		/sys/class/backlight/<backlight>/l1_daylight_dim
> +What:		/sys/class/backlight/<backlight>/l2_office_dim
> +What:		/sys/class/backlight/<backlight>/l3_dark_dim
> +Date:		Apr, 2010
> +KernelVersion:	v2.6.35
> +Contact:	Michael Hennerich <michael.hennerich@analog.com>
> +Description:
> +		(RW) Dim current setting for the backlight when brightness is at
> +		one of the three levels (daylight, office or dark). This is an
> +		input code between 0 and 127, which is transformed to a value
> +		between 0 mA and 30 mA using linear or non-linear algorithms.
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
  2018-02-01 11:36         ` Daniel Thompson
@ 2018-02-05  7:37           ` Aishwarya Pant
  -1 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-02-05  7:25 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Jani Nikula, Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz,
	Jingoo Han, Jonathan Corbet, linux-kernel, dri-devel,
	Julia Lawall, Greg KH, Lee Jones

On Thu, Feb 01, 2018 at 11:36:04AM +0000, Daniel Thompson wrote:
> On Wed, Jan 31, 2018 at 01:51:21PM +0200, Jani Nikula wrote:
> > On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> > > On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
> > >> Add documentation for sysfs interfaces of lp8788 backlight driver by
> > >> looking through the code and the git commit history.
> > >> 
> > >> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> > >> ---
> > >>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
> > >>  1 file changed, 10 insertions(+)
> > >>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > >> 
> > >> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > >> new file mode 100644
> > >> index 000000000000..c0e565c8d63d
> > >> --- /dev/null
> > >> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > >> @@ -0,0 +1,10 @@
> > >> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
> > >> +-----------------------------------------------------------------
> > >> +
> > >> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> > >> +Date:		Feb, 2013
> > >> +KernelVersion:	v3.10
> > >> +Contact:	Milo Kim <milo.kim@ti.com>
> > >> +Description:
> > >> +		(RO) Displays whether the brightness is controlled by the PWM
> > >> +		input("PWM based") or the I2C register("Register based").
> > >
> > > I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> > > struggling to come up with any reason why the userspace would want to
> > > read this control (and I think bl_ctl_mode gets the fewest hits after
> > > searching with google hits of any search I've tried) . It looks to me 
> > > like this is debug information that should never have gone into sysfs 
> > > at all.
> > 
> > Agreed. I think the same holds for the other extra sysfs attributes. At
> > worst, having these prevents the backlight class from adding the names
> > later on, which is just backwards.
> 
> The problem is that they do exist...
> 
> For controls which appear to be misplaced debug attributes I think I am
> happy to nuke the values entirely. It is extremely improbable that any
> userspace will notice.
> 
> Unfortunately some of the controls look like they could be poked by an
> custom userspace so I'm quite so confident about nuking these ones...and if we
> don't nuke we should document (so thanks Aishwarya!). 
> 

Hi

Thanks for reviewing. Should I take it to assume that we would like to keep the
debug-like attributes in documentation for now?

Aishwarya

> 
> Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
@ 2018-02-05  7:37           ` Aishwarya Pant
  0 siblings, 0 replies; 36+ messages in thread
From: Aishwarya Pant @ 2018-02-05  7:37 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Jani Nikula, Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz,
	Jingoo Han, Jonathan Corbet, linux-kernel, dri-devel,
	Julia Lawall, Greg KH, Lee Jones

On Thu, Feb 01, 2018 at 11:36:04AM +0000, Daniel Thompson wrote:
> On Wed, Jan 31, 2018 at 01:51:21PM +0200, Jani Nikula wrote:
> > On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> > > On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
> > >> Add documentation for sysfs interfaces of lp8788 backlight driver by
> > >> looking through the code and the git commit history.
> > >> 
> > >> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> > >> ---
> > >>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
> > >>  1 file changed, 10 insertions(+)
> > >>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > >> 
> > >> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > >> new file mode 100644
> > >> index 000000000000..c0e565c8d63d
> > >> --- /dev/null
> > >> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > >> @@ -0,0 +1,10 @@
> > >> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
> > >> +-----------------------------------------------------------------
> > >> +
> > >> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> > >> +Date:		Feb, 2013
> > >> +KernelVersion:	v3.10
> > >> +Contact:	Milo Kim <milo.kim@ti.com>
> > >> +Description:
> > >> +		(RO) Displays whether the brightness is controlled by the PWM
> > >> +		input("PWM based") or the I2C register("Register based").
> > >
> > > I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> > > struggling to come up with any reason why the userspace would want to
> > > read this control (and I think bl_ctl_mode gets the fewest hits after
> > > searching with google hits of any search I've tried) . It looks to me 
> > > like this is debug information that should never have gone into sysfs 
> > > at all.
> > 
> > Agreed. I think the same holds for the other extra sysfs attributes. At
> > worst, having these prevents the backlight class from adding the names
> > later on, which is just backwards.
> 
> The problem is that they do exist...
> 
> For controls which appear to be misplaced debug attributes I think I am
> happy to nuke the values entirely. It is extremely improbable that any
> userspace will notice.
> 
> Unfortunately some of the controls look like they could be poked by an
> custom userspace so I'm quite so confident about nuking these ones...and if we
> don't nuke we should document (so thanks Aishwarya!). 
> 

Hi

Thanks for reviewing. Should I take it to assume that we would like to keep the
debug-like attributes in documentation for now?

Aishwarya

> 
> Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
  2018-02-05  7:37           ` Aishwarya Pant
@ 2018-02-05 14:39             ` Daniel Thompson
  -1 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-02-05 14:39 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: Jani Nikula, Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz,
	Jingoo Han, Jonathan Corbet, linux-kernel, dri-devel,
	Julia Lawall, Greg KH, Lee Jones

On Mon, Feb 05, 2018 at 12:55:50PM +0530, Aishwarya Pant wrote:
> On Thu, Feb 01, 2018 at 11:36:04AM +0000, Daniel Thompson wrote:
> > On Wed, Jan 31, 2018 at 01:51:21PM +0200, Jani Nikula wrote:
> > > On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> > > > On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
> > > >> Add documentation for sysfs interfaces of lp8788 backlight driver by
> > > >> looking through the code and the git commit history.
> > > >> 
> > > >> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> > > >> ---
> > > >>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
> > > >>  1 file changed, 10 insertions(+)
> > > >>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > > >> 
> > > >> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > > >> new file mode 100644
> > > >> index 000000000000..c0e565c8d63d
> > > >> --- /dev/null
> > > >> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > > >> @@ -0,0 +1,10 @@
> > > >> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
> > > >> +-----------------------------------------------------------------
> > > >> +
> > > >> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> > > >> +Date:		Feb, 2013
> > > >> +KernelVersion:	v3.10
> > > >> +Contact:	Milo Kim <milo.kim@ti.com>
> > > >> +Description:
> > > >> +		(RO) Displays whether the brightness is controlled by the PWM
> > > >> +		input("PWM based") or the I2C register("Register based").
> > > >
> > > > I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> > > > struggling to come up with any reason why the userspace would want to
> > > > read this control (and I think bl_ctl_mode gets the fewest hits after
> > > > searching with google hits of any search I've tried) . It looks to me 
> > > > like this is debug information that should never have gone into sysfs 
> > > > at all.
> > > 
> > > Agreed. I think the same holds for the other extra sysfs attributes. At
> > > worst, having these prevents the backlight class from adding the names
> > > later on, which is just backwards.
> > 
> > The problem is that they do exist...
> > 
> > For controls which appear to be misplaced debug attributes I think I am
> > happy to nuke the values entirely. It is extremely improbable that any
> > userspace will notice.
> > 
> > Unfortunately some of the controls look like they could be poked by an
> > custom userspace so I'm quite so confident about nuking these ones...and if we
> > don't nuke we should document (so thanks Aishwarya!). 
> > 
> 
> Hi
> 
> Thanks for reviewing. Should I take it to assume that we would like to keep the
> debug-like attributes in documentation for now?

The opposite I think!

Can you drop patch 1/2 from this series, tidy the maintainer values, etc
and resubmit?

If you want to propose patches to remove the debug attributes from the
TI drivers that's up to you (perhaps adding a dev_dbg() containing
equivalent information). If you want to you are welcome to add to these:
Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
@ 2018-02-05 14:39             ` Daniel Thompson
  0 siblings, 0 replies; 36+ messages in thread
From: Daniel Thompson @ 2018-02-05 14:39 UTC (permalink / raw)
  To: Aishwarya Pant
  Cc: Jani Nikula, Milo Kim, linux-fbdev, Bartlomiej Zolnierkiewicz,
	Jingoo Han, Jonathan Corbet, linux-kernel, dri-devel,
	Julia Lawall, Greg KH, Lee Jones

On Mon, Feb 05, 2018 at 12:55:50PM +0530, Aishwarya Pant wrote:
> On Thu, Feb 01, 2018 at 11:36:04AM +0000, Daniel Thompson wrote:
> > On Wed, Jan 31, 2018 at 01:51:21PM +0200, Jani Nikula wrote:
> > > On Wed, 31 Jan 2018, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> > > > On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote:
> > > >> Add documentation for sysfs interfaces of lp8788 backlight driver by
> > > >> looking through the code and the git commit history.
> > > >> 
> > > >> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> > > >> ---
> > > >>  Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++++++++++
> > > >>  1 file changed, 10 insertions(+)
> > > >>  create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > > >> 
> > > >> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > > >> new file mode 100644
> > > >> index 000000000000..c0e565c8d63d
> > > >> --- /dev/null
> > > >> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788
> > > >> @@ -0,0 +1,10 @@
> > > >> +sysfs interface for Texas Instruments lp8788 mfd backlight driver
> > > >> +-----------------------------------------------------------------
> > > >> +
> > > >> +What:		/sys/class/backlight/<backlight>/bl_ctl_mode
> > > >> +Date:		Feb, 2013
> > > >> +KernelVersion:	v3.10
> > > >> +Contact:	Milo Kim <milo.kim@ti.com>
> > > >> +Description:
> > > >> +		(RO) Displays whether the brightness is controlled by the PWM
> > > >> +		input("PWM based") or the I2C register("Register based").
> > > >
> > > > I rather dislike drivers with this type of "bonus" sysfs controls. I'm
> > > > struggling to come up with any reason why the userspace would want to
> > > > read this control (and I think bl_ctl_mode gets the fewest hits after
> > > > searching with google hits of any search I've tried) . It looks to me 
> > > > like this is debug information that should never have gone into sysfs 
> > > > at all.
> > > 
> > > Agreed. I think the same holds for the other extra sysfs attributes. At
> > > worst, having these prevents the backlight class from adding the names
> > > later on, which is just backwards.
> > 
> > The problem is that they do exist...
> > 
> > For controls which appear to be misplaced debug attributes I think I am
> > happy to nuke the values entirely. It is extremely improbable that any
> > userspace will notice.
> > 
> > Unfortunately some of the controls look like they could be poked by an
> > custom userspace so I'm quite so confident about nuking these ones...and if we
> > don't nuke we should document (so thanks Aishwarya!). 
> > 
> 
> Hi
> 
> Thanks for reviewing. Should I take it to assume that we would like to keep the
> debug-like attributes in documentation for now?

The opposite I think!

Can you drop patch 1/2 from this series, tidy the maintainer values, etc
and resubmit?

If you want to propose patches to remove the debug attributes from the
TI drivers that's up to you (perhaps adding a dev_dbg() containing
equivalent information). If you want to you are welcome to add to these:
Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2018-02-05 14:39 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 14:48 [PATCH 0/5] backlight: document sysfs interfaces Aishwarya Pant
2018-01-26 14:48 ` Aishwarya Pant
2018-01-26 14:50 ` [PATCH 1/5] backlight: lp8788: document sysfs attributes Aishwarya Pant
2018-01-26 14:50   ` Aishwarya Pant
2018-01-31 11:07   ` Daniel Thompson
2018-01-31 11:51     ` Jani Nikula
2018-01-31 11:51       ` Jani Nikula
2018-01-31 11:51       ` Jani Nikula
2018-02-01 11:36       ` Daniel Thompson
2018-02-01 11:36         ` Daniel Thompson
2018-02-05  7:25         ` Aishwarya Pant
2018-02-05  7:37           ` Aishwarya Pant
2018-02-05 14:39           ` Daniel Thompson
2018-02-05 14:39             ` Daniel Thompson
2018-01-26 14:53 ` [PATCH 2/5] backlight: lp855x: " Aishwarya Pant
2018-01-26 14:53   ` Aishwarya Pant
2018-02-01 11:06   ` Daniel Thompson
2018-02-01 11:06     ` Daniel Thompson
2018-02-01 11:06     ` Daniel Thompson
2018-02-01 15:46     ` Aishwarya Pant
2018-02-01 15:58       ` Aishwarya Pant
2018-01-26 14:53 ` [PATCH 3/5] backlight: lm3639: " Aishwarya Pant
2018-01-26 14:54   ` Aishwarya Pant
2018-01-31 11:34   ` Daniel Thompson
2018-01-31 11:34     ` Daniel Thompson
2018-01-31 11:34     ` Daniel Thompson
2018-01-26 14:54 ` [PATCH 4/5] backlight: adp5520: " Aishwarya Pant
2018-01-26 14:55   ` Aishwarya Pant
2018-02-01 16:28   ` Michael Hennerich
2018-02-01 16:28     ` Michael Hennerich
2018-02-01 16:28     ` Michael Hennerich
2018-01-26 14:55 ` [PATCH 5/5] backlight: adp8860: " Aishwarya Pant
2018-01-26 14:55   ` Aishwarya Pant
2018-02-01 16:28   ` Michael Hennerich
2018-02-01 16:28     ` Michael Hennerich
2018-02-01 16:28     ` Michael Hennerich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.