pinctrl-adi2.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Pinctrl Driver for ADI GPIO2 controller
  3. *
  4. * Copyright 2007-2013 Analog Devices Inc.
  5. *
  6. * Licensed under the GPLv2 or later
  7. */
  8. #ifndef PINCTRL_ADI2_H
  9. #define PINCTRL_ADI2_H
  10. #include <linux/io.h>
  11. #include <linux/platform_device.h>
  12. /**
  13. * struct adi_pinctrl_gpio_platform_data - Pinctrl gpio platform data
  14. * for ADI GPIO2 device.
  15. *
  16. * @port_gpio_base: Optional global GPIO index of the GPIO bank.
  17. * 0 means driver decides.
  18. * @port_pin_base: Pin index of the pin controller device.
  19. * @port_width: PIN number of the GPIO bank device
  20. * @pint_id: GPIO PINT device id that this GPIO bank should map to.
  21. * @pint_assign: The 32-bit GPIO PINT registers can be divided into 2 parts. A
  22. * GPIO bank can be mapped into either low 16 bits[0] or high 16
  23. * bits[1] of each PINT register.
  24. * @pint_map: GIOP bank mapping code in PINT device
  25. */
  26. struct adi_pinctrl_gpio_platform_data {
  27. unsigned int port_gpio_base;
  28. unsigned int port_pin_base;
  29. unsigned int port_width;
  30. u8 pinctrl_id;
  31. u8 pint_id;
  32. bool pint_assign;
  33. u8 pint_map;
  34. };
  35. #endif