From mboxrd@z Thu Jan 1 00:00:00 1970 From: friesendrywall@gmail.com (Erik Friesen) Date: Thu, 4 Feb 2016 22:08:35 -0500 Subject: SGTL5000 misc In-Reply-To: References: Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 wrote: > On Wed, Feb 3, 2016 at 8:05 PM, Erik Friesen wrote: >> Anyway, I think something like this should be added to sgtl5000.c > > Yes, please send a formal patch for it.