Adding more to this, for whoever reads this monologue.
When the chip is powered externally and reboot perhaps by a power cycle, writing a 0x7060 to CHIP_ANA_POWER causes the chip to not respond as the current sgtl5000.c code is written.
The kernel outputs something like this
[ 2.715498] sgtl5000 1-000a: sgtl5000 revision 0x11
[ 2.732253] sgtl5000: probe of 1-000a failed with error -5
This code fixes that problem for me, so far.
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 (ret) {
printk(KERN_WARNING "SGTL5000 probe read failed at %i\n", i);
return ret;
}
if (reg != val) {
ret = regmap_write(sgtl5000->regmap, index, val);
}
if (ret) {
printk(KERN_WARNING "SGTL5000 probe write failed %x at %i index %i @ %x\n", val, i, index, reg);
return ret;
}
}
return 0;
}
Guess this forum software doesn't have provision for code formatting.