summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-11-04 10:36:26 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-11-04 10:37:48 +0000
commit7ecc778691c452285f754743a93a46fa1d3da52f (patch)
tree0fbc8ee0b670c20aeb8a63146b0243c4acf57d49
parentcc3b8a542ecb1ba873efefaeab630fa8f69b5b96 (diff)
backlight: bl_power uses 0 for on and 4 for off
The backlight/bl_power file didn't obey the obvious semantics, but instead operates using some interesting framebuffer API. Oh well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/backlight.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backlight.c b/src/backlight.c
index c7ff1055..9f239867 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -485,7 +485,8 @@ int backlight_off(struct backlight *b)
if (!b->has_power)
return 0;
- return __backlight_write(b->iface, "bl_power", "0");
+ /* 4 -> FB_BLANK_POWERDOWN */
+ return __backlight_write(b->iface, "bl_power", "4");
}
int backlight_on(struct backlight *b)
@@ -496,7 +497,8 @@ int backlight_on(struct backlight *b)
if (!b->has_power)
return 0;
- return __backlight_write(b->iface, "bl_power", "1");
+ /* 0 -> FB_BLANK_UNBLANK */
+ return __backlight_write(b->iface, "bl_power", "0");
}
#endif