SGTL5000 misc
Erik Friesen
friesendrywall at gmail.com
Thu Feb 4 19:08:35 PST 2016
There is another issue here, but when I have this connected to
external power, it won't start the card on every other boot.
With the code below, it seems to start every time. If I don't skip,
it dies on #8, which is the write of 0x7060 to CHIP_ANA_POWER
This embeddedarm board supposedly power cycles the regulators, don't
know if that is a factor or not. The board finishes powerup 0x4060,
but comes back on reboot at the reset value of 0x7060
static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)
{
int i, ret, val, index;
int reg;
for (i = 0; i < ARRAY_SIZE(sgtl5000_reg_defaults); i++) {
val = sgtl5000_reg_defaults[i].def;
index = sgtl5000_reg_defaults[i].reg;
ret = regmap_read(sgtl5000->regmap, index, ®);
if (reg != val) {
ret = regmap_write(sgtl5000->regmap, index, val);
} else {
printk(KERN_INFO "SGTL5000 probe skipped at %i with OE val of
%x\n", i, reg);
}
if (ret) {
printk(KERN_WARNING "SGTL5000 probe failed at %i with OE val of
%x\n", i, reg);
return ret;
}
}
return 0;
}
On Wed, Feb 3, 2016 at 5:20 PM, Fabio Estevam <festevam at gmail.com> wrote:
> On Wed, Feb 3, 2016 at 8:05 PM, Erik Friesen <friesendrywall at gmail.com> wrote:
>> Anyway, I think something like this should be added to sgtl5000.c
>
> Yes, please send a formal patch for it.
More information about the linux-arm-kernel
mailing list