However, I would like to "take over" the "sound card" for some custom hardware.
Unfortunately, if I comment out the line that creates the sound card in igep0020.c
// ret = platform_device_add(igep2_snd_device);
in igep2_soc_init, UART2 stops working (I can open the device /dev/ttyO1, but pause forever when reading) under exactly the same circumstances as before.
Can anyone explain why or how the operation of UART2 depends on the existence of the igep sound card?
Accepted Answerpau pajueloOffline
Accepted Answer0Just to add the solution here for future reference.
If you do not instantiate the "sound card" in igep0020.c, then the call path of
twl4030_soc_probe -> twl4030_init_chip -> twl4030_reset_registers (all found in sound/soc/codecs/twl4030.c)
never gets called and the TPS65950 never gets turned off. (The value to go in the register (twl4030_reg) is set appropriately as
0x04, /* REG_VOICE_IF (0xF) */
but the value is never actually written to the register.)
With the TPS65950 active, pins 4, 6 and 8 are pulled down, preventing GPIO 140 and UART2 from functioning.