lkml.org 
[lkml]   [2020]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/2] regulator: mt6360: Add support for MT6360 regulator
Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
>
> On Thu, Aug 20, 2020 at 03:53:41PM +0800, Gene Chen wrote:
>
> > + mrd->regmap = dev_get_regmap(pdev->dev.parent, NULL);
> > + if (!mrd->regmap) {
> > + dev_err(&pdev->dev, "Failed to get parent regmap\n");
> > + return -ENODEV;
> > + }
>
> > +static const struct of_device_id __maybe_unused mt6360_regulator_of_id[] = {
> > + { .compatible = "mediatek,mt6360-regulator", },
> > + {},
> > +};
> > +MODULE_DEVICE_TABLE(of, mt6360_regulator_of_id);
>
> This device only exists in the context of a single parent device, there
> should be no need for a compatible string here - this is just a detail
> of how Linux does things. The MFD should just instntiate the platform
> device.

Trying to autoload module without of_id_table will cause run-time error:
ueventd: LoadWithAliases was unable to load
of:NregulatorT(null)Cmediatek,mt6360-regulator

https://lore.kernel.org/patchwork/patch/726691/
According to this patch, autoload can't load module which doesn't
include add id_table or of_id_table in module.alias
So I need keep of_if_table for auto load success

\
 
 \ /
  Last update: 2020-08-24 12:24    [W:0.099 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site