From: Katu T. <kat...@gm...> - 2013-06-21 16:26:06
|
Hi, I hope the nice people on the list can help me again this time. I have to use the i2c bus 3 to control a sound amplifier (tpa6130a2). I have an evaluation board that I will connect to the pins 23 and 24 of a Tobi board. I want to make a program that changes the volume, for example. I've read this https://github.com/scottellis/overo-mcp23017 and I tried to do the same with this driver for the tpa6130a2 http://lxr.free-electrons.com/source/sound/soc/codecs/tpa6130a2.c?a=arm but I think that I'm mixing concepts here. Is that driver of any use for me? how can I register my amplifier as slave and use the function in there from the Overo userland? Thanks a lot for your time, all this is very interesting but completely new to me. Katu |
From: Andy W. <an...@si...> - 2013-06-21 20:14:15
|
IIRC, to drive an i2c device from userspace you need: 1. A driver in the linux kernel to create and drive the i2c_adapter (for i2c-dev to control) 2. The i2c-dev linux kernel module loaded or built-in (for a userspace i2c interface to devices) 3. No kernel driver loaded that invokes the linux kernel slave/i2c_client driver for the device, and hence it is not bound to the adapter (so that the i2c address on the adapter remains unclaimed within the kernel so i2c-dev can manipulate it). 4. A userspace program that opens up an i2c-dev device node and twiddles the device. 5. (Optional) The i2cdetect utility from the i2ctools package for enumeration, diagnosis, and debugging purposes. Regards, Andy On Fri, 2013-06-21 at 17:25 +0100, Katu Txakur wrote: > Hi, > > > I hope the nice people on the list can help me again this time. I have > to use the i2c bus 3 to control a sound amplifier (tpa6130a2). I have > an evaluation board that I will connect to the pins 23 and 24 of a > Tobi board. I want to make a program that changes the volume, for > example. > I've read this https://github.com/scottellis/overo-mcp23017 and I > tried to do the same with this driver for the > tpa6130a2 http://lxr.free-electrons.com/source/sound/soc/codecs/tpa6130a2.c?a=arm but I think that I'm mixing concepts here. Is that driver of any use for me? how can I register my amplifier as slave and use the function in there from the Overo userland? > > > Thanks a lot for your time, all this is very interesting but > completely new to me. > Katu > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ gumstix-users mailing list gum...@li... https://lists.sourceforge.net/lists/listinfo/gumstix-users |