[alsa-devel] [PATCH] ASoC: SDP3430: Add support for EXTMUTE using TWL GPIO6

Candelaria Villareal, Jorge x0107209 at ti.com
Thu Aug 6 17:20:06 CEST 2009


> On Wednesday 15 July 2009 04:04:08 ext Candelaria Villareal, 
> Jorge wrote:
> > Board sdp3430 has hardware support for EXTMUTE using TWL4030 GPIO6
> > line, controlled by register INTBR_PMBR1. Machine driver takes care
> > of enabling gpio line through i2c and codec driver manipulates the
> > line during headset ramp up/down sequence.
> >
> > +#define TWL4030_INTBR_PMBR1	0x0D
> > +#define EXTMUTE(value)		(value << 2)
> 
> This is confusing, should it be something like this?:
> #define GPIO6_PWM0_MUX(value)		(value << 2)
> 
> > +	/* Set TWL4030 GPIO6 as EXTMUTE signal */
> > +	twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
> > +							
> TWL4030_MODULE_INTBR);
> 
> I think you meant this:
> twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
> 							
> TWL4030_INTBR_PMBR1);

You are right, I don't know how I missed that. I will change that.

> 
> Furthermore, since you are modifying pin muxing register, I 
> think it is safer 
> to do something like this here to avoid changing other pin's function:
> 
> u8 pin_mux;
> 
> twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
> 							
> TWL4030_INTBR_PMBR1);
> pin_mux &= ~GPIO6_PWM0_MUX(0x3);
> pin_mux |= GPIO6_PWM0_MUX(0x2);
> twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
> 							
> TWL4030_INTBR_PMBR1);

Since this patch is already on branch "for-2.6.32", should I submit a new patch for this changes?  Ir should I first revert and submit the modified patch?


More information about the Alsa-devel mailing list