27 Jun
2009
27 Jun
'09
12:02 a.m.
In order to use the TWL GPIO6 for extmute, the PMBR1:GPIO6_PWM0_MUTE should be set to 0x2 initially in TWL, but this is not the job of the codec driver (it is platform specific how this pin is used).
You mention this is platform specific, but shouldn't twl4030 registers be accesed only by twl4030 drivers?
What if codec driver sets the register only when instructed by the machine driver. Something like:
if (setup->hs_extmute && !(setup->set_hs_extmute)) twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, 0x02 << 2, TWL4030_REG_PMBR1);
But it still looks like it should'nt be in the codec driver. Any idea on how to do this?