Hi, I am trying to make headset detection work.
Previously there was a ts3a225 (like omap5 evm) with a driver hacked by me:
http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/work/hn...
It is simply polling the device for changes and printing some messages. No other integration into the sound system exists.
Now, the Pyra mass production shall use the ts3a227e because it is newer, better and has an in-kernel driver:
http://lxr.free-electrons.com/source/sound/soc/codecs/ts3a227e.c
What differs is that it is interrupt driven. So we need to set up the interrupts for this chip.
I have one prototype mainboard with ts3a227e hooked up so that it can send an interrupt through the tca6424 gpio expander (like on the EVM).
I think I finally managed to make the tca6424 (4-0022) driver handle interrupts (it is a little crazy chip). There was also some wrong pinmux in the DT which made the kernel block after some interrupts being processed.
What I have not yet seen are ts3a227e interrupts... And I am not exactly sure if they are correctly enabled because /proc/interrupts lists it but with count 0.
178: 0 0 4805b000.gpio 15 Edge RIGHT 195: 23057 0 WUGEN 34 Level 4805d000.gpio 197: 23057 0 4805d000.gpio 1 Level 4-0022 210: 0 0 4805d000.gpio 14 Level TS3A227E 215: 0 0 4805d000.gpio 19 Edge Right-Shoulder-Top
But for the ts3a227e there is also one missing piece in code/DT.
The driver defines a function ts3a227e_enable_jack_detect which is assumed to be called from some sound-boardfile.
But we have none with omap5 and DT. Or do we have?
Here is where this function is defined and used by
sound/soc/intel/boards/cht_bsw_max98090_ti.c and sound/soc/rockchip/rockchip_max98090.c
See: http://lxr.free-electrons.com/ident?i=ts3a227e_enable_jack_detect
So if someone with much better knowledge about the kernel sound system (which is easy since I have almost none), could help to make this fixed, please raise your hands.
BR and thanks, Nikolaus