Lines Matching defs:desc
95 * @desc: Array of pointers to the GPIO descriptors
96 * @size: Number of elements in desc
107 struct gpio_desc **desc;
117 #define for_each_gpio_desc(gc, desc) \
119 __i < gc->ngpio && (desc = gpiochip_get_desc(gc, __i)); \
122 #define for_each_gpio_desc_with_flag(gc, desc, flag) \
123 for_each_gpio_desc(gc, desc) \
124 if (!test_bit(flag, &desc->flags)) {} else
140 void gpiod_line_state_notify(struct gpio_desc *desc, unsigned long action);
194 #define gpiod_not_found(desc) (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)
196 int gpiod_request(struct gpio_desc *desc, const char *label);
197 void gpiod_free(struct gpio_desc *desc);
199 static inline int gpiod_request_user(struct gpio_desc *desc, const char *label)
203 ret = gpiod_request(desc, label);
218 int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
220 int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce);
221 int gpiod_hog(struct gpio_desc *desc, const char *name,
228 static inline int gpio_chip_hwgpio(const struct gpio_desc *desc)
230 return desc - &desc->gdev->descs[0];
235 #define gpiod_emerg(desc, fmt, ...) \
236 pr_emerg("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?",\
238 #define gpiod_crit(desc, fmt, ...) \
239 pr_crit("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
241 #define gpiod_err(desc, fmt, ...) \
242 pr_err("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
244 #define gpiod_warn(desc, fmt, ...) \
245 pr_warn("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
247 #define gpiod_info(desc, fmt, ...) \
248 pr_info("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
250 #define gpiod_dbg(desc, fmt, ...) \
251 pr_debug("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?",\