[Replicant] [libsamsung-ipc] [PATCH 06/11] modems: xmm626: abstract xmm626_kernel_smdk4412_nv_data_send

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Sun Oct 11 22:22:17 UTC 2020


Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 samsung-ipc/ipc.h                       | 1 +
 samsung-ipc/modems/modem.c              | 5 +++++
 samsung-ipc/modems/modem.h              | 2 ++
 samsung-ipc/modems/xmm626/xmm626_hsic.c | 1 +
 samsung-ipc/modems/xmm626/xmm626_mipi.c | 1 +
 5 files changed, 10 insertions(+)

diff --git a/samsung-ipc/ipc.h b/samsung-ipc/ipc.h
index 7e51f07..7c592b2 100644
--- a/samsung-ipc/ipc.h
+++ b/samsung-ipc/ipc.h
@@ -83,6 +83,7 @@ struct ipc_client_modem_driver_ops {
 			 const void *data,  size_t size, int address);
 	int (*firmware_send)(struct ipc_client *client, int device_fd,
 			     const void *firmware_data, size_t firmware_size);
+	int (*nv_data_send)(struct ipc_client *client, int device_fd);
 };
 
 struct ipc_client_nv_data_specs {
diff --git a/samsung-ipc/modems/modem.c b/samsung-ipc/modems/modem.c
index e3e426d..4bb325d 100644
--- a/samsung-ipc/modems/modem.c
+++ b/samsung-ipc/modems/modem.c
@@ -33,3 +33,8 @@ int modem_firmware_send(struct ipc_client *client, int device_fd,
 						       firmware_data,
 						       firmware_size);
 }
+
+int modem_nv_data_send(struct ipc_client *client, int device_fd)
+{
+	return client->modem_driver_ops->nv_data_send(client, device_fd);
+}
diff --git a/samsung-ipc/modems/modem.h b/samsung-ipc/modems/modem.h
index 5c362c6..44e27a1 100644
--- a/samsung-ipc/modems/modem.h
+++ b/samsung-ipc/modems/modem.h
@@ -28,4 +28,6 @@ int modem_data_send(struct ipc_client *client, int device_fd, const void *data,
 int modem_firmware_send(struct ipc_client *client, int device_fd,
 			const void *firmware_data, size_t firmware_size);
 
+int modem_nv_data_send(struct ipc_client *client, int device_fd);
+
 #endif /* __SAMSUNG_IPC_MODEM_H__ */
diff --git a/samsung-ipc/modems/xmm626/xmm626_hsic.c b/samsung-ipc/modems/xmm626/xmm626_hsic.c
index 4e1263d..c78c375 100644
--- a/samsung-ipc/modems/xmm626/xmm626_hsic.c
+++ b/samsung-ipc/modems/xmm626/xmm626_hsic.c
@@ -567,4 +567,5 @@ int xmm626_hsic_hw_reset_send(struct ipc_client *client, int device_fd)
 struct ipc_client_modem_driver_ops xmm626_hsic_modem_driver_ops = {
 	.data_send = xmm626_hsic_modem_data_send,
 	.firmware_send = xmm626_kernel_smdk4412_firmware_send,
+	.nv_data_send = xmm626_kernel_smdk4412_nv_data_send
 };
diff --git a/samsung-ipc/modems/xmm626/xmm626_mipi.c b/samsung-ipc/modems/xmm626/xmm626_mipi.c
index 54adb91..058918f 100644
--- a/samsung-ipc/modems/xmm626/xmm626_mipi.c
+++ b/samsung-ipc/modems/xmm626/xmm626_mipi.c
@@ -628,4 +628,5 @@ int xmm626_mipi_hw_reset_send(struct ipc_client *client, int device_fd)
 struct ipc_client_modem_driver_ops xmm626_mipi_modem_driver_ops = {
 	.data_send = xmm626_mipi_modem_data_send,
 	.firmware_send = xmm626_kernel_smdk4412_firmware_send,
+	.nv_data_send = xmm626_kernel_smdk4412_nv_data_send,
 };
-- 
2.28.0



More information about the Replicant mailing list