From: Marek Vasut <marek.vasut@gmail.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org,
Marek Vasut <marek.vasut+renesas@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Mark Brown <broonie@kernel.org>,
Steve Twiss <stwiss.opensource@diasemi.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 08/10] mfd: da9063: Register RTC only on DA9063L
Date: Wed, 6 Jun 2018 11:17:53 +0200 [thread overview]
Message-ID: <69893894-899f-54cd-2610-96653ec246c0@gmail.com> (raw)
In-Reply-To: <20180606061623.GT21163@dell>
On 06/06/2018 08:16 AM, Lee Jones wrote:
> On Tue, 05 Jun 2018, Marek Vasut wrote:
[...]
>>>> -static const struct mfd_cell da9063_devs[] = {
>>>> +static const struct mfd_cell da9063_common_devs[] = {
>>>> {
>>>> .name = DA9063_DRVNAME_REGULATORS,
>>>
>>> Appreciate that these are historical, but these device name defines
>>> make me shudder. They only serve to act as an obfuscation layer when
>>> debugging at platform level. Please consider getting rid of them.
>>
>> The macro can be shared between the core and the drivers, so the names
>> never run out of sync.
>
> Platform driver name changes are vary rare. Even if they are changed,
> even light testing would uncover the fact that child drivers do not
> .probe().
Sure, while if the macro is used, this problem is avoided altogether.
> Due to the current obfuscation, I currently have no idea
> what this device's name is.
I'm sure ctags or git grep can easily help.
> This technique is not allowed for new
> drivers - unfortunately I didn't not review this driver in the first
> instance.
Why not ? This looks like a step back to me.
> It doesn't bother me enough to go and change it myself and I'm not
> going to have a baby over patches not being submitted to fix it.
>
>>>> .num_resources = ARRAY_SIZE(da9063_regulators_resources),
>>>> @@ -100,15 +100,19 @@ static const struct mfd_cell da9063_devs[] = {
>>>> .resources = da9063_onkey_resources,
>>>> .of_compatible = "dlg,da9063-onkey",
>>>> },
>>>> + {
>>>> + .name = DA9063_DRVNAME_VIBRATION,
>>>> + },
>>>
>>> Place this on a single line please.
>>
>> This would only make the style inconsistent with the ie. LEDs entry.
>>
>>> { .name = DA9063_DRVNAME_VIBRATION },
>
> If that is a one line entry spaced over multiple lines, then that
> should also be changed.
>
> Maybe I will go through and stylise this driver a bit after all (but
> as time is short at the moment, maybe not!) :)
You'd end up with two entries which look different then the rest, which
triggers my OCD.
> [...]
>
>>>> +err_mfd_cleanup:
>>>> + mfd_remove_devices(da9063->dev);
>>>
>>> Any reason why you can't use devm_*?
>>
>> Because we need to undo the MFD setup before the IRQ setup.
>
> Sounds like a good enough reason.
Or the da9063_irq_init() could use devm_regmap_add_irq_chip().
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2018-06-06 9:50 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-02 10:11 [PATCH v3 01/10] mfd: da9063: Fix failpath in core Marek Vasut
2018-06-02 10:11 ` [PATCH v3 02/10] mfd: da9063: Use REGMAP_IRQ_REG Marek Vasut
2018-06-04 7:17 ` Geert Uytterhoeven
2018-06-04 12:26 ` Lee Jones
2018-06-04 16:23 ` Marek Vasut
2018-06-05 7:09 ` Lee Jones
2018-06-05 7:31 ` Geert Uytterhoeven
2018-06-05 8:16 ` Lee Jones
2018-06-05 19:48 ` Steve Twiss
2018-06-02 10:11 ` [PATCH v3 03/10] mfd: da9063: Rename PMIC_DA9063 to PMIC_CHIP_ID_DA9063 Marek Vasut
2018-06-04 12:26 ` Lee Jones
2018-06-04 18:31 ` Marek Vasut
2018-06-05 7:05 ` Lee Jones
2018-06-05 17:16 ` Steve Twiss
2018-06-05 17:20 ` Marek Vasut
2018-06-05 19:49 ` Steve Twiss
2018-06-02 10:11 ` [PATCH v3 04/10] mfd: da9063: Replace model with type Marek Vasut
2018-06-05 7:21 ` Lee Jones
2018-06-02 10:11 ` [PATCH v3 05/10] mfd: da9063: Add DA9063L type Marek Vasut
2018-06-05 7:22 ` Lee Jones
2018-06-05 19:50 ` Steve Twiss
2018-06-02 10:11 ` [PATCH v3 06/10] mfd: da9063: Add custom regmap for DA9063L Marek Vasut
2018-06-04 7:39 ` Geert Uytterhoeven
2018-06-04 16:25 ` Marek Vasut
2018-06-05 20:17 ` Steve Twiss
2018-06-05 23:02 ` Marek Vasut
2018-06-06 9:47 ` Steve Twiss
2018-06-06 9:50 ` Marek Vasut
2018-06-02 10:11 ` [PATCH v3 07/10] mfd: da9063: Add custom IRQ map " Marek Vasut
2018-06-05 7:47 ` Lee Jones
2018-06-05 7:54 ` Geert Uytterhoeven
2018-06-05 8:24 ` Lee Jones
2018-06-05 19:52 ` Steve Twiss
2018-06-05 22:58 ` Marek Vasut
2018-06-02 10:11 ` [PATCH v3 08/10] mfd: da9063: Register RTC only on DA9063L Marek Vasut
2018-06-05 7:53 ` Lee Jones
2018-06-05 9:29 ` Marek Vasut
2018-06-06 6:16 ` Lee Jones
2018-06-06 9:17 ` Marek Vasut [this message]
2018-06-07 5:04 ` Lee Jones
2018-06-07 10:57 ` Marek Vasut
2018-06-07 13:24 ` Lee Jones
2018-06-02 10:11 ` [PATCH v3 09/10] mfd: da9063: Handle less LDOs " Marek Vasut
2018-06-05 8:18 ` Lee Jones
2018-06-02 10:11 ` [PATCH v3 10/10] mfd: da9063: Add DA9063L support Marek Vasut
2018-06-05 8:18 ` Lee Jones
2018-06-05 19:47 ` Steve Twiss
2018-06-04 7:16 ` [PATCH v3 01/10] mfd: da9063: Fix failpath in core Geert Uytterhoeven
2018-06-04 8:28 ` Vaishali Thakkar
2018-06-04 12:24 ` Lee Jones
2018-06-04 13:08 ` Marek Vasut
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=69893894-899f-54cd-2610-96653ec246c0@gmail.com \
--to=marek.vasut@gmail.com \
--cc=broonie@kernel.org \
--cc=geert+renesas@glider.be \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=stwiss.opensource@diasemi.com \
--cc=wsa+renesas@sang-engineering.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
Powered by JetHome