How to operate the gpio

William Kennington wak at google.com
Tue Dec 11 21:07:40 AEDT 2018


I've been working on it periodically, but right now we support
converting aspeed names to offsets for the gpiochip
https://github.com/openbmc/gpioplus/blob/master/src/gpioplus/utility/aspeed.hpp

I'd like to make it so that eventually you can just pass it a string
from config files like:
aspeed at A5 or npcm at 253 and have it pick the right gpiochip and line
offset for you.
On Tue, Dec 11, 2018 at 12:58 AM Yuan, Yao <yao.yuan at hxt-semitech.com> wrote:
>
> > > And I also find a python scripts in obmc: gpioutil
> > >
> > > But it need import obmc_system_config
> > >
> > > >>> import obmc_system_config
> > >
> > > Traceback (most recent call last):
> > >
> > >   File "<stdin>", line 1, in <module>
> > >
> > > ImportError: No module named obmc_system_config
> > >
> > >
> > >
> > > Does anyone know how to install this module in obmc?
> > >
> > >
> > >
> > > Or does anyone know a better way to operate the gpio?
> >
> > gpioutil is an convenient util to operate gpio in user space.
> >
> > The "obmc_system_config" is something legacy and will be deprecated, which is
> > installed by "workbook" recipe, e.g. [Romulus workbook][1] is from skeleton's
> > Romulus.py, or a dummy python config defined by [meta-q71l][2]
>
> It seems I still can't find obmc_system_config in skeleton git tree?
> Do you know where is the code for obmc_system_config?
>
> > Optionally, you could try to remove the dependency of "obmc_system_config" in
> > gpioutil, and patches are welcome :D
> >
>
> obmc_system_config is just used for get the GPIO by name(Like Q4, F5 and so on), so it's easy to remove if we don't need get the full GPIO info by name.(such as by gpio num)
> But if we still want to get the GPIO full info by name, we may need some other mechanisms to get the GPIO by name which will replace the obmc_system_config.
>
> I'm not sure is there any mechanism in obmc now used to replace the obmc_system_config?
>
> > [1]:
> > https://github.com/openbmc/openbmc/tree/master/meta-ibm/meta-romulus/r
> > ecipes-phosphor/workbook
> > [2]:
> > https://github.com/openbmc/openbmc/tree/master/meta-quanta/meta-q71l/r
> > ecipes-phosphor/workbook


More information about the openbmc mailing list