diff mbox

[2/2] backlight: pwm: Add backlight-boot-off property

Message ID 1424921954-8621-1-git-send-email-hl@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

huang lin Feb. 26, 2015, 3:39 a.m. UTC
Add backlight-boot-off property, so we can keeping the
backlight disabled at boot until it is enabled implicitly
by a panel driver, or explicitly by userspace

Signed-off-by: huang lin <hl@rock-chips.com>

---

 drivers/video/backlight/pwm_bl.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ajay kumar Feb. 26, 2015, 5:47 a.m. UTC | #1
Hi Huang,

On Thu, Feb 26, 2015 at 9:09 AM, huang lin <hl@rock-chips.com> wrote:
> Add backlight-boot-off property, so we can keeping the
> backlight disabled at boot until it is enabled implicitly
> by a panel driver, or explicitly by userspace
>
> Signed-off-by: huang lin <hl@rock-chips.com>
>
> ---
>
>  drivers/video/backlight/pwm_bl.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> index 3a145a6..dece351 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -319,6 +319,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
>         }
>
>         bl->props.brightness = data->dft_brightness;
> +
> +       if (of_find_property(pdev->dev.of_node, "backlight-boot-off", NULL))
> +               bl->props.power = FB_BLANK_POWERDOWN;
> +

You need to check this. Originally, Thierry proposed it.
http://permalink.gmane.org/gmane.linux.drivers.devicetree/84604

>         backlight_update_status(bl);
>
>         platform_set_drvdata(pdev, bl);
> --
> 1.9.1
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
huang lin Feb. 26, 2015, 8:06 a.m. UTC | #2
On 2015?02?26? 13:47, Ajay kumar wrote:
> Hi Huang,
>
> On Thu, Feb 26, 2015 at 9:09 AM, huang lin <hl@rock-chips.com> wrote:
>> Add backlight-boot-off property, so we can keeping the
>> backlight disabled at boot until it is enabled implicitly
>> by a panel driver, or explicitly by userspace
>>
>> Signed-off-by: huang lin <hl@rock-chips.com>
>>
>> ---
>>
>>   drivers/video/backlight/pwm_bl.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
>> index 3a145a6..dece351 100644
>> --- a/drivers/video/backlight/pwm_bl.c
>> +++ b/drivers/video/backlight/pwm_bl.c
>> @@ -319,6 +319,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
>>          }
>>
>>          bl->props.brightness = data->dft_brightness;
>> +
>> +       if (of_find_property(pdev->dev.of_node, "backlight-boot-off", NULL))
>> +               bl->props.power = FB_BLANK_POWERDOWN;
>> +
> You need to check this. Originally, Thierry proposed it.
> http://permalink.gmane.org/gmane.linux.drivers.devicetree/84604
I have applied Thierry patch , and it can work. I think it should be 
merged, since i use three type of edp panels,
they have same issue: when the backlight probe, the panel will visual 
glitches.

>
>>          backlight_update_status(bl);
>>
>>          platform_set_drvdata(pdev, bl);
>> --
>> 1.9.1
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
Ajay kumar Feb. 26, 2015, 8:13 a.m. UTC | #3
On Thu, Feb 26, 2015 at 1:36 PM, hl <hl@rock-chips.com> wrote:
>
> On 2015?02?26? 13:47, Ajay kumar wrote:
>>
>> Hi Huang,
>>
>> On Thu, Feb 26, 2015 at 9:09 AM, huang lin <hl@rock-chips.com> wrote:
>>>
>>> Add backlight-boot-off property, so we can keeping the
>>> backlight disabled at boot until it is enabled implicitly
>>> by a panel driver, or explicitly by userspace
>>>
>>> Signed-off-by: huang lin <hl@rock-chips.com>
>>>
>>> ---
>>>
>>>   drivers/video/backlight/pwm_bl.c | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/video/backlight/pwm_bl.c
>>> b/drivers/video/backlight/pwm_bl.c
>>> index 3a145a6..dece351 100644
>>> --- a/drivers/video/backlight/pwm_bl.c
>>> +++ b/drivers/video/backlight/pwm_bl.c
>>> @@ -319,6 +319,10 @@ static int pwm_backlight_probe(struct
>>> platform_device *pdev)
>>>          }
>>>
>>>          bl->props.brightness = data->dft_brightness;
>>> +
>>> +       if (of_find_property(pdev->dev.of_node, "backlight-boot-off",
>>> NULL))
>>> +               bl->props.power = FB_BLANK_POWERDOWN;
>>> +
>>
>> You need to check this. Originally, Thierry proposed it.
>> http://permalink.gmane.org/gmane.linux.drivers.devicetree/84604
>
> I have applied Thierry patch , and it can work. I think it should be merged,
> since i use three type of edp panels,
> they have same issue: when the backlight probe, the panel will visual
> glitches.
Right, the same problem exists on Exynos5800-peach-pi display!
I had tested this long back, and I think its not merged since the DT property
has an issue that "it doesn't really represent h/w property of the device".

>>
>>>          backlight_update_status(bl);
>>>
>>>          platform_set_drvdata(pdev, bl);
>>> --
>>> 1.9.1
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>>
>
> --
> ??
> ???????????
> Fuzhou Rockchip Electronics Co.Ltd
> ?????????????89????A?21??(350003)
> Addr:No.21 Building, A District, No.89, software Boulevard Fuzhou,
> Fujian,PRC
> Email:hl@rock-chips.com
> Tel:+86-591-83991906/07
>
> ****************************************************************************************
> ????????????????????????????????????????????
> ???? ????????????????????????????????????????
> ????????????????????????????????????????????
> ??????????????????
>  IMPORTANT NOTICE: This email is from Fuzhou Rockchip Electronics Co., Ltd
> .The contents
> of this email and any attachments may contain information that is
> privileged, confidential
> and/or exempt from disclosure under applicable law and relevant NDA. If you
> are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution,
> or use of the information is STRICTLY PROHIBITED. Please immediately contact
> the sender
> as soon as possible and destroy the material in its entirety in any format.
> Thank you.
> ********************************************************************************
>
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 3a145a6..dece351 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -319,6 +319,10 @@  static int pwm_backlight_probe(struct platform_device *pdev)
 	}
 
 	bl->props.brightness = data->dft_brightness;
+
+	if (of_find_property(pdev->dev.of_node, "backlight-boot-off", NULL))
+		bl->props.power = FB_BLANK_POWERDOWN;
+
 	backlight_update_status(bl);
 
 	platform_set_drvdata(pdev, bl);