Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260461 > unrolled thread
| Started by | Mark Brown <broonie@kernel.org> |
|---|---|
| First post | 2015-11-02 10:00 +0100 |
| Last post | 2015-11-03 19:00 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC Mark Brown <broonie@kernel.org> - 2015-11-02 10:00 +0100
Re: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-11-03 17:00 +0100
Re: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC Mark Brown <broonie@kernel.org> - 2015-11-03 17:40 +0100
Re: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC "Andrew F. Davis" <afd@ti.com> - 2015-11-03 19:00 +0100
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-11-02 10:00 +0100 |
| Subject | Re: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC |
| Message-ID | <qqj86-3aX-17@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Oct 30, 2015 at 05:41:43PM -0500, Andrew F. Davis wrote:
> +struct tps65086_regulator {
> + struct regulator_desc desc;
> + unsigned int decay_reg;
> + unsigned int decay_mask;
The decay_reg and decay_mask fields appear to be entirely write only,
why are they present?
> + ret = of_regulator_match(&pdev->dev, pdev->dev.of_node,
> + tps65086_matches,
> + ARRAY_SIZE(tps65086_matches));
> + if (ret < 0) {
> + dev_err(tps->dev, "Error parsing regulator init data\n");
> + return ret;
> + }
Please match regulators using the fields in the regulator_desc rather
than open coding.
[toc] | [next] | [standalone]
| From | "Andrew F. Davis" <afd@ti.com> |
|---|---|
| Date | 2015-11-03 17:00 +0100 |
| Message-ID | <qqMa7-4KZ-27@gated-at.bofh.it> |
| In reply to | #1260461 |
On 10/31/2015 09:37 PM, Mark Brown wrote:
> On Fri, Oct 30, 2015 at 05:41:43PM -0500, Andrew F. Davis wrote:
>
>> +struct tps65086_regulator {
>> + struct regulator_desc desc;
>> + unsigned int decay_reg;
>> + unsigned int decay_mask;
>
> The decay_reg and decay_mask fields appear to be entirely write only,
> why are they present?
>
Not sure what you mean, they are written to differently for each regulator,
and read when setting the decay mode in _probe.
>> + ret = of_regulator_match(&pdev->dev, pdev->dev.of_node,
>> + tps65086_matches,
>> + ARRAY_SIZE(tps65086_matches));
>> + if (ret < 0) {
>> + dev_err(tps->dev, "Error parsing regulator init data\n");
>> + return ret;
>> + }
>
> Please match regulators using the fields in the regulator_desc rather
> than open coding.
>
I need to match to get the driver specific information for each regulator,
if I let regulator_register do it I never get a chance to process the match,
unless there is a callback or something I'm missing.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-11-03 17:40 +0100 |
| Message-ID | <qqMMO-5fY-15@gated-at.bofh.it> |
| In reply to | #1261656 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Nov 03, 2015 at 09:57:46AM -0600, Andrew F. Davis wrote:
> On 10/31/2015 09:37 PM, Mark Brown wrote:
> >On Fri, Oct 30, 2015 at 05:41:43PM -0500, Andrew F. Davis wrote:
> >>+ struct regulator_desc desc;
> >>+ unsigned int decay_reg;
> >>+ unsigned int decay_mask;
> >The decay_reg and decay_mask fields appear to be entirely write only,
> >why are they present?
> Not sure what you mean, they are written to differently for each regulator,
> and read when setting the decay mode in _probe.
Ugh, that's a bit hidden (mostly due to not using the callback).
> >>+ ret = of_regulator_match(&pdev->dev, pdev->dev.of_node,
> >>+ tps65086_matches,
> >>+ ARRAY_SIZE(tps65086_matches));
> >>+ if (ret < 0) {
> >>+ dev_err(tps->dev, "Error parsing regulator init data\n");
> >>+ return ret;
> >>+ }
> >Please match regulators using the fields in the regulator_desc rather
> >than open coding.
> I need to match to get the driver specific information for each regulator,
> if I let regulator_register do it I never get a chance to process the match,
> unless there is a callback or something I'm missing.
There's a callback you are missing, of_parse_cb().
[toc] | [prev] | [next] | [standalone]
| From | "Andrew F. Davis" <afd@ti.com> |
|---|---|
| Date | 2015-11-03 19:00 +0100 |
| Message-ID | <qqO2e-5XS-7@gated-at.bofh.it> |
| In reply to | #1261705 |
On 11/03/2015 10:31 AM, Mark Brown wrote:
> On Tue, Nov 03, 2015 at 09:57:46AM -0600, Andrew F. Davis wrote:
>> On 10/31/2015 09:37 PM, Mark Brown wrote:
>>> On Fri, Oct 30, 2015 at 05:41:43PM -0500, Andrew F. Davis wrote:
>
>>>> + struct regulator_desc desc;
>>>> + unsigned int decay_reg;
>>>> + unsigned int decay_mask;
>
>>> The decay_reg and decay_mask fields appear to be entirely write only,
>>> why are they present?
>
>> Not sure what you mean, they are written to differently for each regulator,
>> and read when setting the decay mode in _probe.
>
> Ugh, that's a bit hidden (mostly due to not using the callback).
>
>>>> + ret = of_regulator_match(&pdev->dev, pdev->dev.of_node,
>>>> + tps65086_matches,
>>>> + ARRAY_SIZE(tps65086_matches));
>>>> + if (ret < 0) {
>>>> + dev_err(tps->dev, "Error parsing regulator init data\n");
>>>> + return ret;
>>>> + }
>
>>> Please match regulators using the fields in the regulator_desc rather
>>> than open coding.
>
>> I need to match to get the driver specific information for each regulator,
>> if I let regulator_register do it I never get a chance to process the match,
>> unless there is a callback or something I'm missing.
>
> There's a callback you are missing, of_parse_cb().
>
Ah, that will make things easier, I'll re-spin with the callback.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web