Pull gpio updates from Bartosz Golaszewski: "We have a single new driver, new features in others and some cleanups all over the place. Nothing really stands out and it is all relatively small. - new driver: gpio-modepin (plus relevant change in zynqmp firmware) - add interrupt support to gpio-virtio - enable the 'gpio-line-names' property in the DT bindings for gpio-rockchip - use the subsystem helpers where applicable in gpio-uniphier instead of accessing IRQ structures directly - code shrink in gpio-xilinx - add interrupt to gpio-mlxbf2 (and include the removal of custom interrupt code from the mellanox ethernet driver) - support multiple interrupts per bank in gpio-tegra186 (and force one interrupt per bank in older models) - fix GPIO line IRQ offset calculation in gpio-realtek-otto - drop unneeded MODULE_ALIAS expansions in multiple drivers - code cleanup in gpio-aggregator - minor improvements in gpio-max730x and gpio-mc33880 - Kconfig cleanups" * tag 'gpio-updates-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: virtio_gpio: drop packed attribute gpio: virtio: Add IRQ support gpio: realtek-otto: fix GPIO line IRQ offset gpio: clean up Kconfig file net: mellanox: mlxbf_gige: Replace non-standard interrupt handling gpio: mlxbf2: Introduce IRQ support gpio: mc33880: Drop if with an always false condition gpio: max730x: Make __max730x_remove() return void gpio: aggregator: Wrap access to gpiochip_fwd.tmp[] gpio: modepin: Add driver support for modepin GPIO controller dt-bindings: gpio: zynqmp: Add binding documentation for modepin firmware: zynqmp: Add MMIO read and write support for PS_MODE pin gpio: tps65218: drop unneeded MODULE_ALIAS gpio: max77620: drop unneeded MODULE_ALIAS gpio: xilinx: simplify getting .driver_data gpio: tegra186: Support multiple interrupts per bank gpio: tegra186: Force one interrupt per bank gpio: uniphier: Use helper functions to get private data from IRQ data gpio: uniphier: Use helper function to get IRQ hardware number dt-bindings: gpio: add gpio-line-names to rockchip,gpio-bank.yaml
Showing the changes to include/uapi/linux (1 of 26 files). Show all
Unified · Split
| @@ -5,12 +5,16 @@ · 4 unmodified lines | |||
| 5 | 5 | ||
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | 7 | ||
| 8 | /* Virtio GPIO Feature bits */ | ||
| 9 | #define VIRTIO_GPIO_F_IRQ 0 | ||
| 10 | |||
| 8 | /* Virtio GPIO request types */ | 11 | /* Virtio GPIO request types */ |
| 9 | #define VIRTIO_GPIO_MSG_GET_NAMES 0x0001 | 12 | #define VIRTIO_GPIO_MSG_GET_NAMES 0x0001 |
| 10 | #define VIRTIO_GPIO_MSG_GET_DIRECTION 0x0002 | 13 | #define VIRTIO_GPIO_MSG_GET_DIRECTION 0x0002 |
| 11 | #define VIRTIO_GPIO_MSG_SET_DIRECTION 0x0003 | 14 | #define VIRTIO_GPIO_MSG_SET_DIRECTION 0x0003 |
| 12 | #define VIRTIO_GPIO_MSG_GET_VALUE 0x0004 | 15 | #define VIRTIO_GPIO_MSG_GET_VALUE 0x0004 |
| 13 | #define VIRTIO_GPIO_MSG_SET_VALUE 0x0005 | 16 | #define VIRTIO_GPIO_MSG_SET_VALUE 0x0005 |
| 17 | #define VIRTIO_GPIO_MSG_IRQ_TYPE 0x0006 | ||
| 14 | 18 | ||
| 15 | /* Possible values of the status field */ | 19 | /* Possible values of the status field */ |
| 16 | #define VIRTIO_GPIO_STATUS_OK 0x0 | 20 | #define VIRTIO_GPIO_STATUS_OK 0x0 |
| @@ -21,11 +25,19 @@ · 4 unmodified lines | |||
| 21 | #define VIRTIO_GPIO_DIRECTION_OUT 0x01 | 25 | #define VIRTIO_GPIO_DIRECTION_OUT 0x01 |
| 22 | #define VIRTIO_GPIO_DIRECTION_IN 0x02 | 26 | #define VIRTIO_GPIO_DIRECTION_IN 0x02 |
| 23 | 27 | ||
| 28 | /* Virtio GPIO IRQ types */ | ||
| 29 | #define VIRTIO_GPIO_IRQ_TYPE_NONE 0x00 | ||
| 30 | #define VIRTIO_GPIO_IRQ_TYPE_EDGE_RISING 0x01 | ||
| 31 | #define VIRTIO_GPIO_IRQ_TYPE_EDGE_FALLING 0x02 | ||
| 32 | #define VIRTIO_GPIO_IRQ_TYPE_EDGE_BOTH 0x03 | ||
| 33 | #define VIRTIO_GPIO_IRQ_TYPE_LEVEL_HIGH 0x04 | ||
| 34 | #define VIRTIO_GPIO_IRQ_TYPE_LEVEL_LOW 0x08 | ||
| 35 | |||
| 24 | struct virtio_gpio_config { | 36 | struct virtio_gpio_config { |
| 25 | __le16 ngpio; | 37 | __le16 ngpio; |
| 26 | __u8 padding[2]; | 38 | __u8 padding[2]; |
| 27 | __le32 gpio_names_size; | 39 | __le32 gpio_names_size; |
| 28 | } __packed; | 40 | }; |
| 29 | 41 | ||
| 30 | /* Virtio GPIO Request / Response */ | 42 | /* Virtio GPIO Request / Response */ |
| 31 | struct virtio_gpio_request { | 43 | struct virtio_gpio_request { |
| @@ -44,4 +56,17 @@ struct virtio_gpio_response_get_names { · 12 unmodified lines | |||
| 44 | __u8 value[]; | 56 | __u8 value[]; |
| 45 | }; | 57 | }; |
| 46 | 58 | ||
| 59 | /* Virtio GPIO IRQ Request / Response */ | ||
| 60 | struct virtio_gpio_irq_request { | ||
| 61 | __le16 gpio; | ||
| 62 | }; | ||
| 63 | |||
| 64 | struct virtio_gpio_irq_response { | ||
| 65 | __u8 status; | ||
| 66 | }; | ||
| 67 | |||
| 68 | /* Possible values of the interrupt status field */ | ||
| 69 | #define VIRTIO_GPIO_IRQ_STATUS_INVALID 0x0 | ||
| 70 | #define VIRTIO_GPIO_IRQ_STATUS_VALID 0x1 | ||
| 71 | |||
| 47 | #endif /* _LINUX_VIRTIO_GPIO_H */ | 72 | #endif /* _LINUX_VIRTIO_GPIO_H */ |