On Thu, Jan 16, 2014 at 3:02 PM, Charles Steinkuehler <
char...@steinkuehler.net> wrote:

> Inspired by the excellent overlay created by Bas Laarhoven for the
> BeBoPr boards, I am reworking my PRU code for LinuxCNC and plan on
> creating a "universal" device tree overlay.
>
> The basic idea is to enable all of the expected useful SoC features
> (GPIO, I2C, serial ports, timers, PRU direct I/O) and have control over
> the function of each individual pin via sysfs entries.  This should
> allow things like using the Rx pin of a serial port for communications,
> and the Tx pin of the same port for GPIO.
>
> Questions:
> * Is there any fundamental reason why this seems like it won't work or
> is otherwise a bad idea?
>

The SYSFS entries for such a thing are unlikely to land upstream. I like
the idea in that it simplifies the command-line user's experience and would
save me some work in creating a subset of such a driver to toggle between
gpio-keys and PWM that I need to write for Arduino Tre (because there is no
tolerance there for fighting device tree stuff). The fact that I can't see
it being upstreamed is the only fundamental reason I can see for it being a
bad idea. If we can come up with a bit of a generic "switch function"
interface with the device tree describing the functions to be switched
between, perhaps that can be resolved. Other than that, it just sounds like
a lot of work.


>
> * Has this been done already?  It seems too useful for someone else not
> to have implemented, and I'd rather not reinvent the wheel if it's
> already out there.
>

The old way of using omapmux kinda did this in that you could enable all
the peripherals and just switch the function of the pins. I'm not aware of
other generic approaches being implemented, but suggest you take it up on
the linux-omap list and perhaps even a broader list to see if someone is
already doing something like this. Probably best to spend a bit of time
writing up an RFC, but not so much time you get frustrated when it gets
shot down or you hear someone else is working on it.


>
> --
> Charles Steinkuehler
> char...@steinkuehler.net
>
> --
> 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 beagleboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to