On Mon, Dec 5, 2016 at 10:24 AM, Umair Khan <omerjerk@xxxxxxxxx> wrote:
In my opinion, you'll need to have a look into the driver's code.On Mon, Dec 5, 2016 at 12:56 PM, Ran Shalit <ranshalit@xxxxxxxxx> wrote:
> Hello,
>
> I am trying to turn off screen using sysfs entries,
> but I'm having some difficulties with it:
>
> 1.
> command:
> echo 0 > /sys/devices/platform/s5p-dsim.0/ea8061/backlight/panel/ brightness
> result:
> screen is dimmed - BUT not turned off
>
> 2.
> command:
> cat
> /sys/devices/platform/s5p-dsim.0/ea8061/backlight/panel/ actual_brightness
> 20
>
> This strengthen the fast that we didn't turned off brightness completely
>
> 3. In this point I though that maybe I can turn off the whole brightness
> device
>
> ls /sys/devices/platform/s5p-dsim.0/ea8061/backlight/panel/
> actual_brightness
> auto_brightness
> bl_power
> brightness
> device
> dimming
> max_brightness
> power
> subsystem
> type
> uevent
>
> I made some trials , but didn't made it turned off yet.
> Is there any idea if it's possible to turn it off completely ?
See if that exposes a mechanism to turn off the screen at all.
Right,
Seems that sysfs exports features that drivers might not support (or supported differently between different drivers)
for ea8061 driver:
Yet, not sure why on setting brightness 0 , I get that that it that "catual_brightness" is 20.
See ea8061_set_brightness below.
static int ea8061_set_brightness(struct backlight_device *bd)
{
int ret = 0, brightness = bd->props.brightness;
struct ea8061 *lcd = bl_get_data(bd);
if (lcd->power == FB_BLANK_POWERDOWN) {
dev_err(lcd->dev,
"lcd off: brightness set failed.\n");
return -EINVAL;
}
if (brightness < MIN_BRIGHTNESS ||
brightness > bd->props.max_brightness) {
dev_err(lcd->dev, "lcd brightness should be %d to %d.\n",
MIN_BRIGHTNESS, MAX_BRIGHTNESS);
return -EINVAL;
}
ret = ea8061_gamma_ctrl(lcd, brightness);
if (ret) {
dev_err(&bd->dev, "lcd brightness setting failed.\n");
return -EIO;
}
return ret;
}
Thanks,
Ran
- Umair
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies