diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-02-21 05:24:36 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-07-16 06:15:54 +0200 |
commit | 0fbf8eb1dd1c68569d19c4e6333ba049c8a420a8 (patch) | |
tree | e4a2aebf78e4ce9243eda5cf7c499902c7c11755 /samsung-ipc/ipc.h | |
parent | 97321a09aa9b0de128d306e994f7129a57f5bf91 (diff) | |
download | hardware_replicant_libsamsung-ipc-0fbf8eb1dd1c68569d19c4e6333ba049c8a420a8.tar.gz hardware_replicant_libsamsung-ipc-0fbf8eb1dd1c68569d19c4e6333ba049c8a420a8.tar.bz2 hardware_replicant_libsamsung-ipc-0fbf8eb1dd1c68569d19c4e6333ba049c8a420a8.zip |
Add a modem abstractionpatches-todo/modem-abstraction-wip-rebase-3
Some xmm626_kernel_smdk4412 functions are present for all devices:
- open|close|read|write|poll
- fmt/rfs
- gprs
- power
Thses are not
+----------+
| galaxys2 | | hci_power | link_control_enable | link_control_active | link_connected_wait | link_get_hostwake_wait | |
| i9300 | | hci_power | link_control_enable | link_control_active | link_connected_wait | link_get_hostwake_wait | |
| maguro | boot_power | | | | | | status_online_wait |
| n5100 | | hci_power | link_control_enable | link_control_active | link_connected_wait | link_get_hostwake_wait | |
| n7100 | | hci_power | link_control_enable | link_control_active | link_connected_wait | link_get_hostwake_wait | |
| piranha | | | | | | | |
+----------+
TODO:
- don't add the python script to this commit or clean it up
- cleanup style
- Verify if we need to convert all boards in this commit
- Look if i9300 changes should go in this commit
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'samsung-ipc/ipc.h')
-rw-r--r-- | samsung-ipc/ipc.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/samsung-ipc/ipc.h b/samsung-ipc/ipc.h index 1cfa757..dfeea11 100644 --- a/samsung-ipc/ipc.h +++ b/samsung-ipc/ipc.h @@ -78,6 +78,49 @@ struct ipc_client_gprs_specs { struct ipc_client_gprs_capabilities *capabilities); }; +struct ipc_client_modem_driver_ops { + int (*power)(struct ipc_client *client, int device_fd, int power); + int (*download_enable)(struct ipc_client *client, int device_fd, + int enable); + int (*bus_power)(struct ipc_client *client, int power); + int (*link_control_enable)(struct ipc_client *client, int device_fd, + int enable); + int (*link_control_active)(struct ipc_client *client, int device_fd, + int active); + int (*link_connected_wait)(struct ipc_client *client, int device_fd); + int (*link_get_hostwake_wait)(struct ipc_client *client, int device_fd); + int (*wait_status_online)( + __attribute__((unused)) struct ipc_client *client, + int device_fd); + int (*open)(struct ipc_client *client, int type); + int (*close)(struct ipc_client *client, int fd); + int (*read)(struct ipc_client *client, int fd, void *buffer, + size_t length); + int (*write)(struct ipc_client *client, int fd, const void *buffer, + size_t length); + int (*poll)(struct ipc_client *client, int fd, struct ipc_poll_fds *fds, + struct timeval *timeout); + + int (*fmt_send)(struct ipc_client *client, struct ipc_message *message); + int (*fmt_recv)(struct ipc_client *client, struct ipc_message *message); + int (*rfs_send)(struct ipc_client *client, struct ipc_message *message); + int (*rfs_recv)(struct ipc_client *client, struct ipc_message *message); + //TODO: find a better name not to conflict with fmt/rfs send + // like block-data send (used for firmware) + // what about firmware->MAIN + // and data_send firmware_send + // or send_partition + // or send_block + int (*data_send)(struct ipc_client *client, int device_fd, const void *data, + size_t size, int address); + + char * (*gprs_get_iface)(struct ipc_client *client, unsigned int cid); + int (*gprs_get_capabilities)( + struct ipc_client *client, + struct ipc_client_gprs_capabilities *capabilities); +}; + + struct ipc_client_nv_data_specs { char *nv_data_path; char *nv_data_md5_path; @@ -98,6 +141,7 @@ struct ipc_client { struct ipc_client_handlers *handlers; struct ipc_client_gprs_specs *gprs_specs; struct ipc_client_nv_data_specs *nv_data_specs; + struct ipc_client_modem_driver_ops *modem_driver_ops; }; /* |