summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/calypso/backlight.c
diff options
context:
space:
mode:
authorIngo Albrecht2010-04-18 09:43:06 +0200
committerIngo Albrecht2010-07-20 14:41:20 +0200
commit8aa4d22f55b99fed696e20acd9a43442178b5e39 (patch)
treeca5ff11953596b9bdbf066020cf94a7e95fa8b09 /src/target/firmware/calypso/backlight.c
parentflash: disable all printing. needed because strings can end up in flash. (diff)
downloadosmocom-8aa4d22f55b99fed696e20acd9a43442178b5e39.tar.gz
osmocom-8aa4d22f55b99fed696e20acd9a43442178b5e39.tar.xz
osmocom-8aa4d22f55b99fed696e20acd9a43442178b5e39.zip
firmware: fixed and commented backlight driver
Diffstat (limited to 'src/target/firmware/calypso/backlight.c')
-rw-r--r--src/target/firmware/calypso/backlight.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/target/firmware/calypso/backlight.c b/src/target/firmware/calypso/backlight.c
index e2ff29c..a18dcb9 100644
--- a/src/target/firmware/calypso/backlight.c
+++ b/src/target/firmware/calypso/backlight.c
@@ -31,7 +31,7 @@
enum pwl_reg {
PWL_LEVEL = 0,
- PWL_CTRL = 2,
+ PWL_CTRL = 1,
};
#define ASCONF_PWL_ENA (1 << 4)
@@ -43,6 +43,7 @@ void bl_mode_pwl(int on)
reg = readw(ASIC_CONF_REG);
if (on) {
+ /* Enable pwl */
writeb(0x01, PWL_REG(PWL_CTRL));
/* Switch pin from LT to PWL */
reg |= ASCONF_PWL_ENA;
@@ -51,6 +52,7 @@ void bl_mode_pwl(int on)
/* Switch pin from PWL to LT */
reg |= ~ASCONF_PWL_ENA;
writew(reg, ASIC_CONF_REG);
+ /* Disable pwl */
writeb(0x00, PWL_REG(PWL_CTRL));
}
}