gpiolib.c (a067419ba77da830939852758702388f0fba09a1) | gpiolib.c (9ce4ed5b4db13633f9934a4eac02c4cde04d5c63) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2 3#include <linux/acpi.h> 4#include <linux/bitmap.h> 5#include <linux/compat.h> 6#include <linux/debugfs.h> 7#include <linux/device.h> 8#include <linux/err.h> --- 2164 unchanged lines hidden (view full) --- 2173#endif 2174#ifdef CONFIG_GPIO_CDEV 2175 WRITE_ONCE(desc->debounce_period_us, 0); 2176#endif 2177 ret = true; 2178 } 2179 2180 spin_unlock_irqrestore(&gpio_lock, flags); | 1// SPDX-License-Identifier: GPL-2.0 2 3#include <linux/acpi.h> 4#include <linux/bitmap.h> 5#include <linux/compat.h> 6#include <linux/debugfs.h> 7#include <linux/device.h> 8#include <linux/err.h> --- 2164 unchanged lines hidden (view full) --- 2173#endif 2174#ifdef CONFIG_GPIO_CDEV 2175 WRITE_ONCE(desc->debounce_period_us, 0); 2176#endif 2177 ret = true; 2178 } 2179 2180 spin_unlock_irqrestore(&gpio_lock, flags); |
2181 blocking_notifier_call_chain(&desc->gdev->line_state_notifier, 2182 GPIOLINE_CHANGED_RELEASED, desc); | 2181 gpiod_line_state_notify(desc, GPIOLINE_CHANGED_RELEASED); |
2183 2184 return ret; 2185} 2186 2187void gpiod_free(struct gpio_desc *desc) 2188{ 2189 if (desc && desc->gdev && gpiod_free_commit(desc)) { 2190 module_put(desc->gdev->owner); --- 1545 unchanged lines hidden (view full) --- 3736 if (!desc_array) 3737 return -EINVAL; 3738 return gpiod_set_array_value_complex(false, true, array_size, 3739 desc_array, array_info, 3740 value_bitmap); 3741} 3742EXPORT_SYMBOL_GPL(gpiod_set_array_value_cansleep); 3743 | 2182 2183 return ret; 2184} 2185 2186void gpiod_free(struct gpio_desc *desc) 2187{ 2188 if (desc && desc->gdev && gpiod_free_commit(desc)) { 2189 module_put(desc->gdev->owner); --- 1545 unchanged lines hidden (view full) --- 3735 if (!desc_array) 3736 return -EINVAL; 3737 return gpiod_set_array_value_complex(false, true, array_size, 3738 desc_array, array_info, 3739 value_bitmap); 3740} 3741EXPORT_SYMBOL_GPL(gpiod_set_array_value_cansleep); 3742 |
3743void gpiod_line_state_notify(struct gpio_desc *desc, unsigned long action) 3744{ 3745 blocking_notifier_call_chain(&desc->gdev->line_state_notifier, 3746 action, desc); 3747} 3748 |
|
3744/** 3745 * gpiod_add_lookup_table() - register GPIO device consumers 3746 * @table: table of consumers to register 3747 */ 3748void gpiod_add_lookup_table(struct gpiod_lookup_table *table) 3749{ 3750 gpiod_add_lookup_tables(&table, 1); 3751} --- 251 unchanged lines hidden (view full) --- 4003 4004 ret = gpiod_configure_flags(desc, con_id, lookupflags, flags); 4005 if (ret < 0) { 4006 dev_dbg(consumer, "setup of GPIO %s failed\n", con_id); 4007 gpiod_put(desc); 4008 return ERR_PTR(ret); 4009 } 4010 | 3749/** 3750 * gpiod_add_lookup_table() - register GPIO device consumers 3751 * @table: table of consumers to register 3752 */ 3753void gpiod_add_lookup_table(struct gpiod_lookup_table *table) 3754{ 3755 gpiod_add_lookup_tables(&table, 1); 3756} --- 251 unchanged lines hidden (view full) --- 4008 4009 ret = gpiod_configure_flags(desc, con_id, lookupflags, flags); 4010 if (ret < 0) { 4011 dev_dbg(consumer, "setup of GPIO %s failed\n", con_id); 4012 gpiod_put(desc); 4013 return ERR_PTR(ret); 4014 } 4015 |
4011 blocking_notifier_call_chain(&desc->gdev->line_state_notifier, 4012 GPIOLINE_CHANGED_REQUESTED, desc); | 4016 gpiod_line_state_notify(desc, GPIOLINE_CHANGED_REQUESTED); |
4013 4014 return desc; 4015} 4016 4017/** 4018 * fwnode_gpiod_get_index - obtain a GPIO from firmware node 4019 * @fwnode: handle of the firmware node 4020 * @con_id: function within the GPIO consumer --- 630 unchanged lines hidden --- | 4017 4018 return desc; 4019} 4020 4021/** 4022 * fwnode_gpiod_get_index - obtain a GPIO from firmware node 4023 * @fwnode: handle of the firmware node 4024 * @con_id: function within the GPIO consumer --- 630 unchanged lines hidden --- |