提交 f6dd2db9 编写于 作者: D Donggeun Kim 提交者: Samuel Ortiz

mfd: Add platform data and devices for MAX8997 LED control

MAX8997 device does not support LED control function of it.
To enable MAX8997-LED driver, platform data and devices for LED are updated.
Signed-off-by: NDonggeun Kim <dg77.kim@samsung.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 1e351a95
...@@ -43,7 +43,8 @@ static struct mfd_cell max8997_devs[] = { ...@@ -43,7 +43,8 @@ static struct mfd_cell max8997_devs[] = {
{ .name = "max8997-battery", }, { .name = "max8997-battery", },
{ .name = "max8997-haptic", }, { .name = "max8997-haptic", },
{ .name = "max8997-muic", }, { .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) int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest)
......
...@@ -131,6 +131,28 @@ struct max8997_muic_platform_data { ...@@ -131,6 +131,28 @@ struct max8997_muic_platform_data {
int num_init_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 { struct max8997_platform_data {
/* IRQ */ /* IRQ */
int irq_base; int irq_base;
...@@ -172,7 +194,8 @@ struct max8997_platform_data { ...@@ -172,7 +194,8 @@ struct max8997_platform_data {
/* HAPTIC: Not implemented */ /* HAPTIC: Not implemented */
/* RTC: Not implemented */ /* RTC: Not implemented */
/* Flash: Not implemented */ /* ---- LED ---- */
struct max8997_led_platform_data *led_pdata;
}; };
#endif /* __LINUX_MFD_MAX8998_H */ #endif /* __LINUX_MFD_MAX8998_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册