<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 5, 2016 at 10:24 AM, Umair Khan <span dir="ltr"><<a href="mailto:omerjerk@gmail.com" target="_blank">omerjerk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Mon, Dec 5, 2016 at 12:56 PM, Ran Shalit <<a href="mailto:ranshalit@gmail.com">ranshalit@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I am trying to turn off screen using sysfs entries,<br>
> but I'm having some difficulties with it:<br>
><br>
> 1.<br>
> command:<br>
> echo 0 > /sys/devices/platform/s5p-<wbr>dsim.0/ea8061/backlight/panel/<wbr>brightness<br>
> result:<br>
> screen is dimmed - BUT not turned off<br>
><br>
> 2.<br>
> command:<br>
> cat<br>
> /sys/devices/platform/s5p-<wbr>dsim.0/ea8061/backlight/panel/<wbr>actual_brightness<br>
> 20<br>
><br>
> This strengthen the fast that we didn't turned off brightness completely<br>
><br>
> 3. In this point I though that maybe I can turn off the whole brightness<br>
> device<br>
><br>
> ls /sys/devices/platform/s5p-<wbr>dsim.0/ea8061/backlight/panel/<br>
> actual_brightness<br>
> auto_brightness<br>
> bl_power<br>
> brightness<br>
> device<br>
> dimming<br>
> max_brightness<br>
> power<br>
> subsystem<br>
> type<br>
> uevent<br>
><br>
> I made some trials , but didn't made it turned off yet.<br>
> Is there any idea if it's possible to turn it off completely ?<br>
<br>
</div></div>In my opinion, you'll need to have a look into the driver's code.<br>
See if that exposes a mechanism to turn off the screen at all.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Right,</div><div>Seems that sysfs exports features that drivers might not support (or supported differently between different drivers)</div><div>for ea8061 driver:</div><div>Yet, not sure why on setting brightness 0 , I get that that it that "catual_brightness" is 20.<br></div><div>See ea8061_set_brightness below.</div><div><br></div><div><a href="https://github.com/gokhanmoral/siyahkernel-sgs3/blob/master-3.0.31/drivers/video/backlight/ea8061.c">https://github.com/gokhanmoral/siyahkernel-sgs3/blob/master-3.0.31/drivers/video/backlight/ea8061.c</a></div><div> </div><div><div><br></div><div>static int ea8061_set_brightness(struct backlight_device *bd)</div><div>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>int ret = 0, brightness = bd->props.brightness;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>struct ea8061 *lcd = bl_get_data(bd);</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>if (lcd->power == FB_BLANK_POWERDOWN) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>dev_err(lcd->dev,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>"lcd off: brightness set failed.\n");</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>return -EINVAL;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>if (brightness < MIN_BRIGHTNESS ||</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>brightness > bd->props.max_brightness) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>dev_err(lcd->dev, "lcd brightness should be %d to %d.\n",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>MIN_BRIGHTNESS, MAX_BRIGHTNESS);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>return -EINVAL;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>ret = ea8061_gamma_ctrl(lcd, brightness);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>if (ret) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>dev_err(&bd->dev, "lcd brightness setting failed.\n");</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>return -EIO;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>return ret;</div><div>}</div></div><div><br></div><div>Thanks,</div><div>Ran</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font color="#888888">
- Umair<br>
</font></span></blockquote></div><br></div></div>