From f01faec6256c9ad2fb89b1c8ab8a765f57657c56 Mon Sep 17 00:00:00 2001 From: Stuart Menefy Date: Wed, 13 Feb 2019 22:24:01 +0000 Subject: mfd: sec: Put one element structure initialisation on one line Change the layout of the initialisation of structures with one element to a single line of code. This keeps the coding style consistent. Signed-off-by: Stuart Menefy Signed-off-by: Lee Jones --- drivers/mfd/sec-core.c | 58 +++++++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 39 deletions(-) (limited to 'drivers/mfd/sec-core.c') diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 521319086c81..d8f29f4493c0 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -28,45 +28,33 @@ #include static const struct mfd_cell s5m8751_devs[] = { - { - .name = "s5m8751-pmic", - }, { - .name = "s5m-charger", - }, { - .name = "s5m8751-codec", - }, + { .name = "s5m8751-pmic", }, + { .name = "s5m-charger", }, + { .name = "s5m8751-codec", }, }; static const struct mfd_cell s5m8763_devs[] = { - { - .name = "s5m8763-pmic", - }, { - .name = "s5m-rtc", - }, { - .name = "s5m-charger", - }, + { .name = "s5m8763-pmic", }, + { .name = "s5m-rtc", }, + { .name = "s5m-charger", }, }; static const struct mfd_cell s5m8767_devs[] = { + { .name = "s5m8767-pmic", }, + { .name = "s5m-rtc", }, { - .name = "s5m8767-pmic", - }, { - .name = "s5m-rtc", - }, { .name = "s5m8767-clk", .of_compatible = "samsung,s5m8767-clk", - } + }, }; static const struct mfd_cell s2mps11_devs[] = { + { .name = "s2mps11-regulator", }, + { .name = "s2mps14-rtc", }, { - .name = "s2mps11-regulator", - }, { - .name = "s2mps14-rtc", - }, { .name = "s2mps11-clk", .of_compatible = "samsung,s2mps11-clk", - } + }, }; static const struct mfd_cell s2mps13_devs[] = { @@ -79,37 +67,29 @@ static const struct mfd_cell s2mps13_devs[] = { }; static const struct mfd_cell s2mps14_devs[] = { + { .name = "s2mps14-regulator", }, + { .name = "s2mps14-rtc", }, { - .name = "s2mps14-regulator", - }, { - .name = "s2mps14-rtc", - }, { .name = "s2mps14-clk", .of_compatible = "samsung,s2mps14-clk", - } + }, }; static const struct mfd_cell s2mps15_devs[] = { + { .name = "s2mps15-regulator", }, + { .name = "s2mps15-rtc", }, { - .name = "s2mps15-regulator", - }, { - .name = "s2mps15-rtc", - }, { .name = "s2mps13-clk", .of_compatible = "samsung,s2mps13-clk", }, }; static const struct mfd_cell s2mpa01_devs[] = { - { - .name = "s2mpa01-pmic", - }, + { .name = "s2mpa01-pmic", }, }; static const struct mfd_cell s2mpu02_devs[] = { - { - .name = "s2mpu02-regulator", - }, + { .name = "s2mpu02-regulator", }, }; #ifdef CONFIG_OF -- cgit v1.2.3 From ec85d4a10e355db0a2b4f2176396b2246e01818b Mon Sep 17 00:00:00 2001 From: Stuart Menefy Date: Wed, 13 Feb 2019 22:24:02 +0000 Subject: mfd: sec: Add support for the RTC on S2MPA01 The RTC portion of the S2MPA01 appears to have the same register layout as the S2MPS14. Signed-off-by: Stuart Menefy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones --- drivers/mfd/sec-core.c | 1 + drivers/mfd/sec-irq.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'drivers/mfd/sec-core.c') diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index d8f29f4493c0..95473ff9bb4b 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -86,6 +86,7 @@ static const struct mfd_cell s2mps15_devs[] = { static const struct mfd_cell s2mpa01_devs[] = { { .name = "s2mpa01-pmic", }, + { .name = "s2mps14-rtc", }, }; static const struct mfd_cell s2mpu02_devs[] = { diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c index ad0099077e7e..a98c5d165039 100644 --- a/drivers/mfd/sec-irq.c +++ b/drivers/mfd/sec-irq.c @@ -455,6 +455,9 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) case S5M8767X: sec_irq_chip = &s5m8767_irq_chip; break; + case S2MPA01: + sec_irq_chip = &s2mps14_irq_chip; + break; case S2MPS11X: sec_irq_chip = &s2mps11_irq_chip; break; -- cgit v1.2.3