[PATCH v2 2/2] mmc: mtk-sd: add support for AN7581 MMC Host
Ulf Hansson
ulf.hansson at linaro.org
Mon Jan 27 07:15:36 PST 2025
On Mon, 27 Jan 2025 at 12:41, Christian Marangi <ansuelsmth at gmail.com> wrote:
>
> On Tue, Jan 21, 2025 at 08:59:19AM +0100, Krzysztof Kozlowski wrote:
> > On Mon, Jan 20, 2025 at 07:47:02PM +0100, Christian Marangi wrote:
> > > - pinctrl_select_state(host->pinctrl, host->pins_uhs);
> > > + /* Skip setting uhs pins if not supported */
> > > + if (host->pins_uhs)
> > > + pinctrl_select_state(host->pinctrl, host->pins_uhs);
> > > } else {
> > > dev_pm_clear_wake_irq(host->dev);
> > > }
> > > @@ -2816,9 +2835,12 @@ static int msdc_of_clock_parse(struct platform_device *pdev,
> > > if (IS_ERR(host->src_clk))
> > > return PTR_ERR(host->src_clk);
> > >
> > > - host->h_clk = devm_clk_get(&pdev->dev, "hclk");
> > > - if (IS_ERR(host->h_clk))
> > > - return PTR_ERR(host->h_clk);
> > > + /* AN7581 SoC doesn't have hclk */
> > > + if (!device_is_compatible(&pdev->dev, "airoha,an7581-mmc")) {
> >
> > Please avoid coding compatible in multiple places. Not only because
> > above check is slow comparing to check on integer, but it just scales
> > poorly and leads to less readable further code. Use driver data with
> > model name or flags/quirks bitmask.
> >
>
> I implemented this in a more compatible way so we don't need an
> additional compatible anymore. Soo this series is not needed anymore.
>
> Should I flag these as not applicable anywhere in the patchwork systems?
No need to, just send new versions.
Kind regards
Uffe
More information about the Linux-mediatek
mailing list