aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds/leds-da903x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-30 16:16:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-30 16:16:39 -0700
commit7105212bd309752b589a3ba816afdd7fed190b85 (patch)
tree812d86441f8ba375f04c38c569908bd3f61e1c26 /drivers/leds/leds-da903x.c
parent65fc716fa673cf98fb5887180fd3c52ca0371198 (diff)
parentb73b925a6b9d69478c6ae4e74ef20607fd24aeaa (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 5326/1: AFEB9260: Fix for i2c_board_info structure [ARM] mx31ads: Add missing include [ARM] MXC: Fix mxc_gpio_get(), which must read PSR register instead DR. [ARM] MX3: Use ioremap wrapper to map SoC devices nonshared [ARM] gpio_free might sleep, arm architecture [ARM] ep93xx: fix OHCI DMA mask leds: da903x: (da9030 only) led brightness reversed. [ARM] sharpsl_pm: fix compilation w/o CONFIG_PM [ARM] pcm037: map AIPS1 and AIPS2 as nonshared area [ARM] build fixes for netX serial driver [ARM] 5323/1: Remove outdated empeg documentation. [ARM] 5299/1: Add maintainer for Mobilepro 900/c [ARM] corgi_lcd: fix simultaneous compilation with corgi_bl [ARM] pxa/spitz: fix spi cs on spitz [ARM] 5322/1: Fix fastpath issue in mmci.c [ARM] xsc3: revert writethrough memory-type encoding change
Diffstat (limited to 'drivers/leds/leds-da903x.c')
-rw-r--r--drivers/leds/leds-da903x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-da903x.c b/drivers/leds/leds-da903x.c
index 2768c69257f..1f3cc512eff 100644
--- a/drivers/leds/leds-da903x.c
+++ b/drivers/leds/leds-da903x.c
@@ -58,7 +58,7 @@ static void da903x_led_work(struct work_struct *work)
offset = DA9030_LED_OFFSET(led->id);
val = led->flags & ~0x87;
val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */
- val |= (led->new_brightness >> 5) & 0x7; /* PWM<2:0> */
+ val |= (0x7 - (led->new_brightness >> 5)) & 0x7; /* PWM<2:0> */
da903x_write(led->master, DA9030_LED1_CONTROL + offset, val);
break;
case DA9030_ID_VIBRA: