[PATCH v2 1/5] ASoC: add mt6351 codec driver

Mark Brown broonie at kernel.org
Thu Apr 19 07:41:39 PDT 2018


On Thu, Apr 19, 2018 at 09:58:17AM +0800, KaiChieh Chuang wrote:
> On Wed, 2018-04-18 at 17:40 +0100, Mark Brown wrote:

> > > +	priv->regmap = dev_get_regmap(pdev->dev.parent, NULL);
> > > +	if (IS_ERR(priv->regmap))
> > > +		return PTR_ERR(priv->regmap);

> > This should be the default behaviour so I'm guessing you don't need the
> > callback?

> the regmap is obtain from parent dev, i assume i can use
> snd_soc_component_init_regmap() as alternative for
> get_regmap().callback?

Yes, though you shouldn't even need to do that - the core should just
try using the parent regmap if none is provided.
-------------- 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/20180419/cf300bb3/attachment.sig>


More information about the Linux-mediatek mailing list