[PATCH v3 1/2] regulator: mt6360: Add support for MT6360 regulator

Mark Brown broonie at kernel.org
Thu Aug 20 07:45:24 EDT 2020


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20200820/7a256645/attachment.sig>


More information about the Linux-mediatek mailing list