On Fri, Mar 06, 2015 at 03:14:16PM -0700, Eric Nelson wrote:
On 03/06/2015 01:12 PM, Mark Brown wrote:
Two big problems here. One is that this appears to also affect LINREG_CTRL which your changelog didn't mention.
It did mention the change:
Initialize CHIP_ANA_POWER to match power on defaults, which disables ADC, DAC, and charge pumps.
In the process, remove references to the following register/bitfields from the sgttl5000_set_power_regs routine:
That's burying the lead a bit - that just looked like a list of bitfields within the register (hardware designers often call ndividual bitfields registers).
The CHIP_LINREG_CTRL value needs to be set based on the presence or absence of external VDDD, so writing a default (power-on) value doesn't help much, and this certainly shouldn't happen after the proper value is written.
This indicates that there is a greater confusion in the code which should be fixed, this sounds more like a patch of some kind at this point. At the very least this needs to be renamed, or there needs to be handling in the sync code for the more sensitive registers.
My understanding was that this was being done to regain control of the chip after driver start because there's no reset feature in the chip. That's a reasonable thing to want to do but apparently the current code isn't very well thought out.