diff options
author | David S. Miller <davem@davemloft.net> | 2021-06-18 13:13:40 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-18 13:13:40 -0700 |
commit | 4bea7207a80c8bba3b3eb5b84c407b162968475f (patch) | |
tree | 149cbe7b468334c730c302617fc331876e11e726 /include/linux | |
parent | 01bf086b7c836bf5ccb6a92bb98b42ebfc841fc7 (diff) | |
parent | 31c143f712750143abaca396236bbe8707700111 (diff) |
Merge branch 'RPMSG-WWAN-CTRL-driver'
Stephan Gerhold says:
====================
net: wwan: Add RPMSG WWAN CTRL driver
This patch series adds a WWAN "control" driver for the remote processor
messaging (rpmsg) subsystem. This subsystem allows communicating with
an integrated modem DSP on many Qualcomm SoCs, e.g. MSM8916 or MSM8974.
The driver is a fairly simple glue layer between WWAN and RPMSG
and is mostly based on the existing mhi_wwan_ctrl.c and rpmsg_char.c.
For more information, see commit message in PATCH 2/3.
I already posted a RFC for this a while ago:
https://lore.kernel.org/linux-arm-msm/YLfL9Q+4860uqS8f@gerhold.net/
and now I'm looking for some feedback for the actual changes. :)
Changes in v3:
- PATCH 2/3: Clarify commit message
- PATCH 3/3: Fix build error for cdc-wdm.c, use extra tx_blocking() op instead
v2: https://lore.kernel.org/netdev/20210618075243.42046-1-stephan@gerhold.net/
Changes in v2: Only in PATCH 3/3
- Fix EPOLLOUT being always set even if poll op is defined
- Rename poll() op -> tx_poll() since it should be only used for TX
v1: https://lore.kernel.org/netdev/20210615133229.213064-1-stephan@gerhold.net/
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mod_devicetable.h | 1 | ||||
-rw-r--r-- | include/linux/wwan.h | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 7d45b5f989b0..8e291cfdaf06 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -447,6 +447,7 @@ struct hv_vmbus_device_id { struct rpmsg_device_id { char name[RPMSG_NAME_SIZE]; + kernel_ulong_t driver_data; }; /* i2c */ diff --git a/include/linux/wwan.h b/include/linux/wwan.h index 430a3a0817de..34222230360c 100644 --- a/include/linux/wwan.h +++ b/include/linux/wwan.h @@ -6,6 +6,7 @@ #include <linux/device.h> #include <linux/kernel.h> +#include <linux/poll.h> #include <linux/skbuff.h> #include <linux/netlink.h> @@ -40,15 +41,23 @@ struct wwan_port; /** struct wwan_port_ops - The WWAN port operations * @start: The routine for starting the WWAN port device. * @stop: The routine for stopping the WWAN port device. - * @tx: The routine that sends WWAN port protocol data to the device. + * @tx: Non-blocking routine that sends WWAN port protocol data to the device. + * @tx_blocking: Optional blocking routine that sends WWAN port protocol data + * to the device. + * @tx_poll: Optional routine that sets additional TX poll flags. * * The wwan_port_ops structure contains a list of low-level operations - * that control a WWAN port device. All functions are mandatory. + * that control a WWAN port device. All functions are mandatory unless specified. */ struct wwan_port_ops { int (*start)(struct wwan_port *port); void (*stop)(struct wwan_port *port); int (*tx)(struct wwan_port *port, struct sk_buff *skb); + + /* Optional operations */ + int (*tx_blocking)(struct wwan_port *port, struct sk_buff *skb); + __poll_t (*tx_poll)(struct wwan_port *port, struct file *filp, + poll_table *wait); }; /** |