Commit 9540989c authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Lee Jones

leds: leds-mt6323: Add support for MT6331 leds

Add the register offsets for MT6331. The hwspec is the same as MT6323.
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Reviewed-by: default avatarAlexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230601110813.2373764-8-angelogioacchino.delregno@collabora.com
parent 4c58b6d9
...@@ -529,6 +529,17 @@ static const struct mt6323_regs mt6323_registers = { ...@@ -529,6 +529,17 @@ static const struct mt6323_regs mt6323_registers = {
.isink_en_ctrl = 0x356, .isink_en_ctrl = 0x356,
}; };
static const struct mt6323_regs mt6331_registers = {
.top_ckpdn = (const u16[]){ 0x138, 0x13e, 0x144 },
.num_top_ckpdn = 3,
.top_ckcon = (const u16[]){ 0x14c, 0x14a },
.num_top_ckcon = 2,
.isink_con = (const u16[]){ 0x40c, 0x40e, 0x410, 0x412, 0x414 },
.num_isink_con = 5,
.isink_max_regs = 4, /* ISINK[0..3] */
.isink_en_ctrl = 0x43a,
};
static const struct mt6323_hwspec mt6323_spec = { static const struct mt6323_hwspec mt6323_spec = {
.max_period = 10000, .max_period = 10000,
.max_leds = 4, .max_leds = 4,
...@@ -541,8 +552,14 @@ static const struct mt6323_data mt6323_pdata = { ...@@ -541,8 +552,14 @@ static const struct mt6323_data mt6323_pdata = {
.spec = &mt6323_spec, .spec = &mt6323_spec,
}; };
static const struct mt6323_data mt6331_pdata = {
.regs = &mt6331_registers,
.spec = &mt6323_spec,
};
static const struct of_device_id mt6323_led_dt_match[] = { static const struct of_device_id mt6323_led_dt_match[] = {
{ .compatible = "mediatek,mt6323-led", .data = &mt6323_pdata}, { .compatible = "mediatek,mt6323-led", .data = &mt6323_pdata},
{ .compatible = "mediatek,mt6331-led", .data = &mt6331_pdata },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, mt6323_led_dt_match); MODULE_DEVICE_TABLE(of, mt6323_led_dt_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment