gpiolib: gpio naming in sysfs
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 24 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | device class: add symlink creation helpersdrivers/ include/ | +25 | 1 reply | |
| 2/3 | gpiolib: add support for having symlinks under gpio class directorydrivers/ | +90 | 8 replies | |
| 3/3 | gpiolib: use chip->names for symlinks, always use gpioN for device namesdrivers/ | +5 | 22 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] gpiolib: gpio naming in sysfs
Hi David and Greg -
There's been debate in the past about naming gpios exported to the sysfs. Long story short, there are users for that, and there are now two ways of naming gpios in the sysfs: char **names in struct gpio_chip [1], and gpio_export_link() [2].
This patchset combines these two by allowing gpio_export_link() to have dev == NULL to make the link under gpiolib sysfs (instead of arbitrary device), and to use gpio_chip names to create links (instead of naming the actual devices with those). This gpio_export_link() with dev == NULL would also be useful for gpios not associated with a driver.
Greg, patch 1/3 introduces class_{create,remove}_link(), is that acceptable?
CC Daniel, you introduced names in struct gpio_chip in the first place, does this (especially patch 3/3) look acceptable to you?
BR,
Jani.
[1] commit 926b663ce8215ba448960e1ff6e58b67a2c3b99b
[2] commit a4177ee7f1a83eecb1d75e85d32664b023ef65e9
Artem Bityutskiy (1):
device class: add symlink creation helpers
Jani Nikula (2):
gpiolib: add support for having symlinks under gpio class directory
gpiolib: use chip->names for symlinks, always use gpioN for device
names
drivers/base/class.c | 21 ++++++++++ drivers/gpio/gpiolib.c | 101 +++++++++++++++++++++++++++++++++++++++++++++--- include/linux/device.h | 4 ++ 3 files changed, 120 insertions(+), 6 deletions(-)