From: "Yang, Wenyou" <wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Peter Korsgaard <peter-+2lRwdCCLRT2eFz/2MeuCQ@public.gmane.org>
Cc: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Krzysztof Kozlowski
<k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
"Ferre,
Nicolas" <Nicolas.FERRE-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Javier Martinez Canillas
<javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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-D6SC8u56vOOJDPpyT6T3/w@public.gmane.org>
Hi Peter,
On 2016/1/20 15:40, Peter Korsgaard wrote:
>>>>>> "Yang," == Yang, Wenyou <Wenyou.Yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-20 7:50 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
[not found] ` <1452747845-2962-1-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-01-14 5:04 ` [PATCH v5 1/2] " Wenyou Yang
[not found] ` <1452747845-2962-2-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-01-14 13:35 ` Peter Korsgaard
[not found] ` <87pox41dy9.fsf-D6SC8u56vOOJDPpyT6T3/w@public.gmane.org>
2016-01-15 1:16 ` Yang, Wenyou
2016-01-15 7:58 ` Peter Korsgaard
[not found] ` <8737tzz33h.fsf-D6SC8u56vOOJDPpyT6T3/w@public.gmane.org>
2016-01-15 8:38 ` Yang, Wenyou
2016-01-20 7:26 ` Yang, Wenyou
2016-01-20 7:40 ` Peter Korsgaard
[not found] ` <87d1swvgv8.fsf-D6SC8u56vOOJDPpyT6T3/w@public.gmane.org>
2016-01-20 7:50 ` Yang, Wenyou [this message]
[not found] ` <569F3C45.7090109-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
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-aife0yeh4naavxtiumwx3w@public.gmane.org \
--cc=Nicolas.FERRE-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org \
--cc=k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=peter-+2lRwdCCLRT2eFz/2MeuCQ@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).