From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Wadim Egorov <w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org,
alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org
Subject: Re: [RESEND PATCH v5 1/5] mfd: RK808: Add RK818 support
Date: Thu, 9 Jun 2016 16:28:52 +0100 [thread overview]
Message-ID: <20160609152852.GA5438@dell> (raw)
In-Reply-To: <57596B1C.2010101-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
On Thu, 09 Jun 2016, Wadim Egorov wrote:
>
>
> On 09.06.2016 13:12, Lee Jones wrote:
> > On Thu, 09 Jun 2016, Wadim Egorov wrote:
> >> On 08.06.2016 16:17, Lee Jones wrote:
> >>> On Thu, 02 Jun 2016, Wadim Egorov wrote:
> >>>
> >>>> The RK818 chip is a power management IC for multimedia and handheld
> >>> "Power Management IC (PMIC)"
> >>>
> >>>> devices. It contains the following components:
> >>>>
> >>>> - Regulators
> >>>> - RTC
> >>>> - Clkout
> >>> Clocking
> >>>
> >>>> - battery support
> >>> Battery support
> >>>
> >>>> Both chips RK808 and RK818 are using a similar register map.
> >>> "Both RK808 ad RK818 chips"
> >>>
> >>>> So we can reuse the RTC and Clkout functionality.
> >>> Swap '.' for ','.
> >>>
> >>>> Signed-off-by: Wadim Egorov <w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
> >>>> ---
> >>>> drivers/mfd/Kconfig | 4 +-
> >>>> drivers/mfd/rk808.c | 231 ++++++++++++++++++++++++++++++++++++++--------
> >>>> include/linux/mfd/rk808.h | 162 ++++++++++++++++++++++++++++++--
> >>>> 3 files changed, 350 insertions(+), 47 deletions(-)
> > [...]
> >
> >>>> -struct rk808_reg_data {
> >>>> - int addr;
> >>>> - int mask;
> >>>> - int value;
> >>>> -};
> >>> Why are you moving this to the header?
> >> It is now part of the rk808 struct.
> > Why?
> >
> For me it seemed reasonable. My idea was to have only one chip variant
> check.
>
> I can move the rk808_reg_data struct back to the c file, check for the
> chip variant within the probe function and initialize the proper
> reg_data variable.
> This would also apply to the mfd_cell variables.
'struct rk808' should only contain information you wish to share with
your subordinate/child devices. Any data only used in the parent/MFD
driver should be declared, initialised and used only the latter. No
need to export.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2016-06-09 15:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 6:50 [RESEND PATCH v5 1/5] mfd: RK808: Add RK818 support Wadim Egorov
2016-06-02 6:50 ` [RESEND PATCH v5 2/5] regulator: rk808: Add regulator driver for RK818 Wadim Egorov
2016-06-02 6:50 ` [RESEND PATCH v5 3/5] mfd: dt-bindings: Add RK818 device tree bindings document Wadim Egorov
[not found] ` <1464850228-17244-3-git-send-email-w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-06-08 14:23 ` Lee Jones
[not found] ` <1464850228-17244-1-git-send-email-w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-06-02 6:50 ` [RESEND PATCH v5 4/5] clk: Kconfig: Name RK818 in Kconfig for COMMON_CLK_RK808 Wadim Egorov
[not found] ` <1464850228-17244-4-git-send-email-w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-07-06 22:22 ` Michael Turquette
2016-06-02 6:50 ` [RESEND PATCH v5 5/5] rtc: Kconfig: Name RK818 in Kconfig for RTC_DRV_RK808 Wadim Egorov
2016-06-08 14:17 ` [RESEND PATCH v5 1/5] mfd: RK808: Add RK818 support Lee Jones
2016-06-09 8:23 ` Wadim Egorov
2016-06-09 11:12 ` Lee Jones
2016-06-09 13:11 ` Wadim Egorov
[not found] ` <57596B1C.2010101-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-06-09 15:28 ` Lee Jones [this message]
[not found] ` <5759277D.7090101-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-07-06 3:15 ` Andy Yan
[not found] ` <577C77DF.9060706-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-07-06 8:03 ` Wadim Egorov
[not found] ` <577CBB62.8080806-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-07-06 8:56 ` Andy Yan
2016-08-05 12:22 ` Lee Jones
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=20160609152852.GA5438@dell \
--to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
--cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org \
--cc=zyw-TNX95d0MmH7DzftRWevZcw@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).