as3525v2: no need to set PMU_GATE bit (bit 3) in PMU_enable register when reading

It's only needed when we'll write to the selected register

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26309 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-05-26 11:14:13 +00:00
parent 1c967b788e
commit 55d60d4e76

View file

@ -131,7 +131,7 @@ static inline int ascodec_read_pmu(unsigned int index, unsigned int subreg)
/* we disable interrupts to make sure no operation happen on the i2c bus /* we disable interrupts to make sure no operation happen on the i2c bus
* between selecting the sub register and reading it */ * between selecting the sub register and reading it */
int oldstatus = disable_irq_save(); int oldstatus = disable_irq_save();
ascodec_write(AS3543_PMU_ENABLE, 8|subreg); ascodec_write(AS3543_PMU_ENABLE, subreg);
int ret = ascodec_read(index); int ret = ascodec_read(index);
restore_irq(oldstatus); restore_irq(oldstatus);
return ret; return ret;