leds-da903x.c (b9b54aa2a60dcd9c06b76f6610e1b466bc93e3cd) | leds-da903x.c (a0601c8944dc08c2d349c24bd9c0b09c406229fc) |
---|---|
1/* 2 * LEDs driver for Dialog Semiconductor DA9030/DA9034 3 * 4 * Copyright (C) 2008 Compulab, Ltd. 5 * Mike Rapoport <mike@compulab.co.il> 6 * 7 * Copyright (C) 2006-2008 Marvell International Ltd. 8 * Eric Miao <eric.miao@marvell.com> --- 44 unchanged lines hidden (view full) --- 53 case DA9030_ID_LED_1: 54 case DA9030_ID_LED_2: 55 case DA9030_ID_LED_3: 56 case DA9030_ID_LED_4: 57 case DA9030_ID_LED_PC: 58 offset = DA9030_LED_OFFSET(led->id); 59 val = led->flags & ~0x87; 60 val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */ | 1/* 2 * LEDs driver for Dialog Semiconductor DA9030/DA9034 3 * 4 * Copyright (C) 2008 Compulab, Ltd. 5 * Mike Rapoport <mike@compulab.co.il> 6 * 7 * Copyright (C) 2006-2008 Marvell International Ltd. 8 * Eric Miao <eric.miao@marvell.com> --- 44 unchanged lines hidden (view full) --- 53 case DA9030_ID_LED_1: 54 case DA9030_ID_LED_2: 55 case DA9030_ID_LED_3: 56 case DA9030_ID_LED_4: 57 case DA9030_ID_LED_PC: 58 offset = DA9030_LED_OFFSET(led->id); 59 val = led->flags & ~0x87; 60 val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */ |
61 val |= (led->new_brightness >> 5) & 0x7; /* PWM<2:0> */ | 61 val |= (0x7 - (led->new_brightness >> 5)) & 0x7; /* PWM<2:0> */ |
62 da903x_write(led->master, DA9030_LED1_CONTROL + offset, val); 63 break; 64 case DA9030_ID_VIBRA: 65 val = led->flags & ~0x80; 66 val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */ 67 da903x_write(led->master, DA9030_MISC_CONTROL_A, val); 68 break; 69 case DA9034_ID_LED_1: --- 107 unchanged lines hidden --- | 62 da903x_write(led->master, DA9030_LED1_CONTROL + offset, val); 63 break; 64 case DA9030_ID_VIBRA: 65 val = led->flags & ~0x80; 66 val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */ 67 da903x_write(led->master, DA9030_MISC_CONTROL_A, val); 68 break; 69 case DA9034_ID_LED_1: --- 107 unchanged lines hidden --- |