diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2023-09-26 23:48:13 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-11-01 11:28:58 +0000 |
commit | 4a11dbf04f31c71eb458c062129e95b7aa308464 (patch) | |
tree | 38e82c600838e2d32ac66e259cfab6c27f4f1ff6 /tools/perf/scripts/python/task-analyzer.py | |
parent | f9be4d5bb62ab41723db04d7b3abed2ad6c34825 (diff) |
leds: triggers: gpio: Rewrite to use trigger-sources
By providing a GPIO line as "trigger-sources" in the FWNODE
(such as from the device tree) and combining with the
GPIO trigger, we can support a GPIO LED trigger in a natural
way from the hardware description instead of using the
custom sysfs and deprecated global GPIO numberspace.
Example:
gpio: gpio@0 {
compatible "my-gpio";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
#trigger-source-cells = <2>;
};
leds {
compatible = "gpio-leds";
led-my-gpio {
label = "device:blue:myled";
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
default-state = "off";
linux,default-trigger = "gpio";
trigger-sources = <&gpio 1 GPIO_ACTIVE_HIGH>;
};
};
Make this the norm, unmark the driver as broken.
Delete the sysfs handling of GPIOs.
Since GPIO descriptors inherently can describe inversion,
the inversion handling can just be deleted.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230926-gpio-led-trigger-dt-v2-3-e06e458b788e@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions