[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXv+5FM_pxu4Ms1mbvpdJLxkOZe2ZXjNoiOCfANpdxLme+_Lg@mail.gmail.com>
Date: Fri, 17 Feb 2023 23:19:08 +0800
From: Chen-Yu Tsai <wenst@...omium.org>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
Cc: mturquette@...libre.com, sboyd@...nel.org, matthias.bgg@...il.com,
johnson.wang@...iatek.com, miles.chen@...iatek.com,
chun-jie.chen@...iatek.com, daniel@...rotopia.org,
fparent@...libre.com, msp@...libre.com, nfraprado@...labora.com,
rex-bc.chen@...iatek.com, zhaojh329@...il.com,
sam.shih@...iatek.com, edward-jw.yang@...iatek.com,
yangyingliang@...wei.com, granquet@...libre.com,
pablo.sun@...iatek.com, sean.wang@...iatek.com,
chen.zhong@...iatek.com, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, kernel@...labora.com
Subject: Re: [PATCH v2 36/47] clk: mediatek: mt2712: Change Kconfig options to
allow module build
On Fri, Feb 17, 2023 at 7:25 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com> wrote:
>
> Il 17/02/23 05:24, Chen-Yu Tsai ha scritto:
> > On Tue, Feb 14, 2023 at 9:42 PM AngeloGioacchino Del Regno
> > <angelogioacchino.delregno@...labora.com> wrote:
> >>
> >> All of the mt2712 drivers have been converted to platform drivers!
> >> Change the Kconfig options for all MT2712 clocks to tristate to allow
> >> building all clock drivers as modules.
> >>
> >> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> >> ---
> >> drivers/clk/mediatek/Kconfig | 16 ++++++++--------
> >> 1 file changed, 8 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
> >> index b9c0a9e21cf1..45b7aea7648d 100644
> >> --- a/drivers/clk/mediatek/Kconfig
> >> +++ b/drivers/clk/mediatek/Kconfig
> >> @@ -75,7 +75,7 @@ config COMMON_CLK_MT2701_G3DSYS
> >> This driver supports MediaTek MT2701 g3dsys clocks.
> >>
> >> config COMMON_CLK_MT2712
> >> - bool "Clock driver for MediaTek MT2712"
> >> + tristate "Clock driver for MediaTek MT2712"
> >
> > Hmm... How does that work out if mt2712-apmixedsys is a
> > builtin_platform_driver?
> >
> > ChenYu
>
> That doesn't. Thanks for catching that, I've added a .remove() callback
> and changed it to module_platform_driver() for v3!
Actually, I thought that if it were built as a module, then the
builtin_platform_driver would then expand to a module_init() without
module_exit(). So it would become a loadable module that cannot be
unloaded.
That was just looking at the header files, so I could be mistaken.
Side note: IIRC a missing .remove() driver callback doesn't actually
block driver removal or unbinding.
ChenYu
Powered by blists - more mailing lists