~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/platform_data/gpio-htc-egpio.h

Version: ~ [ linux-5.1-rc5 ] ~ [ linux-5.0.7 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.34 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.111 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.168 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.178 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.138 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.65 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * HTC simple EGPIO irq and gpio extender
  4  */
  5 
  6 #ifndef __HTC_EGPIO_H__
  7 #define __HTC_EGPIO_H__
  8 
  9 /* Descriptive values for all-in or all-out htc_egpio_chip descriptors. */
 10 #define HTC_EGPIO_OUTPUT (~0)
 11 #define HTC_EGPIO_INPUT  0
 12 
 13 /**
 14  * struct htc_egpio_chip - descriptor to create gpio_chip for register range
 15  * @reg_start: index of first register
 16  * @gpio_base: gpio number of first pin in this register range
 17  * @num_gpios: number of gpios in this register range, max BITS_PER_LONG
 18  *    (number of registers = DIV_ROUND_UP(num_gpios, reg_width))
 19  * @direction: bitfield, '' = input, '1' = output,
 20  */
 21 struct htc_egpio_chip {
 22         int           reg_start;
 23         int           gpio_base;
 24         int           num_gpios;
 25         unsigned long direction;
 26         unsigned long initial_values;
 27 };
 28 
 29 /**
 30  * struct htc_egpio_platform_data - description provided by the arch
 31  * @irq_base: beginning of available IRQs (eg, IRQ_BOARD_START)
 32  * @num_irqs: number of irqs
 33  * @reg_width: number of bits per register, either 8 or 16 bit
 34  * @bus_width: alignment of the registers, either 16 or 32 bit
 35  * @invert_acks: set if chip requires writing '' to ack an irq, instead of '1'
 36  * @ack_register: location of the irq/ack register
 37  * @chip: pointer to array of htc_egpio_chip descriptors
 38  * @num_chips: number of egpio chip descriptors
 39  */
 40 struct htc_egpio_platform_data {
 41         int                   bus_width;
 42         int                   reg_width;
 43 
 44         int                   irq_base;
 45         int                   num_irqs;
 46         int                   invert_acks;
 47         int                   ack_register;
 48 
 49         struct htc_egpio_chip *chip;
 50         int                   num_chips;
 51 };
 52 
 53 /* Determine the wakeup irq, to be called during early resume */
 54 extern int htc_egpio_get_wakeup_irq(struct device *dev);
 55 
 56 #endif
 57 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp