Private
Public Access
2
0

gpio: chardev: Add function to retrieve sysfs base for a gpiochip

This allows to full mux structures which still need the sysfs GPIO
numbers. In combination with mraa_find_gpio_line_by_name, this allows
for platform setup that is independent of the gpiochip probing order.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka
2021-01-18 07:05:19 +01:00
committed by Tom Ingleby
parent 56a11363de
commit 0c44a7291b
2 changed files with 38 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ mraa_gpiod_chip_info* mraa_get_chip_info_by_path(const char* path);
mraa_gpiod_chip_info* mraa_get_chip_info_by_name(const char* name);
mraa_gpiod_chip_info* mraa_get_chip_info_by_label(const char* label);
mraa_gpiod_chip_info* mraa_get_chip_info_by_number(unsigned number);
int mraa_get_chip_base_by_number(unsigned number);
mraa_gpiod_line_info* mraa_get_line_info_from_descriptor(int chip_fd, unsigned line_number);
mraa_gpiod_line_info* mraa_get_line_info_by_chip_number(unsigned chip_number, unsigned line_number);