+ pwm_backlight-add-device-tree-support-for-low-threshold-brightness.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: pwm_backlight: add device tree support for Low Threshold Brightness
has been added to the -mm tree.  Its filename is
     pwm_backlight-add-device-tree-support-for-low-threshold-brightness.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Philip, Avinash" <avinashphilip@xxxxxx>
Subject: pwm_backlight: add device tree support for Low Threshold Brightness

Some backlights perform poorly when driven by a PWM with a short
duty-cycle.  For such devices, the low threshold can be used to specify a
lower bound for the duty-cycle and should be chosen to exclude the
problematic range.

Add device tree probing support for
platform_pwm_backlight_data,lth_brightness, putting
low-threshold-brightness as the optional property's name.

Signed-off-by: Philip, Avinash <avinashphilip@xxxxxx>
Cc: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx>
Cc: Richard Purdie <rpurdie@xxxxxxxxx>
Cc: Florian Tobias Schandinat <FlorianSchandinat@xxxxxx>
Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt |   10 ++++++++++
 drivers/video/backlight/pwm_bl.c                                    |    5 +++++
 2 files changed, 15 insertions(+)

diff -puN Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt~pwm_backlight-add-device-tree-support-for-low-threshold-brightness Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
--- a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt~pwm_backlight-add-device-tree-support-for-low-threshold-brightness
+++ a/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt
@@ -14,6 +14,15 @@ Required properties:
 Optional properties:
   - pwm-names: a list of names for the PWM devices specified in the
                "pwms" property (see PWM binding[0])
+  - low-threshold-brightness: brightness threshold low level. Low threshold
+    brightness set to value so that backlight present on low end of
+    brightness.
+    Some panels, backlight would absent if duty percentage of PWM wave is less
+    than certain level (say 20%). By setting low-threshold-brightness to a
+    value above (percentage of brightness-levels max) 50 (20% of 255, if 255
+    is max). On setting low-threshold-brightness, range of brightness-levels
+    is calculated in a region of low-threshold-brightness to brightness-levels
+    max.
 
 [0]: Documentation/devicetree/bindings/pwm/pwm.txt
 
@@ -25,4 +34,5 @@ Example:
 
 		brightness-levels = <0 4 8 16 32 64 128 255>;
 		default-brightness-level = <6>;
+		low-threshold-brightness = <50>;
 	};
diff -puN drivers/video/backlight/pwm_bl.c~pwm_backlight-add-device-tree-support-for-low-threshold-brightness drivers/video/backlight/pwm_bl.c
--- a/drivers/video/backlight/pwm_bl.c~pwm_backlight-add-device-tree-support-for-low-threshold-brightness
+++ a/drivers/video/backlight/pwm_bl.c
@@ -143,6 +143,11 @@ static int pwm_backlight_parse_dt(struct
 
 		data->dft_brightness = value;
 		data->max_brightness--;
+
+		ret = of_property_read_u32(node, "low-threshold-brightness",
+					   &value);
+		if (!ret)
+			data->lth_brightness = value;
 	}
 
 	/*
_

Patches currently in -mm which might be from avinashphilip@xxxxxx are

linux-next.patch
pwm_backlight-add-device-tree-support-for-low-threshold-brightness.patch
pwm_backlight-add-device-tree-support-for-low-threshold-brightness-fix.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux