19 Apr
2018
19 Apr
'18
4:41 p.m.
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.