From: peter@korsgaard.com (Peter Korsgaard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver
Date: Fri, 15 Jan 2016 08:58:10 +0100 [thread overview]
Message-ID: <8737tzz33h.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <B256D81BAE5131468A838E5D7A243641D63ECA51@penmbx01> (Wenyou Yang's message of "Fri, 15 Jan 2016 01:16:11 +0000")
>>>>> "Yang," == Yang, Wenyou <Wenyou.Yang@atmel.com> writes:
Hi,
>> Why not make it a tristate instead? Having regulators as modules is perhaps not a
>> very wise thing to do, but conceptually I don't see why this code couldn't be a
>> module.
> Yes, you are right. it can be use a tristate.
Ok, good.
>> > + act8945a = devm_kzalloc(&i2c->dev, sizeof(*act8945a), GFP_KERNEL);
>> > + if (!act8945a)
>> > + return -ENOMEM;
>> > +
>>
>> What is the point of this structure (and the header file)? Can't the subdevices just
>> do dev_get_regmap(dev->parent)? regulator_register() afaik already does this by
>> default.
> Yes, I re-read regulator_register() code. It did do dev_get_regmap(dev->parent).
> I think this structure should be pointed by dev->parent, this structure is necessary.
> Yes regulator driver should be simpler.
> Moreover, it is used by another sub device, charger. Which don't such code.
But the charger driver can just as well do:
dev_get_regmap(dev->parent);
instead of:
dev_get_drvdata(pdev->dev.parent)->regmap.
--
Venlig hilsen,
Peter Korsgaard
next prev parent reply other threads:[~2016-01-15 7:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 5:04 [PATCH v5 0/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver Wenyou Yang
2016-01-14 5:04 ` [PATCH v5 1/2] " Wenyou Yang
2016-01-14 13:35 ` Peter Korsgaard
2016-01-15 1:16 ` Yang, Wenyou
2016-01-15 7:58 ` Peter Korsgaard [this message]
2016-01-15 8:38 ` Yang, Wenyou
2016-01-20 7:26 ` Yang, Wenyou
2016-01-20 7:40 ` Peter Korsgaard
2016-01-20 7:50 ` Yang, Wenyou
2016-01-20 7:53 ` Krzysztof Kozlowski
2016-01-14 5:04 ` [PATCH v5 2/2] mfd: add documentation for ACT8945A DT bindings Wenyou Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737tzz33h.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).