Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232991
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC |
| Date | 2015-09-25 20:10 +0200 |
| Message-ID | <qcFBv-zc-5@gated-at.bofh.it> (permalink) |
| References | <qcga6-6cP-9@gated-at.bofh.it> <qcga6-6cP-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Thu, Sep 24, 2015 at 09:52:53AM -0500, Andrew F. Davis wrote:
> +static int tps65912_regulator_probe(struct platform_device *pdev)
> +{
> + struct tps65912 *tps = dev_get_drvdata(pdev->dev.parent);
> + struct regulator_init_data *init_data;
> + const struct tps_info *template;
> + struct regulator_dev *rdev;
> + const struct of_device_id *match;
> + struct regulator_config config = { };
> + int id;
> +
> + match = of_match_device(tps65912_regulator_of_match_table, &pdev->dev);
> + if (!match)
> + return -ENODEV;
> +
> + template = match->data;
> + id = template->id;
> + init_data = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node,
> + ®ulators[id]);
Don't open code this stuff, use the core DT matching in the
regulator_desc instead.
Please also use subject lines mathcing the style for the subsystem.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-24 17:00 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Mark Brown <broonie@kernel.org> - 2015-09-25 20:10 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-25 22:20 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Mark Brown <broonie@kernel.org> - 2015-09-29 17:20 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-29 20:10 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Mark Brown <broonie@kernel.org> - 2015-09-29 20:40 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-29 21:00 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Mark Brown <broonie@kernel.org> - 2015-09-30 19:30 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-09-30 22:30 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Mark Brown <broonie@kernel.org> - 2015-10-01 00:30 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-10-01 01:40 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Mark Brown <broonie@kernel.org> - 2015-10-01 13:00 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-01 17:40 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-10-01 18:10 +0200
Re: [PATCH v3 4/5] regulators: tps65912: Add regulator driver for the TPS65912 PMIC Mark Brown <broonie@kernel.org> - 2015-10-01 18:40 +0200
csiph-web