summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c b/firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c
index 4df9be843c..b35e3c1ad0 100644
--- a/firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c
@@ -22,6 +22,7 @@
22#include "mc13783.h" 22#include "mc13783.h"
23#include "backlight-target.h" 23#include "backlight-target.h"
24 24
25#ifdef HAVE_BACKLIGHT_BRIGHTNESS
25/* Table that uses combinations of current level and pwm fraction to get 26/* Table that uses combinations of current level and pwm fraction to get
26 * as many uniquely-visible brightness levels as possible. The lowest current 27 * as many uniquely-visible brightness levels as possible. The lowest current
27 * level for any average current is used even though many combinations give 28 * level for any average current is used even though many combinations give
@@ -60,6 +61,7 @@ static const struct
60 { 3, 12 }, /* 9 12 7.2 */ 61 { 3, 12 }, /* 9 12 7.2 */
61 /* Anything higher is just too much */ 62 /* Anything higher is just too much */
62}; 63};
64#endif /* HAVE_BACKLIGHT_BRIGHTNESS */
63 65
64bool _backlight_init(void) 66bool _backlight_init(void)
65{ 67{
@@ -85,6 +87,7 @@ void _backlight_off(void)
85 mc13783_clear(MC13783_LED_CONTROL0, MC13783_LEDEN); 87 mc13783_clear(MC13783_LED_CONTROL0, MC13783_LEDEN);
86} 88}
87 89
90#ifdef HAVE_BACKLIGHT_BRIGHTNESS
88/* Assumes that the backlight has been initialized */ 91/* Assumes that the backlight has been initialized */
89void _backlight_set_brightness(int brightness) 92void _backlight_set_brightness(int brightness)
90{ 93{
@@ -106,3 +109,4 @@ void _backlight_set_brightness(int brightness)
106 109
107 mc13783_write(MC13783_LED_CONTROL2, data); 110 mc13783_write(MC13783_LED_CONTROL2, data);
108} 111}
112#endif /* HAVE_BACKLIGHT_BRIGHTNESS */