From: "Yang, Wenyou" <wenyou.yang@atmel.com>
To: Peter Korsgaard <peter@korsgaard.com>
Cc: Lee Jones <lee.jones@linaro.org>,
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>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
"Ferre, Nicolas" <Nicolas.FERRE@atmel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Javier Martinez Canillas <javier@dowhile0.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5 1/2] mfd: act8945a: add Active-semi ACT8945A PMIC MFD driver
Date: Wed, 20 Jan 2016 15:50:29 +0800 [thread overview]
Message-ID: <569F3C45.7090109@atmel.com> (raw)
In-Reply-To: <87d1swvgv8.fsf@dell.be.48ers.dk>
Hi Peter,
On 2016/1/20 15:40, Peter Korsgaard wrote:
>>>>>> "Yang," == Yang, Wenyou <Wenyou.Yang@atmel.com> writes:
> Hi,
>
>>> But the charger driver can just as well do:
> >>
> >> dev_get_regmap(dev->parent);
> >>
> >> instead of:
> >>
> >> dev_get_drvdata(pdev->dev.parent)->regmap.
>
> > For regulator, it works use the core do dev_get_regmap(dev->parent),
> > but for charger, it need to export *act8945a.
>
> Why?
There is a callback (*get_property)(...), who will read the charger
register via regmap,
but it doesn't provide the argument for regmap.
include/linux/power_supply.h
struct power_supply_desc {
[ ... ]
int (*get_property)(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val);
[ ... ]
}
>
> Just like the regulator core does, your battery driver can do:
>
> dev_get_regmap(dev->parent);
>
Best Regards,
Wenyou Yang
next prev parent reply other threads:[~2016-01-20 7:51 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
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 [this message]
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=569F3C45.7090109@atmel.com \
--to=wenyou.yang@atmel.com \
--cc=Nicolas.FERRE@atmel.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=javier@dowhile0.org \
--cc=k.kozlowski@samsung.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=peter@korsgaard.com \
--cc=robh+dt@kernel.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).