Lines Matching defs:gpio

13 #include <linux/gpio.h>
17 #include <linux/gpio/driver.h>
18 #include <linux/gpio/machine.h>
23 #include <uapi/linux/gpio.h>
32 #include <trace/events/gpio.h>
59 .name = "gpio",
98 * @gpio: global GPIO number
104 struct gpio_desc *gpio_to_desc(unsigned gpio)
112 if (gdev->base <= gpio &&
113 gdev->base + gdev->ngpio > gpio) {
115 return &gdev->descs[gpio - gdev->base];
121 if (!gpio_is_valid(gpio))
122 WARN(1, "invalid GPIO %d\n", gpio);
344 struct gpio_desc *gpio;
346 gpio = gpio_name_to_desc(gc->names[i]);
347 if (gpio)
364 * Looks for device property "gpio-line-names" and if it exists assigns
377 count = fwnode_property_string_array_count(fwnode, "gpio-line-names");
382 dev_warn(&gdev->dev, "gpio-line-names is length %d but should be at most length %d",
391 ret = fwnode_property_read_string_array(fwnode, "gpio-line-names",
562 "Failed to initialize gpio device (%d)\n", ret);
748 * /sys/bus/gpio/devices/gpiochipN/dev that can be used for
1832 * gpiochip_generic_request() - request the gpio function for a pin
1848 * gpiochip_generic_free() - free the gpio function from a pin
1849 * @gc: the gpiochip to request the gpio function for
1887 * Documentation/devicetree/bindings/gpio/gpio.txt on how to
1888 * bind pinctrl and gpio drivers via the "gpio-ranges" property.
1945 * Documentation/devicetree/bindings/gpio/gpio.txt on how to
1946 * bind pinctrl and gpio drivers via the "gpio-ranges" property.
2578 int gpio;
2595 gpio = gpio_chip_hwgpio(desc);
2596 rc = gpio_do_set_config(gc, gpio, packed);
2599 gpio);
2609 * @desc: the gpio descriptor to test
2622 * @desc: the gpio descriptor to change
2645 * a direction setting call. Marking a gpio as requested locks its chip
2789 * gpiod_get_raw_value() - return a gpio's raw value
2790 * @desc: gpio whose value will be returned
2808 * gpiod_get_value() - return a gpio's value
2809 * @desc: gpio whose value will be returned
2890 * gpio_set_open_drain_value_commit() - Set the open drain gpio's value.
2891 * @desc: gpio descriptor whose state need to be set.
2915 * _gpio_set_open_source_value() - Set the open source gpio's value.
2916 * @desc: gpio descriptor whose state need to be set.
3073 * gpiod_set_raw_value() - assign a gpio's raw value
3074 * @desc: gpio whose value will be assigned
3114 * gpiod_set_value() - assign a gpio's value
3115 * @desc: gpio whose value will be assigned
3185 * gpiod_cansleep() - report whether gpio value access may sleep
3186 * @desc: gpio to check
3198 * @desc: gpio to set the consumer name on
3219 * @desc: gpio whose IRQ will be returned (already requested)
3429 * gpiod_get_raw_value_cansleep() - return a gpio's raw value
3430 * @desc: gpio whose value will be returned
3446 * gpiod_get_value_cansleep() - return a gpio's value
3447 * @desc: gpio whose value will be returned
3525 * gpiod_set_raw_value_cansleep() - assign a gpio's raw value
3526 * @desc: gpio whose value will be assigned
3543 * gpiod_set_value_cansleep() - assign a gpio's value
3544 * @desc: gpio whose value will be assigned
3658 * @hogs: table of gpio hog entries with a zeroed sentinel at the end
3909 * @desc: gpio whose value will be assigned
4163 * @desc: gpio whose value will be assigned
4164 * @name: gpio line name
4201 * gpiochip_free_hogs - Scan gpio-controller chip and release GPIO hog
4202 * @gc: gpio chip to act on
4427 unsigned gpio = gdev->base;
4433 for (i = 0; i < gdev->ngpio; i++, gpio++, gdesc++) {
4436 seq_printf(s, " gpio-%-3d (%-20.20s)\n",
4437 gpio, gdesc->name);
4446 seq_printf(s, " gpio-%-3d (%-20.20s|%-20.20s) %s %s %s%s",
4447 gpio, gdesc->name ? gdesc->name : "", gdesc->label,
4542 /* /sys/kernel/debug/gpio */
4543 debugfs_create_file("gpio", 0444, NULL, NULL, &gpiolib_fops);