[alsa-devel] [PATCHv2 5/8] ASoC: SGTL5000: Enhance the SGTL5000 codec driver about regulator.
Li Xiubo
Li.Xiubo at freescale.com
Thu Nov 7 04:01:02 CET 2013
> > The SGTL5000 is based on regulators and when it is disabled, there
> > will be an error returns directly while the SGTL5000 codec is probing.
>
> What makes you say this?
>
>From the code:
File path: "sound/soc/codecs/sgtl5000.c"
==================
#ifdef CONFIG_REGULATOR
.....
#else
static int ldo_regulator_register(struct snd_soc_codec *codec,
struct regulator_init_data *init_data,
int voltage)
{
dev_err(codec->dev, "this setup needs regulator support in the kernel\n");
return -EINVAL;
}
static int ldo_regulator_remove(struct snd_soc_codec *codec)
{
return 0;
}
#endif
-------------------
sgtl5000_probe() -->
sgtl5000_enable_regulators() -->
sgtl5000_replace_vddd_with_ldo() -->
ldo_regulator_register().
> That's not how the regulator API works. Have
> you actually seen any problems?
There are some regulator APIs implemented by SGTL5000 driver, not the regulator subsystem APIs.
More information about the Alsa-devel
mailing list