On 15/02/2024 18:46, Yang Xiwen via B4 Relay wrote: > From: Yang Xiwen <forbidden405@xxxxxxxxxxx> > > Add support for Hi3798MV200 specific extension. > > Signed-off-by: Yang Xiwen <forbidden405@xxxxxxxxxxx> > + > +static int dw_mci_hi3798mv200_init(struct dw_mci *host) > +{ > + struct dw_mci_hi3798mv200_priv *priv; > + struct device_node *np = host->dev->of_node; > + > + priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + mmc_of_parse_clk_phase(host->dev, &priv->phase_map); > + > + priv->sample_clk = devm_clk_get_enabled(host->dev, "ciu-sample"); > + if (IS_ERR(priv->sample_clk)) { > + dev_err(host->dev, "failed to get enabled ciu-sample clock\n"); syntax is: return dev_err_probe() > + return PTR_ERR(priv->sample_clk); > + } > + > + priv->drive_clk = devm_clk_get_enabled(host->dev, "ciu-drive"); > + if (IS_ERR(priv->drive_clk)) { > + dev_err(host->dev, "failed to get enabled ciu-drive clock\n"); syntax is: return dev_err_probe() > + return PTR_ERR(priv->drive_clk); > + } > + > + priv->sap_dll_reg = syscon_regmap_lookup_by_phandle(np, "hisilicon,sap-dll-reg"); > + if (IS_ERR(priv->sap_dll_reg)) { > + dev_err(host->dev, "failed to get sap-dll-reg\n"); syntax is: return dev_err_probe() > + return PTR_ERR(priv->sap_dll_reg); > + } > + > + host->priv = priv; > + return 0; > +} > + .... > + > +MODULE_DEVICE_TABLE(of, dw_mci_hi3798mv200_match); > +static struct platform_driver dw_mci_hi3798mv200_driver = { > + .probe = dw_mci_hi3798mv200_probe, > + .remove_new = dw_mci_hi3798mv200_remove, > + .driver = { > + .name = "dwmmc_hi3798mv200", > + .probe_type = PROBE_PREFER_ASYNCHRONOUS, > + .of_match_table = dw_mci_hi3798mv200_match, > + }, > +}; > +module_platform_driver(dw_mci_hi3798mv200_driver); > + > +MODULE_DESCRIPTION("HiSilicon Hi3798MV200 Specific DW-MSHC Driver Extension"); > +MODULE_LICENSE("GPL"); > +MODULE_ALIAS("platform:dwmmc_hi3798mv200"); You should not need MODULE_ALIAS() in normal cases. If you need it, usually it means your device ID table is wrong (e.g. misses either entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute for incomplete ID table. > Best regards, Krzysztof