On 9/14/14, 1:55 AM, "David Goodenough" <[email protected]> wrote:
>On Saturday 13 September 2014 13:51:17 John Syn wrote: >> From: <[email protected]> >> Reply-To: "[email protected]" <[email protected]> >> Date: Friday, September 12, 2014 at 3:50 AM >> To: "[email protected]" <[email protected]> >> Subject: [beagleboard] How to change GPIO Mode >> >> > Hey Forum >> > I hope you can help me. I'm on a education project and I have some >> > questions. >> > >> > I have a problem with the config of the GPIO (I2C-HW-Controller) >> > >> > I have two diffrent usecases in my project. >> > 1. I2C HW-Controller #1 is a master >> > 2. I2C HW-Controller #1 is a slave >> > So I have to change the I2C-controller config between the master and >>the >> > slave mode. >> > If it is possible, I should do that while the BBB and his phyton/c++ >> > program is running. >> > >> > Now here are my questions: >> > * How can I switch between I2C master and slave mode? (Device tree?) >> > * >> > * Can I do that while the BBB is running? (Or is a reboot of BBB >> > necessary?) If its possible give my a nice explanation and not only a >> > code piece. ;-) I have to learn & understand how all that stuff works. >> >> Linux does not support slave mode for either I2C or SPI. Even though >>the BBB >> hardware can support SCL being generated on another device, the Linux >>I2C >> driver does not support this. Either you have to create your own I2C >>slave >> driver or you can do this with the PRU. >Currently that is true, but I noticed some code being proposed on one of >the >kernel lists to enable this. So shortly (i.e a kernel release or two) it >will >be possible - assuming the code gets accepted. You are correct, but I only see work being done on the I2C slave framework: https://lkml.org/lkml/2014/9/12/125 I don¹t see any work being done on a SPI slave framework. > >On the subject of the PRU and its use of I2C, is there any sample code >around >that shows this being done? The only reference I¹ve seen is a bit banger driver using the PRU: https://github.com/mcdonamp/RH_ROBO_Quadcopter/tree/master/code/i2c_bitbang /pru_sw Regards, John > >David >> >> Regards, >> John >> >> > Thanks a lot > >-- >For more options, visit http://beagleboard.org/discuss >--- >You received this message because you are subscribed to the Google Groups >"BeagleBoard" group. >To unsubscribe from this group and stop receiving emails from it, send an >email to [email protected]. >For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
