Skip to content

Commit 9d26381

Browse files
shcgitcooloney
authored andcommitted
leds: leds-mc13783: Prepare driver to support MC13892 LEDs
This patch rewrite driver code to be ready to add support for MC13892 LEDs and probe from devicetree. (cooloney@gmail.com: fix one coding style issue when apply this patch) Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Tested-by: Philippe Retornaz <philippe.retornaz@epfl.ch> Signed-off-by: Bryan Wu <cooloney@gmail.com>
1 parent fb277f5 commit 9d26381

3 files changed

Lines changed: 204 additions & 304 deletions

File tree

‎arch/arm/mach-imx/mach-mx31moboard.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,11 @@ static struct mc13xxx_led_platform_data moboard_led[] = {
268268
static struct mc13xxx_leds_platform_data moboard_leds = {
269269
.num_leds = ARRAY_SIZE(moboard_led),
270270
.led = moboard_led,
271-
.flags = MC13783_LED_SLEWLIMTC,
272-
.abmode = MC13783_LED_AB_DISABLED,
273-
.tc1_period = MC13783_LED_PERIOD_10MS,
274-
.tc2_period = MC13783_LED_PERIOD_10MS,
271+
.led_control[0] = MC13783_LED_C0_ENABLE | MC13783_LED_C0_ABMODE(0),
272+
.led_control[1] = MC13783_LED_C1_SLEWLIM,
273+
.led_control[2] = MC13783_LED_C2_SLEWLIM,
274+
.led_control[3] = MC13783_LED_C3_PERIOD(0),
275+
.led_control[4] = MC13783_LED_C3_PERIOD(0),
275276
};
276277

277278
static struct mc13xxx_buttons_platform_data moboard_buttons = {

0 commit comments

Comments
 (0)