git: bee50f894b9e - main - LinuxKPI: qcom: update QMI and MHI

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sat, 10 Jun 2023 23:09:00 UTC
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=bee50f894b9e0b51668c83e24bf2ec7c275725eb

commit bee50f894b9e0b51668c83e24bf2ec7c275725eb
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-06-10 22:54:35 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-06-10 23:06:04 +0000

    LinuxKPI: qcom: update QMI and MHI
    
    Minor updates to QMI and MHI (mostly making arguments const)
    in order to facilitate porting the next generation athk driver.
    
    MFC after:      10 days
---
 sys/compat/linuxkpi/common/include/linux/mhi.h          | 13 ++++++++++---
 sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h |  1 +
 sys/compat/linuxkpi/common/src/linux_mhi.c              |  2 +-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/mhi.h b/sys/compat/linuxkpi/common/include/linux/mhi.h
index 427ac626f494..5f59db81a6db 100644
--- a/sys/compat/linuxkpi/common/include/linux/mhi.h
+++ b/sys/compat/linuxkpi/common/include/linux/mhi.h
@@ -63,7 +63,7 @@ struct mhi_device {
 };
 
 struct mhi_controller_config {
-	struct mhi_channel_config	*ch_cfg;
+	const struct mhi_channel_config	*ch_cfg;
 	struct mhi_event_config		*event_cfg;
 
 	int	buf_len, max_channels, num_channels, num_events, use_bounce_buf;
@@ -102,7 +102,7 @@ struct mhi_controller {
 struct mhi_controller *linuxkpi_mhi_alloc_controller(void);
 void linuxkpi_mhi_free_controller(struct mhi_controller *);
 int linuxkpi_mhi_register_controller(struct mhi_controller *,
-    struct mhi_controller_config *);
+    const struct mhi_controller_config *);
 void linuxkpi_mhi_unregister_controller(struct mhi_controller *);
 
 /* -------------------------------------------------------------------------- */
@@ -124,7 +124,7 @@ mhi_free_controller(struct mhi_controller *mhi_ctrl)
 
 static inline int
 mhi_register_controller(struct mhi_controller *mhi_ctrl,
-    struct mhi_controller_config *cfg)
+    const struct mhi_controller_config *cfg)
 {
 
 	return (linuxkpi_mhi_register_controller(mhi_ctrl, cfg));
@@ -196,6 +196,13 @@ mhi_pm_suspend(struct mhi_controller *mhi_ctrl)
 	return (0);
 }
 
+static __inline int
+mhi_pm_resume(struct mhi_controller *mhi_ctrl)
+{
+	/* XXX TODO */
+	return (0);
+}
+
 static __inline int
 mhi_pm_resume_force(struct mhi_controller *mhi_ctrl)
 {
diff --git a/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h b/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h
index 765398557ed5..63e0cd3e45fc 100644
--- a/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h
+++ b/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h
@@ -54,6 +54,7 @@ struct qmi_handle;
 
 enum soc_qcom_qmi_array_type {
 	NO_ARRAY,
+	STATIC_ARRAY,
 	VAR_LEN_ARRAY,
 };
 
diff --git a/sys/compat/linuxkpi/common/src/linux_mhi.c b/sys/compat/linuxkpi/common/src/linux_mhi.c
index 698a2553c1ec..fb68f1ef8305 100644
--- a/sys/compat/linuxkpi/common/src/linux_mhi.c
+++ b/sys/compat/linuxkpi/common/src/linux_mhi.c
@@ -60,7 +60,7 @@ linuxkpi_mhi_free_controller(struct mhi_controller *mhi_ctrl)
 
 int
 linuxkpi_mhi_register_controller(struct mhi_controller *mhi_ctrl,
-    struct mhi_controller_config *cfg)
+    const struct mhi_controller_config *cfg)
 {
 
 	if (mhi_ctrl == NULL || cfg == NULL)