Lines Matching defs:gpio

24 #include <linux/gpio.h>
25 #include <linux/gpio/driver.h>
26 #include <linux/gpio/machine.h>
28 #include <uapi/linux/gpio.h>
38 #include <trace/events/gpio.h>
79 .name = "gpio",
119 * @gpio: global GPIO number
125 struct gpio_desc *gpio_to_desc(unsigned gpio)
133 if (gdev->base <= gpio &&
134 gdev->base + gdev->ngpio > gpio) {
136 return &gdev->descs[gpio - gdev->base];
142 if (!gpio_is_valid(gpio))
143 pr_warn("invalid GPIO %d\n", gpio);
361 struct gpio_desc *gpio;
363 gpio = gpio_name_to_desc(gc->names[i]);
364 if (gpio)
381 * Looks for device property "gpio-line-names" and if it exists assigns
394 count = device_property_string_array_count(dev, "gpio-line-names");
401 * setting friendly names if the specified ones with 'gpio-line-names'
407 dev_warn(dev, "gpio-line-names too short (length %d), cannot map names for the gpiochip at offset %u\n",
416 ret = device_property_read_string_array(dev, "gpio-line-names",
430 * 'gpio-line-names' cannot contains gaps, we have to be sure
480 size = device_property_count_u32(dev, "gpio-reserved-ranges");
502 ret = device_property_read_u32_array(dev, "gpio-reserved-ranges",
554 * Device Tree platforms are supposed to use "gpio-ranges"
558 if (device_property_present(&gc->gpiodev->dev, "gpio-ranges"))
681 "Failed to initialize gpio device (%d)\n", ret);
910 * /sys/bus/gpio/devices/gpiochipN/dev that can be used for
1905 * gpiochip_generic_request() - request the gpio function for a pin
1921 * gpiochip_generic_free() - free the gpio function from a pin
1922 * @gc: the gpiochip to request the gpio function for
1960 * Documentation/devicetree/bindings/gpio/gpio.txt on how to
1961 * bind pinctrl and gpio drivers via the "gpio-ranges" property.
2018 * Documentation/devicetree/bindings/gpio/gpio.txt on how to
2019 * bind pinctrl and gpio drivers via the "gpio-ranges" property.
2387 int gpio = gpio_chip_hwgpio(desc);
2396 dev_dbg(dev, "Persistence not supported for GPIO %d\n", gpio);
2766 * @desc: the gpio descriptor to test
2779 * @desc: the gpio descriptor to change
2807 * a direction setting call. Marking a gpio as requested locks its chip
2960 * gpiod_get_raw_value() - return a gpio's raw value
2961 * @desc: gpio whose value will be returned
2979 * gpiod_get_value() - return a gpio's value
2980 * @desc: gpio whose value will be returned
3061 * gpio_set_open_drain_value_commit() - Set the open drain gpio's value.
3062 * @desc: gpio descriptor whose state need to be set.
3086 * _gpio_set_open_source_value() - Set the open source gpio's value.
3087 * @desc: gpio descriptor whose state need to be set.
3253 * gpiod_set_raw_value() - assign a gpio's raw value
3254 * @desc: gpio whose value will be assigned
3294 * gpiod_set_value() - assign a gpio's value
3295 * @desc: gpio whose value will be assigned
3365 * gpiod_cansleep() - report whether gpio value access may sleep
3366 * @desc: gpio to check
3378 * @desc: gpio to set the consumer name on
3399 * @desc: gpio whose IRQ will be returned (already requested)
3609 * gpiod_get_raw_value_cansleep() - return a gpio's raw value
3610 * @desc: gpio whose value will be returned
3626 * gpiod_get_value_cansleep() - return a gpio's value
3627 * @desc: gpio whose value will be returned
3705 * gpiod_set_raw_value_cansleep() - assign a gpio's raw value
3706 * @desc: gpio whose value will be assigned
3723 * gpiod_set_value_cansleep() - assign a gpio's value
3724 * @desc: gpio whose value will be assigned
3844 * @hogs: table of gpio hog entries with a zeroed sentinel at the end
4180 * @desc: gpio whose value will be assigned
4306 * @desc: gpio whose value will be assigned
4307 * @name: gpio line name
4344 * gpiochip_free_hogs - Scan gpio-controller chip and release GPIO hog
4345 * @gc: gpio chip to act on
4600 unsigned gpio = gdev->base;
4613 seq_printf(s, " gpio-%-3d (%-20.20s|%-20.20s) %s %s %s%s\n",
4614 gpio, desc->name ?: "", desc->label,
4620 seq_printf(s, " gpio-%-3d (%-20.20s)\n", gpio, desc->name);
4623 gpio++;
4713 /* /sys/kernel/debug/gpio */
4714 debugfs_create_file("gpio", 0444, NULL, NULL, &gpiolib_fops);