Message ID | 20230306140543.1813621-1-angelogioacchino.delregno@collabora.com (mailing list archive) |
---|---|
Headers | show |
Series | MediaTek clocks: full module build and cleanups | expand |
Quoting AngeloGioacchino Del Regno (2023-03-06 06:04:49) > > NOTE: Applies on top of [1] and [2]. > > > Full blurb: > > This huge series adds more cleanups on top, reducing size and adding more > commonization for clock drivers probe/remove, which also includes a new > common probe mechanism for multimedia clock drivers that are usually > probed by mtk-mmsys instead of a dt clock node: thanks to this, it was > finally possible to convert almost all clock drivers to the common probe > mechanism, which *finally again* makes us able to build all these drivers > as modules! > > Since this looked like being *the* way forward, I went on converting some > more drivers away from OF_CLK_DECLARE_DRIVER to full platform_driver(s), > allowing for more (actually, almost all!) drivers to be built as modules. > > While at it, I also added some more consistency in macros usage by > removing all of the duplicated full macro declaration for MediaTek gate > clocks and replacing all of those with using the GATE_MTK macro instead, > producing a nice reduction in amount of lines per file but, more > importantly, improving readability and eventual future batch changes. > > This amount of commonization will also, in my opinion, greatly improve > the review process for new clock drivers, as they will be mostly just a > list of clocks and won't contain much new code, as it's all going to be > handled in the common places, which also reduces chances to see new clock > driver related bugs emerging on one SoC or the other. > > Since I don't own devices with all of the supported MediaTek SoCs, I > could not test some of the conversions on real hardware... but I am > confident that this will work as the drivers are *very* similar on a > per-generation basis. > > This series was build-tested for all (both module and built-in build) > and was manually tested on MT6795, MT8173, MT8192, MT8195. > > [1]: https://patchwork.kernel.org/project/linux-mediatek/list/?series=719067 > [2]: https://patchwork.kernel.org/project/linux-mediatek/patch/20230207014800.7619-2-moudy.ho@mediatek.com/ > Please use lore links (https://lore.kernel.org/r/<message-id>). [2] has been applied in an alternative form. [1] doesn't have any review besides DT review. Please get it reviewed.
Quoting AngeloGioacchino Del Regno (2023-03-06 06:04:49) > > This huge series adds more cleanups on top, reducing size and adding more > commonization for clock drivers probe/remove, which also includes a new > common probe mechanism for multimedia clock drivers that are usually > probed by mtk-mmsys instead of a dt clock node: thanks to this, it was > finally possible to convert almost all clock drivers to the common probe > mechanism, which *finally again* makes us able to build all these drivers > as modules! > > Since this looked like being *the* way forward, I went on converting some > more drivers away from OF_CLK_DECLARE_DRIVER to full platform_driver(s), > allowing for more (actually, almost all!) drivers to be built as modules. > > While at it, I also added some more consistency in macros usage by > removing all of the duplicated full macro declaration for MediaTek gate > clocks and replacing all of those with using the GATE_MTK macro instead, > producing a nice reduction in amount of lines per file but, more > importantly, improving readability and eventual future batch changes. > > This amount of commonization will also, in my opinion, greatly improve > the review process for new clock drivers, as they will be mostly just a > list of clocks and won't contain much new code, as it's all going to be > handled in the common places, which also reduces chances to see new clock > driver related bugs emerging on one SoC or the other. > > Since I don't own devices with all of the supported MediaTek SoCs, I > could not test some of the conversions on real hardware... but I am > confident that this will work as the drivers are *very* similar on a > per-generation basis. > > This series was build-tested for all (both module and built-in build) > and was manually tested on MT6795, MT8173, MT8192, MT8195. > Applied the whole series to clk-next.
On Tue, Mar 14, 2023 at 7:22 AM Stephen Boyd <sboyd@kernel.org> wrote: > > Quoting AngeloGioacchino Del Regno (2023-03-06 06:04:49) > > > > This huge series adds more cleanups on top, reducing size and adding more > > commonization for clock drivers probe/remove, which also includes a new > > common probe mechanism for multimedia clock drivers that are usually > > probed by mtk-mmsys instead of a dt clock node: thanks to this, it was > > finally possible to convert almost all clock drivers to the common probe > > mechanism, which *finally again* makes us able to build all these drivers > > as modules! > > > > Since this looked like being *the* way forward, I went on converting some > > more drivers away from OF_CLK_DECLARE_DRIVER to full platform_driver(s), > > allowing for more (actually, almost all!) drivers to be built as modules. > > > > While at it, I also added some more consistency in macros usage by > > removing all of the duplicated full macro declaration for MediaTek gate > > clocks and replacing all of those with using the GATE_MTK macro instead, > > producing a nice reduction in amount of lines per file but, more > > importantly, improving readability and eventual future batch changes. > > > > This amount of commonization will also, in my opinion, greatly improve > > the review process for new clock drivers, as they will be mostly just a > > list of clocks and won't contain much new code, as it's all going to be > > handled in the common places, which also reduces chances to see new clock > > driver related bugs emerging on one SoC or the other. > > > > Since I don't own devices with all of the supported MediaTek SoCs, I > > could not test some of the conversions on real hardware... but I am > > confident that this will work as the drivers are *very* similar on a > > per-generation basis. > > > > This series was build-tested for all (both module and built-in build) > > and was manually tested on MT6795, MT8173, MT8192, MT8195. > > > > Applied the whole series to clk-next. Hadn't gotten around to retesting this. FWIW, Tested-by: Chen-Yu Tsai <wenst@chromium.org> on MT8183, MT8186, MT8192, MT8195