Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with gpiochip0 and gpiochip100 folders #17

Open
flongo82 opened this issue May 5, 2017 · 1 comment
Open

Dealing with gpiochip0 and gpiochip100 folders #17

flongo82 opened this issue May 5, 2017 · 1 comment

Comments

@flongo82
Copy link
Owner

flongo82 commented May 5, 2017

We need to check what is the purpose of these folders and if it is necessary for us to always mirror them or if we can filter them.

@maratstepanov
Copy link

Here: https://www.kernel.org/doc/Documentation/gpio/sysfs.txt

GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the
controller implementing GPIOs starting at #42) and have the following
read-only attributes:

/sys/class/gpio/gpiochipN/

	"base" ... same as N, the first GPIO managed by this chip

	"label" ... provided for diagnostics (not always unique)

    "ngpio" ... how many GPIOs this manages (N to N + ngpio - 1)

Board documentation should in most cases cover what GPIOs are used for
what purposes. However, those numbers are not always stable; GPIOs on
a daughtercard might be different depending on the base board being used,
or other cards in the stack. In such cases, you may need to use the
gpiochip nodes (possibly in conjunction with schematics) to determine
the correct GPIO number to use for a given signal.

It seems that in case if we virtualize GPIO, we should provide virtual gpiochipX folder - not just mirror physical one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants