Hello everyone,
I'm currently working on a wandbord dl and i'm trying to use the audio codec SGTL5000 for some applications.
I'm looking for a way to modify the SGTL5000 registers from user side and didn't modify the driver sgtl5000.c
Is it possible to have access to the registers by using some structure defined in the driver sgtl5000.c in user or the only way is via i2c control?
i tried with i2c but i have some issues :
I can make a dump and read the registers with a dump like it's explained in this topic :
Can you get a dump of the SGTL5000 codec registers?
|
| root@freescale /$ cat /sys/kernel/debug/regmap/1-000a/registers | |
| 000: a011 | |
| 002: 0060 | |
| 004: 0008 |
i can find my i2c devices by using the package i2c-tools:
root@debian-armhf:/# i2cdetect -l
i2c-0 i2c 21a0000.i2c I2C adapter
i2c-1 i2c 21a4000.i2c I2C adapter
sgtl5000 is present at the address x0a :
root@debian-armhf:/# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
But when i read and tried to set some values i always have zero :
root@debian-armhf:/# i2cdump -f -y -r 0-0xff 1 0x0a
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
does anyone know why I do not ais access to these registers by i2c?
and what is the best way to change them?
Thanks a lot,
Alex