Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1261748

Re: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From "Andrew F. Davis" <afd@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC
Date Tue, 03 Nov 2015 19:00:02 +0100
Message-ID <qqO2e-5XS-7@gated-at.bofh.it> (permalink)
References <qpqEF-3cv-5@gated-at.bofh.it> <qpqEG-3cv-19@gated-at.bofh.it> <qqj86-3aX-17@gated-at.bofh.it> <qqMa7-4KZ-27@gated-at.bofh.it> <qqMMO-5fY-15@gated-at.bofh.it>
X-Original-To Mark Brown <broonie@kernel.org>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version 1.0
Content-Type text/plain; charset="windows-1252"; format=flowed
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
X-Original-Cc Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>, Mark Rutland <mark.rutland@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, Linus Walleij <linus.walleij@linaro.org>, Alexandre Courbot <gnurou@gmail.com>, Samuel Ortiz <sameo@linux.intel.com>, Lee Jones <lee.jones@linaro.org>, Liam Girdwood <lgirdwood@gmail.com>, <devicetree@vger.kernel.org>, <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
X-Original-Date Tue, 3 Nov 2015 11:57:03 -0600
X-Original-Message-ID <5638F56F.2050102@ti.com>
X-Original-References <1446244904-29315-1-git-send-email-afd@ti.com> <1446244904-29315-6-git-send-email-afd@ti.com> <20151101023735.GE28319@sirena.org.uk> <5638D97A.8040306@ti.com> <20151103163117.GQ20228@sirena.org.uk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1261748

Show key headers only | View raw


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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web