<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">&lt;<a href="mailto:omerjerk@gmail.com" target="_blank">omerjerk@gmail.com</a>&gt;</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 &lt;<a href="mailto:ranshalit@gmail.com">ranshalit@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I am trying to turn off screen using sysfs entries,<br>
&gt; but I&#39;m having some difficulties with it:<br>
&gt;<br>
&gt; 1.<br>
&gt; command:<br>
&gt; echo 0 &gt; /sys/devices/platform/s5p-<wbr>dsim.0/ea8061/backlight/panel/<wbr>brightness<br>
&gt; result:<br>
&gt; screen is dimmed - BUT not turned off<br>
&gt;<br>
&gt; 2.<br>
&gt; command:<br>
&gt; cat<br>
&gt; /sys/devices/platform/s5p-<wbr>dsim.0/ea8061/backlight/panel/<wbr>actual_brightness<br>
&gt; 20<br>
&gt;<br>
&gt; This strengthen the fast that we didn&#39;t turned off brightness completely<br>
&gt;<br>
&gt; 3. In this point I though that maybe I can turn off the whole brightness<br>
&gt; device<br>
&gt;<br>
&gt; ls /sys/devices/platform/s5p-<wbr>dsim.0/ea8061/backlight/panel/<br>
&gt; actual_brightness<br>
&gt; auto_brightness<br>
&gt; bl_power<br>
&gt; brightness<br>
&gt; device<br>
&gt; dimming<br>
&gt; max_brightness<br>
&gt; power<br>
&gt; subsystem<br>
&gt; type<br>
&gt; uevent<br>
&gt;<br>
&gt; I made some trials , but didn&#39;t made it turned off yet.<br>
&gt; Is there any idea if it&#39;s possible to turn it off completely ?<br>
<br>
</div></div>In my opinion, you&#39;ll need to have a look into the driver&#39;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 &quot;catual_brightness&quot; 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-&gt;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-&gt;power == FB_BLANK_POWERDOWN) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>dev_err(lcd-&gt;dev,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>&quot;lcd off: brightness set failed.\n&quot;);</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 &lt; MIN_BRIGHTNESS ||</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>brightness &gt; bd-&gt;props.max_brightness) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>dev_err(lcd-&gt;dev, &quot;lcd brightness should be %d to %d.\n&quot;,</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(&amp;bd-&gt;dev, &quot;lcd brightness setting failed.\n&quot;);</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>