From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Javier Martinez Canillas <javier@dowhile0.org>,
Laxman Dewangan <ldewangan@nvidia.com>
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>,
Lee Jones <lee.jones@linaro.org>, Mark Brown <broonie@kernel.org>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux GPIO List <linux-gpio@vger.kernel.org>,
rtc-linux@googlegroups.com, Stephen Warren <swarren@nvidia.com>,
Thierry Reding <treding@nvidia.com>
Subject: [rtc-linux] Re: [PATCH V2 5/6] rtc: max77xxx: add RTC driver for Maxim MAX77xxx series RTC IP
Date: Mon, 18 Jan 2016 13:27:11 +0900 [thread overview]
Message-ID: <569C699F.10407@samsung.com> (raw)
In-Reply-To: <CABxcv=kqQc1DNmMJ1PAQkB7d=w9V4-85kJXtOXRPpwpXn7to8A@mail.gmail.com>
On 15.01.2016 10:50, Javier Martinez Canillas wrote:
> Hello,
>
> On Thu, Jan 14, 2016 at 8:50 AM, Laxman Dewangan <ldewangan@nvidia.com> wrote:
>> On Thursday 14 January 2016 06:50 AM, Krzysztof Kozlowski wrote:
>>> On 14.01.2016 09:50, Krzysztof Kozlowski wrote:
>
> [snip]
>
>>>>
>>>> The max77802 does exactly the same (BTW, these should be merged as
>>>> well... I'll add this to the TODO list) so I think this is necessary.
>>>
>>> How about merging max77802 to max77686 first? The only differences I
>>> found are:
>>> 1. It uses main MFD/PMIC regmap.
>>> This can be solved as part of decoupling code. The driver will get
>>> MFD's regmap and set up its own (only on max77686). The max77802 will
>>> only use parent's regmap.
>>>
>>> 2. It has different register address.
>>> We need a register-layout/configuration structure. The logic is the
>>> same except few differences (e.g. presence of MAX77802_RTC_AE1).
>>>
>>> It may be easier to merge them now, before adding support for max77620?
>
> Agreed.
>
> When I originally posted the max77802 support, I had separate MFD,
> RTC, regulator and clock drivers and the feedback (IIRC) was that the
> MFD and clock blocks were too similar to the max77686 so I extended
> those drivers instead of adding new ones. But that the RTC and
> regulator blocks were different so a separate driver was justified...
> but it's true that are not that different and rtc-max77686 could be
> extended and rtc-max77802 removed.
Great!
>
> In fact, the ChromiumOS vendor tree has a single RTC driver for both
> max77686 and max77802:
>
> https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.8/drivers/rtc/rtc-max77xxx.c
>
>>> I could handle this probably next week or in the following week
>>> (assuming someone would test max77802 because I don't have the hardware).
>>>
>
> I could also work on this next week if you want. After all I feel
> guilty for the code duplication :-)
So feel free to take that job from me. :) I will happily do the testing
and provide complains (I mean, comments).
>
>>> Anyway I think we should develop these RTC patches having this in mind:
>>> merge all of them.
>>>
>>
>> I think we can do the merging of max77802 and max77686 at second step.
>>
>> At first, lets decouple the rtc-max77686.c with its mfd driver. This will
>> give better picture how will it be done.
>
> I don't quite understand what you mean by decoupling here, the
> max77686 MFD driver today is not highly coupled to their cells devices
> drivers since it supports both max77802 and max77686 already. Yes,
> some changes will be needed but I think those should be small.
The decoupling needed is to move RTC-related stuff (i2c_new_dummy and
regmap) entirely to RTC driver. This work is independent of which driver
will be merged to rtc-max77xxx first.
>
>> Once this is there then max77620 can use this and in parallel, can be work
>> for max77802 to use the same driver.
>>
>>
>> Let's first conclude and get accpepted for max77686 and max77620 as both of
>> us have related HW to verify the changes.
>>
>
> I agree with Krzysztof that merging first before extending makes more
> sense but I don't have a strong opinion on this and can be done as a
> followup as well.
AFAIR, Javier have max77802 on Chromebook, right?
Best regards,
Krzysztof
--
--
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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2016-01-18 4:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 9:17 [rtc-linux] [PATCH V2 0/6] Add support for MAXIM MAX77620/MAX20024 PMIC Laxman Dewangan
2016-01-12 9:17 ` [rtc-linux] [PATCH V2 1/6] DT: mfd: add device-tree binding doc fro PMIC max77620/max20024 Laxman Dewangan
2016-01-13 2:07 ` [rtc-linux] " Rob Herring
2016-01-12 9:17 ` [rtc-linux] [PATCH V2 2/6] mfd: max77620: add core driver for MAX77620/MAX20024 Laxman Dewangan
2016-01-13 0:47 ` [rtc-linux] " Krzysztof Kozlowski
2016-01-13 9:00 ` Laxman Dewangan
2016-01-13 10:11 ` Alexandre Belloni
2016-01-12 9:17 ` [rtc-linux] [PATCH V2 3/6] pinctrl: max77620: add pincontrol " Laxman Dewangan
2016-01-12 9:17 ` [rtc-linux] [PATCH V2 4/6] gpio: max77620: add gpio " Laxman Dewangan
2016-01-12 9:17 ` [rtc-linux] [PATCH V2 5/6] rtc: max77xxx: add RTC driver for Maxim MAX77xxx series RTC IP Laxman Dewangan
2016-01-13 0:06 ` [rtc-linux] " Krzysztof Kozlowski
2016-01-13 4:07 ` Laxman Dewangan
2016-01-13 4:28 ` Krzysztof Kozlowski
2016-01-13 4:25 ` Laxman Dewangan
2016-01-13 14:59 ` Laxman Dewangan
2016-01-14 0:50 ` Krzysztof Kozlowski
2016-01-14 1:20 ` Krzysztof Kozlowski
2016-01-14 11:50 ` Laxman Dewangan
2016-01-15 1:50 ` Javier Martinez Canillas
2016-01-18 4:27 ` Krzysztof Kozlowski [this message]
2016-01-18 12:01 ` Laxman Dewangan
2016-01-18 12:52 ` Javier Martinez Canillas
2016-01-14 14:20 ` Mark Brown
2016-01-18 4:23 ` Krzysztof Kozlowski
2016-01-12 9:17 ` [rtc-linux] [PATCH V2 6/6] regulator: max77620: add regulator driver for max77620/max20024 Laxman Dewangan
2016-01-13 1:28 ` [rtc-linux] " Krzysztof Kozlowski
2016-01-13 11:39 ` Laxman Dewangan
2016-01-13 11:57 ` Mark Brown
2016-01-13 12:05 ` Laxman Dewangan
2016-01-13 12:31 ` Mark Brown
2016-01-13 12:37 ` Laxman Dewangan
2016-01-13 13:09 ` Mark Brown
2016-01-13 13:11 ` Laxman Dewangan
2016-01-13 14:20 ` Mark Brown
2016-01-13 14:42 ` Laxman Dewangan
2016-01-13 15:51 ` Mark Brown
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=569C699F.10407@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gnurou@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=javier@dowhile0.org \
--cc=ldewangan@nvidia.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=swarren@nvidia.com \
--cc=treding@nvidia.com \
/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