tech-embed archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPIO abstraction [was "Re: wscons on a HD44780"]



> Jachym Holecek <freza%liberouter.org@localhost> wrote:
> 
> > > somedevice0 at gpio0 pin 10 mask 0x5
> > >
> >> It means that somedevice uses first and third pins starting from pin 10,
> >> i.e. pins 10 and 12.
> > 
> > While this may be enough in common cases, I would really prefer
> > something like:
> > 
> > somedevice0 at gpio signal1 fooio[GP0] signal2 bario[DATA3]
> > 
> > That is: 1) use descriptive signal names in config 2) be able to
> > hook one gpio consumer on multiple gpio providers. Of course, this
> > doesn't play nicely with current config scheme... but should be
> > doable.
> 
> We have config_hook(9), though it's somehat underdocumented.  Take a
> look at hpcmips configs.

Thanks for the pointer, I'm reading through it. For the record,
relevant code is also in ${sys}/dev/hpc/{hpcioman.c, files.hpcio},
config_hook(9) just does the indirect call part.

One thing I don't see (yet) -- how does hpcio deal with probe-ordering
of child devices that use more then one pin? In the example above: we
want somedevice0 to attach after fooio and bario (they should really
be fooio0 and bario0).

        Regards,
                -- Jachym Holecek



Home | Main Index | Thread Index | Old Index