From 33c02d9fd87dfcaa93a60fa16a85f373ec69195e Mon Sep 17 00:00:00 2001 From: Donggeun Kim Date: Wed, 14 Dec 2011 18:23:55 +0900 Subject: [PATCH] --- yaml --- r: 284574 b: refs/heads/master c: f6dd2db940a1a0c6b9f7112109115c8243ba752b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mfd/max8997.c | 3 ++- trunk/include/linux/mfd/max8997.h | 25 ++++++++++++++++++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 59691f813fb1..097f9ce16ebc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1e351a95b6fda20e16b64a698bae505765080308 +refs/heads/master: f6dd2db940a1a0c6b9f7112109115c8243ba752b diff --git a/trunk/drivers/mfd/max8997.c b/trunk/drivers/mfd/max8997.c index 5be53ae9b61c..cb83a7ab53e7 100644 --- a/trunk/drivers/mfd/max8997.c +++ b/trunk/drivers/mfd/max8997.c @@ -43,7 +43,8 @@ static struct mfd_cell max8997_devs[] = { { .name = "max8997-battery", }, { .name = "max8997-haptic", }, { .name = "max8997-muic", }, - { .name = "max8997-flash", }, + { .name = "max8997-led", .id = 1 }, + { .name = "max8997-led", .id = 2 }, }; int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest) diff --git a/trunk/include/linux/mfd/max8997.h b/trunk/include/linux/mfd/max8997.h index 49d2a0bfd7fe..fff590521e50 100644 --- a/trunk/include/linux/mfd/max8997.h +++ b/trunk/include/linux/mfd/max8997.h @@ -131,6 +131,28 @@ struct max8997_muic_platform_data { int num_init_data; }; +enum max8997_led_mode { + MAX8997_NONE, + MAX8997_FLASH_MODE, + MAX8997_MOVIE_MODE, + MAX8997_FLASH_PIN_CONTROL_MODE, + MAX8997_MOVIE_PIN_CONTROL_MODE, +}; + +/** + * struct max8997_led_platform_data + * The number of LED devices for MAX8997 is two + * @mode: LED mode for each LED device + * @brightness: initial brightness for each LED device + * range: + * [0 - 31]: MAX8997_FLASH_MODE and MAX8997_FLASH_PIN_CONTROL_MODE + * [0 - 15]: MAX8997_MOVIE_MODE and MAX8997_MOVIE_PIN_CONTROL_MODE + */ +struct max8997_led_platform_data { + enum max8997_led_mode mode[2]; + u8 brightness[2]; +}; + struct max8997_platform_data { /* IRQ */ int irq_base; @@ -172,7 +194,8 @@ struct max8997_platform_data { /* HAPTIC: Not implemented */ /* RTC: Not implemented */ - /* Flash: Not implemented */ + /* ---- LED ---- */ + struct max8997_led_platform_data *led_pdata; }; #endif /* __LINUX_MFD_MAX8998_H */