mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
Add local gpio control
This driver permits controlling local (on the system) gpios by using the libgpiod library. Support for gpiod v1 and v2 is added, and parses the options via the yaml parser. This can be tested with the gpio-sim module: https://docs.kernel.org/admin-guide/gpio/gpio-sim.html Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
This commit is contained in:
@@ -129,6 +129,13 @@ static void parse_board(struct device_parser *dp)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(key, "local_gpio")) {
|
||||
dev->control_options = local_gpio_ops.parse_options(dp);
|
||||
if (dev->control_options)
|
||||
set_control_ops(dev, &local_gpio_ops);
|
||||
continue;
|
||||
}
|
||||
|
||||
device_parser_expect(dp, YAML_SCALAR_EVENT, value, TOKEN_LENGTH);
|
||||
|
||||
if (!strcmp(key, "board")) {
|
||||
|
||||
Reference in New Issue
Block a user