Re: [PATCH v3 4/7] ASoC: codecs: Add RK3308 internal audio codec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello Philipp,

On Wed, 21 Feb 2024 14:21:23 +0100
Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> wrote:

> On Mi, 2024-02-21 at 11:22 +0100, Luca Ceresoli wrote:
> > Add driver for the internal audio codec of the Rockchip RK3308 SoC.
> > 
> > Initially based on the vendor kernel driver [0], with lots of cleanups,
> > fixes, improvements, conversion to DAPM and removal of some features.
> > 
> > [0] https://github.com/rockchip-linux/kernel/blob/develop-4.19/sound/soc/codecs/rk3308_codec.c
> > 
> > Signed-off-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
> >  
> [...]
> > diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c
> > new file mode 100644
> > index 000000000000..61bfb75f92a3
> > --- /dev/null
> > +++ b/sound/soc/codecs/rk3308_codec.c
> > @@ -0,0 +1,993 @@  
> [...]
> > +static int rk3308_codec_platform_probe(struct platform_device *pdev)
> > +{  
> [...]
> > +	rk3308->reset = devm_reset_control_get(&pdev->dev, "codec");
> > +	if (IS_ERR(rk3308->reset)) {
> > +		err = PTR_ERR(rk3308->reset);
> > +		if (err != -ENOENT)
> > +			return err;
> > +
> > +		dev_dbg(&pdev->dev, "No reset control found\n");
> > +		rk3308->reset = NULL;
> > +	}  
> 
> Please use devm_reset_control_get_optional_exclusive(). That already
> returns NULL instead of -ENOENT if the reset control is not specified
> in the device tree. Then dev_err_probe() can be used to report errors.

Good point, thanks. Queued for v4.

Best regards,
Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux