gpio updates for v5.16
- 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
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmGJH+MACgkQEacuoBRx
13JjGg//YKoAby35hcclft5xJYDwnx2or001TJ+nFLOQ9d24gUI7+UMFVnZ2ifMP
9F/yO0934pkHNUqcTuIMbeALW6Cg2DglXJFCQSXT6Ng5ETjENOhLHRa4bRdoIEim
HC+YJg/DS6CpSkMAH09ljZfkTPz3B2DHt+Y4phIDg2PIrt+UUsN/RC685B4jSwds
pcAwdP1mqBV1da8uRjtfc7UcFSxR6/lvBBWQSo9RAEse5R6Rmm7XIOKBlQ+Exdts
jAmVqxz7BnfuYug9Y3y3fOiAQYoRvZBaSjkeMJALub3GEd3W30vAKoQhq7gC9ea3
XvCj7V6C59JVp9aQUXo1cL6VqcesSGMWoRi2vll8/7gluXV2gCoNPVb+9KwxG9Ed
+xwXBpCsOVQCXl8jgIHBWNfxOS31wafWlK8Ng42Cjov+uQfsccgufTvhQXBumKbM
oECSOgjg9k3/AMpym3buOgAzqSec5R1iiSWHNPT+P6cSFXa2Bl3A8X0RgF/TwXPC
Bn9BDfSiYfOcD6y6yx2GPMCrCXNJRWgfJ/2j3Jsb66XtGwtBDhmK7rcqcg9qIws9
mWWyISiJgO0gfk24hIIw7OxeKCidm3iVskryJAQUfTX+BBcR5nZfiuF3EeDXZv95
whkSoN7J5fmMYDDJ7wd0pFwbW5fe5C/i/2tjOlNBgdXsNgAv/r4=
=mKh0
-----END PGP SIGNATURE-----
Merge tag 'gpio-updates-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
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
This commit is contained in:
commit
d20f7a09e5
26 changed files with 943 additions and 351 deletions
|
|
@ -5,12 +5,16 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Virtio GPIO Feature bits */
|
||||
#define VIRTIO_GPIO_F_IRQ 0
|
||||
|
||||
/* Virtio GPIO request types */
|
||||
#define VIRTIO_GPIO_MSG_GET_NAMES 0x0001
|
||||
#define VIRTIO_GPIO_MSG_GET_DIRECTION 0x0002
|
||||
#define VIRTIO_GPIO_MSG_SET_DIRECTION 0x0003
|
||||
#define VIRTIO_GPIO_MSG_GET_VALUE 0x0004
|
||||
#define VIRTIO_GPIO_MSG_SET_VALUE 0x0005
|
||||
#define VIRTIO_GPIO_MSG_IRQ_TYPE 0x0006
|
||||
|
||||
/* Possible values of the status field */
|
||||
#define VIRTIO_GPIO_STATUS_OK 0x0
|
||||
|
|
@ -21,11 +25,19 @@
|
|||
#define VIRTIO_GPIO_DIRECTION_OUT 0x01
|
||||
#define VIRTIO_GPIO_DIRECTION_IN 0x02
|
||||
|
||||
/* Virtio GPIO IRQ types */
|
||||
#define VIRTIO_GPIO_IRQ_TYPE_NONE 0x00
|
||||
#define VIRTIO_GPIO_IRQ_TYPE_EDGE_RISING 0x01
|
||||
#define VIRTIO_GPIO_IRQ_TYPE_EDGE_FALLING 0x02
|
||||
#define VIRTIO_GPIO_IRQ_TYPE_EDGE_BOTH 0x03
|
||||
#define VIRTIO_GPIO_IRQ_TYPE_LEVEL_HIGH 0x04
|
||||
#define VIRTIO_GPIO_IRQ_TYPE_LEVEL_LOW 0x08
|
||||
|
||||
struct virtio_gpio_config {
|
||||
__le16 ngpio;
|
||||
__u8 padding[2];
|
||||
__le32 gpio_names_size;
|
||||
} __packed;
|
||||
};
|
||||
|
||||
/* Virtio GPIO Request / Response */
|
||||
struct virtio_gpio_request {
|
||||
|
|
@ -44,4 +56,17 @@ struct virtio_gpio_response_get_names {
|
|||
__u8 value[];
|
||||
};
|
||||
|
||||
/* Virtio GPIO IRQ Request / Response */
|
||||
struct virtio_gpio_irq_request {
|
||||
__le16 gpio;
|
||||
};
|
||||
|
||||
struct virtio_gpio_irq_response {
|
||||
__u8 status;
|
||||
};
|
||||
|
||||
/* Possible values of the interrupt status field */
|
||||
#define VIRTIO_GPIO_IRQ_STATUS_INVALID 0x0
|
||||
#define VIRTIO_GPIO_IRQ_STATUS_VALID 0x1
|
||||
|
||||
#endif /* _LINUX_VIRTIO_GPIO_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue