From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Laxman Dewangan <ldewangan@nvidia.com>,
robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
linus.walleij@linaro.org, gnurou@gmail.com, lee.jones@linaro.org,
broonie@kernel.org, a.zummo@towertech.it,
alexandre.belloni@free-electrons.com
Cc: lgirdwood@gmail.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
rtc-linux@googlegroups.com, swarren@nvidia.com,
treding@nvidia.com
Subject: Re: [PATCH V2 5/6] rtc: max77xxx: add RTC driver for Maxim MAX77xxx series RTC IP
Date: Wed, 13 Jan 2016 13:28:24 +0900 [thread overview]
Message-ID: <5695D268.3060705@samsung.com> (raw)
In-Reply-To: <5695CD73.5010709@nvidia.com>
On 13.01.2016 13:07, Laxman Dewangan wrote:
>
> On Wednesday 13 January 2016 05:36 AM, Krzysztof Kozlowski wrote:
>> On 12.01.2016 18:17, Laxman Dewangan wrote:
>>> Maxim Semiconductor's PMIC MAX77620, MAX77686, MAX20024 have
>>> same RTC IP on these PMICs.
>>>
>>> Add generic MAX77xxxx series RTC driver which can be used as
>>> RTC driver for these PMIC and avoids duplication of RTC driver
>>> for each PMICs. Their MFD driver can be different here.
>>>
>>> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
>>> ---
>>> Changes from V1:
>>> - Rename the file to rtc-max77xxx.c and make the generic implementation.
>>> - Direct regmap apis are used for the register access.
>>> - Decouped from max77620 driver.
>>> - Taken care of cleanup comments form V1 version.
>>>
>>> drivers/rtc/Kconfig | 10 +
>>> drivers/rtc/Makefile | 1 +
>>> drivers/rtc/rtc-max77xxx.c | 500
>>> +++++++++++++++++++++++++++++++++++++++++++++
>>> 3 files changed, 511 insertions(+)
>>> create mode 100644 drivers/rtc/rtc-max77xxx.c
>>>
>>> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
>>> index 376322f..4972dd5 100644
>>> --- a/drivers/rtc/Kconfig
>>> +++ b/drivers/rtc/Kconfig
>>> @@ -315,6 +315,16 @@ config RTC_DRV_MAX8997
>>> This driver can also be built as a module. If so, the module
>>> will be called rtc-max8997.
>>> +config RTC_DRV_MAX77XXX
>>> + tristate "Maxim MAX77XXX series generic RTC driver"
>>> + help
>>> + If you say yes here you will get support for the generic RTC
>>> driver
>>> + for Maxim Semiconductor MAX77XXX series of PMIC like MAX77620.
>>> + This also supports the RTC driver for Maxim PMIC MaX20024 which
>>> + is almost same as MAX77620.
>>> + This driver can also be built as a module. If so, the module
>>> + will be called rtc-max77xxx.
>>> +
>> That was not the consensus... You still added a new driver - but now
>> with different name.
>>
>> That is useless duplication
>>
>> Please work with existing code. Use existing maxim RTC drivers: either
>> max77686 or max77802.
>>
>> There is no need for new one.
>
> If we modify the existing one then that work will be outside of this
> series to make it independent.
And that is the problem? The series evolve. The ultimate goal is to
support max77686, max77802, max77620 and max20024.
>
> However, the file name does not suggest common in older file.
This is not a sensible argument. The name does not matter. But if really
needed we can rename it...
> Also this
> will require mfd and rtc driver changes to decouple it.
Yes, decouple everything! I like it! :) Make it robust, generic,
readable, fix bugs etc. :)
>
> Here is my approach:
> - Let's have common driver in implementation and file name. This will be
> independent of the mfd driver on all sense.
> - Once it is merged, move the max77686 and max77802 to use this driver,
> this will need the modification on the mfd driver, related defconfig
> file and if specific stuff needed in the rtc then addition of that.
Nope, because *the second part won't happen*. Never. After merging you
will be happy and another duplicated stuff ends in the kernel.
Fix things before merging. Not after.
>
> Per your approach:
> - Modify rtc max77686 and mfd driver max77686 to decouple and proper
> registration.
> - Add support of max77620 on the max77686 driver if any specific is
> required.
That is the way we usually extend the drivers for new devices.
>
> That is also fine to me but still I am not comfortable with the config
> name and driver file name as this does not suggest the common.
The name does not matter. Really. We have a lot of drivers with a
specific device-like name and supporting different devices. To point
that your argument is invalid - your initial name of driver
"rtc-max77620.c" supported totally different "names": the max77620 and
max20024. It also wasn't suggesting something "common"...
With my approach we are not developing common think neither. We just
want to extend/re-use existing max77686 (or max77802) driver for new
devices. Just like everywhere else.
Best regards,
Krzysztof
next prev parent reply other threads:[~2016-01-13 4:28 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 9:17 [PATCH V2 0/6] Add support for MAXIM MAX77620/MAX20024 PMIC Laxman Dewangan
2016-01-12 9:17 ` [PATCH V2 1/6] DT: mfd: add device-tree binding doc fro PMIC max77620/max20024 Laxman Dewangan
2016-01-13 2:07 ` Rob Herring
2016-01-12 9:17 ` [PATCH V2 2/6] mfd: max77620: add core driver for MAX77620/MAX20024 Laxman Dewangan
2016-01-13 0:47 ` Krzysztof Kozlowski
2016-01-13 9:00 ` Laxman Dewangan
2016-01-13 10:11 ` Alexandre Belloni
2016-01-12 9:17 ` [PATCH V2 3/6] pinctrl: max77620: add pincontrol " Laxman Dewangan
2016-01-12 9:17 ` [PATCH V2 4/6] gpio: max77620: add gpio " Laxman Dewangan
2016-01-12 9:17 ` [PATCH V2 5/6] rtc: max77xxx: add RTC driver for Maxim MAX77xxx series RTC IP Laxman Dewangan
2016-01-13 0:06 ` Krzysztof Kozlowski
2016-01-13 4:07 ` Laxman Dewangan
2016-01-13 4:28 ` Krzysztof Kozlowski [this message]
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
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 ` [PATCH V2 6/6] regulator: max77620: add regulator driver for max77620/max20024 Laxman Dewangan
2016-01-13 1:28 ` 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=5695D268.3060705@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=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;
as well as URLs for NNTP newsgroup(s).