Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432507
| From | Keerthy <j-keerthy@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 04/10] mfd: tps65218: Use mfd_add_devices instead of of_platform_populate |
| Date | 2016-06-28 08:20 +0200 |
| Message-ID | <rOUxj-35E-5@gated-at.bofh.it> (permalink) |
| References | <rOUnD-328-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
mfd_add_devices enables parsing device tree nodes without compatibles
for regulators and gpio modules. Replace of_platform_populate with
mfd_add_devices. mfd_cell currently is populated with regulators,
gpio and powerbutton.
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
drivers/mfd/tps65218.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
index f20a531..107d695 100644
--- a/drivers/mfd/tps65218.c
+++ b/drivers/mfd/tps65218.c
@@ -33,6 +33,15 @@
#define TPS65218_PASSWORD_REGS_UNLOCK 0x7D
+static const struct mfd_cell tps65218_cells[] = {
+ { .name = "tps65218-regulator", },
+ {
+ .name = "tps65218-pwrbutton",
+ .of_compatible = "ti,tps65218-pwrbutton",
+ },
+ { .name = "tps65218-gpio", },
+};
+
/**
* tps65218_reg_write: Write a single tps65218 register.
*
@@ -236,8 +245,10 @@ static int tps65218_probe(struct i2c_client *client,
if (ret < 0)
return ret;
- ret = of_platform_populate(client->dev.of_node, NULL, NULL,
- &client->dev);
+ ret = mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65218_cells,
+ ARRAY_SIZE(tps65218_cells), NULL, 0,
+ regmap_irq_get_domain(tps->irq_data));
+
if (ret < 0)
goto err_irq;
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 00/10] mfd: tps65218: Clean ups Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
[PATCH v3 07/10] ARM: dts: AM437X-GP-EVM: Remove redundant regulator compatibles Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
[PATCH v3 10/10] ARM: dts: AM43X-EPOS-EVM: Remove redundant regulator compatibles Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
[PATCH v3 03/10] input: tps65218-pwrbutton: Add platform_device_id table Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
Re: [PATCH v3 03/10] input: tps65218-pwrbutton: Add platform_device_id table Lee Jones <lee.jones@linaro.org> - 2016-06-28 08:50 +0200
Re: [PATCH v3 03/10] input: tps65218-pwrbutton: Add platform_device_id table Keerthy <a0393675@ti.com> - 2016-06-28 09:00 +0200
Re: [PATCH v3 03/10] input: tps65218-pwrbutton: Add platform_device_id table Lee Jones <lee.jones@linaro.org> - 2016-06-28 09:50 +0200
Re: [PATCH v3 03/10] input: tps65218-pwrbutton: Add platform_device_id table Keerthy <a0393675@ti.com> - 2016-06-28 09:50 +0200
[PATCH v3 05/10] regulator: tps65218: Remove all the compatibles Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
[PATCH v3 09/10] ARM: dts: AM437X-CM-T43: Remove redundant regulator compatibles Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
[PATCH v3 08/10] ARM: dts: AM437X-SK-EVM: Remove redundant regulator compatibles Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
[PATCH v3 01/10] mfd: tps65218: Remove redundant read wrapper Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
Re: [PATCH v3 01/10] mfd: tps65218: Remove redundant read wrapper Lee Jones <lee.jones@linaro.org> - 2016-06-28 09:10 +0200
Re: [PATCH v3 01/10] mfd: tps65218: Remove redundant read wrapper Keerthy <a0393675@ti.com> - 2016-06-28 09:10 +0200
[PATCH v3 06/10] gpio: tps65218: Remove the compatible Keerthy <j-keerthy@ti.com> - 2016-06-28 08:10 +0200
Re: [PATCH v3 06/10] gpio: tps65218: Remove the compatible Lee Jones <lee.jones@linaro.org> - 2016-06-28 09:00 +0200
Re: [PATCH v3 06/10] gpio: tps65218: Remove the compatible Keerthy <a0393675@ti.com> - 2016-06-28 09:10 +0200
[PATCH v3 04/10] mfd: tps65218: Use mfd_add_devices instead of of_platform_populate Keerthy <j-keerthy@ti.com> - 2016-06-28 08:20 +0200
Re: [PATCH v3 04/10] mfd: tps65218: Use mfd_add_devices instead of of_platform_populate Lee Jones <lee.jones@linaro.org> - 2016-06-28 09:00 +0200
[PATCH v3 02/10] Documentation: regulator: tps65218: Update examples Keerthy <j-keerthy@ti.com> - 2016-06-28 08:20 +0200
Re: [PATCH v3 02/10] Documentation: regulator: tps65218: Update examples Lee Jones <lee.jones@linaro.org> - 2016-06-28 09:00 +0200
Re: [PATCH v3 02/10] Documentation: regulator: tps65218: Update examples Keerthy <a0393675@ti.com> - 2016-06-28 09:50 +0200
csiph-web