diff options
Diffstat (limited to 'include/linux/gpio/driver.h')
| -rw-r--r-- | include/linux/gpio/driver.h | 48 | 
1 files changed, 32 insertions, 16 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index b8fc92c177eb..c4f272af7af5 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -253,6 +253,19 @@ struct gpio_irq_chip {  	 * Store old irq_chip irq_disable callback  	 */  	void		(*irq_disable)(struct irq_data *data); +	/** +	 * @irq_unmask: +	 * +	 * Store old irq_chip irq_unmask callback +	 */ +	void		(*irq_unmask)(struct irq_data *data); + +	/** +	 * @irq_mask: +	 * +	 * Store old irq_chip irq_mask callback +	 */ +	void		(*irq_mask)(struct irq_data *data);  };  /** @@ -267,9 +280,9 @@ struct gpio_irq_chip {   * @free: optional hook for chip-specific deactivation, such as   *	disabling module power and clock; may sleep   * @get_direction: returns direction for signal "offset", 0=out, 1=in, - *	(same as GPIOF_DIR_XXX), or negative error. - *	It is recommended to always implement this function, even on - *	input-only or output-only gpio chips. + *	(same as GPIO_LINE_DIRECTION_OUT / GPIO_LINE_DIRECTION_IN), + *	or negative error. It is recommended to always implement this + *	function, even on input-only or output-only gpio chips.   * @direction_input: configures signal "offset" as input, or returns error   *	This can be omitted on input-only or output-only gpio chips.   * @direction_output: configures signal "offset" as output, or returns error @@ -349,30 +362,30 @@ struct gpio_chip {  	struct module		*owner;  	int			(*request)(struct gpio_chip *gc, -						unsigned offset); +						unsigned int offset);  	void			(*free)(struct gpio_chip *gc, -						unsigned offset); +						unsigned int offset);  	int			(*get_direction)(struct gpio_chip *gc, -						unsigned offset); +						unsigned int offset);  	int			(*direction_input)(struct gpio_chip *gc, -						unsigned offset); +						unsigned int offset);  	int			(*direction_output)(struct gpio_chip *gc, -						unsigned offset, int value); +						unsigned int offset, int value);  	int			(*get)(struct gpio_chip *gc, -						unsigned offset); +						unsigned int offset);  	int			(*get_multiple)(struct gpio_chip *gc,  						unsigned long *mask,  						unsigned long *bits);  	void			(*set)(struct gpio_chip *gc, -						unsigned offset, int value); +						unsigned int offset, int value);  	void			(*set_multiple)(struct gpio_chip *gc,  						unsigned long *mask,  						unsigned long *bits);  	int			(*set_config)(struct gpio_chip *gc, -					      unsigned offset, +					      unsigned int offset,  					      unsigned long config);  	int			(*to_irq)(struct gpio_chip *gc, -						unsigned offset); +						unsigned int offset);  	void			(*dbg_show)(struct seq_file *s,  						struct gpio_chip *gc); @@ -459,7 +472,7 @@ struct gpio_chip {  };  extern const char *gpiochip_is_requested(struct gpio_chip *gc, -			unsigned offset); +			unsigned int offset);  /* add/remove chips */  extern int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, @@ -599,6 +612,9 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gc,  bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gc,  				unsigned int offset); +int gpiochip_irqchip_add_domain(struct gpio_chip *gc, +				struct irq_domain *domain); +  #ifdef CONFIG_LOCKDEP  /* @@ -657,9 +673,9 @@ static inline int gpiochip_irqchip_add_nested(struct gpio_chip *gc,  }  #endif /* CONFIG_LOCKDEP */ -int gpiochip_generic_request(struct gpio_chip *gc, unsigned offset); -void gpiochip_generic_free(struct gpio_chip *gc, unsigned offset); -int gpiochip_generic_config(struct gpio_chip *gc, unsigned offset, +int gpiochip_generic_request(struct gpio_chip *gc, unsigned int offset); +void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset); +int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset,  			    unsigned long config);  /**  | 
