From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Nikita Shubin <nikita.shubin@maquefel.me>,
Andy Shevchenko <andy@kernel.org>,
Alexander Sverdlin <alexander.sverdlin@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Michael Peters <mpeters@embeddedTS.com>,
Kris Bahnsen <kris@embeddedTS.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 07/42] soc: Add SoC driver for Cirrus ep93xx
Date: Mon, 24 Jul 2023 18:31:33 +0200 [thread overview]
Message-ID: <886e29ec-a290-993a-d99a-d5fd90662e99@linaro.org> (raw)
In-Reply-To: <4073daf401a820c0f64e6fa813b5253bd0427bcd.camel@maquefel.me>
On 24/07/2023 17:02, Nikita Shubin wrote:
>>> +static DEFINE_SPINLOCK(ep93xx_swlock);
>>> +
>>> +/* EP93xx System Controller software locked register write */
>>> +void ep93xx_syscon_swlocked_write(struct regmap *map, unsigned int
>>> reg, unsigned int val)
>>> +{
>>> + unsigned long flags;
>>> +
>>> + spin_lock_irqsave(&ep93xx_swlock, flags);
>>> +
>>> + regmap_write(map, EP93XX_SYSCON_SWLOCK,
>>> EP93XX_SWLOCK_MAGICK);
>>> + regmap_write(map, reg, val);
>>> +
>>> + spin_unlock_irqrestore(&ep93xx_swlock, flags);
>>> +}
>>> +EXPORT_SYMBOL_NS_GPL(ep93xx_syscon_swlocked_write, EP93XX_SOC);
>>
>> I doubt that your code compiles. Didn't you add a user of this in
>> some
>> earlier patch?
>>
>> Anyway, no, drop it, don't export some weird calls from core initcall
>> to
>> drivers. You violate layering and driver encapsulation. There is no
>> dependency/probe ordering.
>>
>> There is no even need for this, because this code does not use it!
>
> It's a little emotional, so i can hardly understand the exact reason of
> dissatisfaction.
>
> Are you against usage of EXPORT_SYMBOL_NS_GPL ? - then indeed my fault
> it's not needed as both PINCTRL and CLK (the only users of this code)
> can't be built as modules.
I am against any exported symbols and most of functions visible outside
of this driver.
...
>>> +
>>> + pr_info("EP93xx SoC revision %s\n", attrs->revision);
>>> +
>>> + return 0;
>>> +}
>>> +core_initcall(ep93xx_soc_init);
>>
>> That's not the way to add soc driver. You need a proper driver for it
>
> What is a proper driver for these ?
Usually platform_driver, e.g. exynos-chipid.
>
> Even the latest additions in drivers/soc/* go with *_initcall.
Which one? Ones which call platform_driver_register()? That's quite
different story, isn't it? I don't see other recent cases, except
regulator couplers. They might be, some people send and accept poor
code, so what do you expect from us? Crappy code got in once, so more of
it can go?
>
> The only i can see is:
> ./versatile/soc-
> realview.c:132:builtin_platform_driver(realview_soc_driver);
>
> By Linus =).
20 years ago module parameters were quite popular. Try to add one now, I
know what comment you will get. Just because something was added by
someone some time ago, is not a reason to do the same. Things change,
Linux changed.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-07-24 16:32 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230605-ep93xx-v3-0-3d63a5f1103e@maquefel.me>
2023-07-20 8:54 ` [PATCH v3 00/42] ep93xx device tree conversion Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-13-3d63a5f1103e@maquefel.me>
2023-07-20 8:54 ` [PATCH v3 13/42] watchdog: ep93xx: add DT support for Cirrus EP93xx Alexander Sverdlin
2023-07-20 13:29 ` Guenter Roeck
[not found] ` <20230605-ep93xx-v3-38-3d63a5f1103e@maquefel.me>
2023-07-20 9:40 ` [PATCH v3 38/42] ata: pata_ep93xx: remove legacy pinctrl use Sergey Shtylyov
2023-07-21 14:16 ` Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-26-3d63a5f1103e@maquefel.me>
2023-07-20 9:45 ` [PATCH v3 26/42] ata: pata_ep93xx: add device tree support Sergey Shtylyov
[not found] ` <20230605-ep93xx-v3-32-3d63a5f1103e@maquefel.me>
2023-07-20 13:30 ` [PATCH v3 32/42] wdt: ts72xx: add DT support for ts72xx Guenter Roeck
[not found] ` <20230605-ep93xx-v3-33-3d63a5f1103e@maquefel.me>
2023-07-20 14:49 ` [PATCH v3 33/42] gpio: ep93xx: add DT support for gpio-ep93xx Bartosz Golaszewski
[not found] ` <20230605-ep93xx-v3-1-3d63a5f1103e@maquefel.me>
2023-07-20 14:51 ` [PATCH v3 01/42] gpio: ep93xx: split device in multiple Bartosz Golaszewski
2023-07-21 13:18 ` Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-3-3d63a5f1103e@maquefel.me>
[not found] ` <3fcb760c101c5f7081235290362f5c02.sboyd@kernel.org>
2023-07-21 13:46 ` [PATCH v3 03/42] clk: ep93xx: add DT support for Cirrus EP93xx Andy Shevchenko
2023-07-23 18:37 ` Nikita Shubin
2023-07-28 8:38 ` Nikita Shubin
[not found] ` <20230605-ep93xx-v3-2-3d63a5f1103e@maquefel.me>
2023-07-21 13:58 ` [PATCH v3 02/42] dt-bindings: clock: Add " Krzysztof Kozlowski
[not found] ` <11dbf88d12051497ba1e3b16c0d39066.sboyd@kernel.org>
2023-07-23 18:20 ` Nikita Shubin
[not found] ` <20230605-ep93xx-v3-4-3d63a5f1103e@maquefel.me>
2023-07-21 14:01 ` [PATCH v3 04/42] dt-bindings: pinctrl: " Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-6-3d63a5f1103e@maquefel.me>
2023-07-21 14:04 ` [PATCH v3 06/42] dt-bindings: soc: " Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-10-3d63a5f1103e@maquefel.me>
2023-07-21 14:07 ` [PATCH v3 10/42] dt-bindings: rtc: " Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-12-3d63a5f1103e@maquefel.me>
2023-07-20 13:28 ` [PATCH v3 12/42] dt-bindings: watchdog: Add Cirrus EP93x Guenter Roeck
2023-07-21 14:08 ` Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-29-3d63a5f1103e@maquefel.me>
2023-07-21 14:10 ` [PATCH v3 29/42] dt-bindings: rtc: Add ST M48T86 Krzysztof Kozlowski
2023-08-23 10:16 ` Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-34-3d63a5f1103e@maquefel.me>
2023-07-21 14:12 ` [PATCH v3 34/42] ARM: dts: add Cirrus EP93XX SoC .dtsi Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-7-3d63a5f1103e@maquefel.me>
2023-07-21 14:13 ` [PATCH v3 07/42] soc: Add SoC driver for Cirrus ep93xx Andy Shevchenko
2023-07-28 9:28 ` Nikita Shubin
2023-07-28 9:46 ` Andy Shevchenko
2023-07-28 10:01 ` Nikita Shubin
2023-07-31 20:16 ` Andy Shevchenko
2023-11-11 21:33 ` Alexander Sverdlin
2023-11-13 10:19 ` Andy Shevchenko
2023-07-21 14:22 ` Krzysztof Kozlowski
2023-07-24 15:02 ` Nikita Shubin
2023-07-24 16:31 ` Krzysztof Kozlowski [this message]
2023-07-24 18:04 ` Arnd Bergmann
2023-07-24 19:04 ` Krzysztof Kozlowski
2023-07-25 7:32 ` Nikita Shubin
2023-08-15 20:40 ` Linus Walleij
[not found] ` <20230605-ep93xx-v3-35-3d63a5f1103e@maquefel.me>
2023-07-21 14:15 ` [PATCH v3 35/42] ARM: dts: ep93xx: add ts7250 board Krzysztof Kozlowski
2023-07-24 13:41 ` Nikita Shubin
2023-07-24 13:48 ` Krzysztof Kozlowski
2023-07-29 20:59 ` Linus Walleij
2023-07-31 11:55 ` Nikita Shubin
[not found] ` <20230605-ep93xx-v3-41-3d63a5f1103e@maquefel.me>
2023-07-21 14:16 ` [PATCH v3 41/42] ARM: dts: ep93xx: Add EDB9302 DT Krzysztof Kozlowski
2023-07-21 14:25 ` [PATCH v3 00/42] ep93xx device tree conversion Krzysztof Kozlowski
[not found] ` <20230605-ep93xx-v3-5-3d63a5f1103e@maquefel.me>
2023-07-21 15:30 ` [PATCH v3 05/42] pinctrl: add a Cirrus ep93xx SoC pin controller Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-9-3d63a5f1103e@maquefel.me>
2023-07-21 15:58 ` [PATCH v3 09/42] clocksource: ep93xx: Add driver for Cirrus Logic EP93xx Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-28-3d63a5f1103e@maquefel.me>
2023-07-20 17:17 ` [PATCH v3 28/42] input: keypad: ep93xx: add DT support for Cirrus EP93xx Dmitry Torokhov
2023-07-21 16:12 ` Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-22-3d63a5f1103e@maquefel.me>
2023-07-21 16:20 ` [PATCH v3 22/42] dma: cirrus: " Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-24-3d63a5f1103e@maquefel.me>
2023-07-21 16:27 ` [PATCH v3 24/42] mtd: nand: add support for ts72xx Andy Shevchenko
2023-07-24 7:09 ` Miquel Raynal
[not found] ` <20230605-ep93xx-v3-20-3d63a5f1103e@maquefel.me>
2023-07-21 16:32 ` [PATCH v3 20/42] net: cirrus: add DT support for Cirrus EP93xx Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-14-3d63a5f1103e@maquefel.me>
2023-07-21 16:37 ` [PATCH v3 14/42] power: reset: Add a driver for the ep93xx reset Andy Shevchenko
2023-07-28 13:53 ` Nikita Shubin
2023-07-31 20:27 ` Andy Shevchenko
2023-11-11 18:18 ` Alexander Sverdlin
2023-11-13 9:59 ` Andy Shevchenko
2023-11-13 10:04 ` Alexander Sverdlin
2023-11-13 10:07 ` Alexander Sverdlin
2023-11-13 10:22 ` Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-18-3d63a5f1103e@maquefel.me>
2023-07-21 16:42 ` [PATCH v3 18/42] spi: ep93xx: add DT support for Cirrus EP93xx Andy Shevchenko
[not found] ` <20230605-ep93xx-v3-37-3d63a5f1103e@maquefel.me>
2023-07-28 8:23 ` [PATCH v3 37/42] pwm: ep93xx: drop legacy pinctrl Thierry Reding
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=886e29ec-a290-993a-d99a-d5fd90662e99@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alexander.sverdlin@gmail.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=kris@embeddedTS.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpeters@embeddedTS.com \
--cc=nikita.shubin@maquefel.me \
/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
all inboxes | Powered by JetHome®