dev_ril_bridge.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (C) 2017 Samsung Electronics.
  3. *
  4. * This software is licensed under the terms of the GNU General Public
  5. * License version 2, as published by the Free Software Foundation, and
  6. * may be copied, distributed, and modified under those terms.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef __DEV_RIL_BRIDGE_H__
  15. #define __DEV_RIL_BRIDGE_H__
  16. #define IPC_SYSTEM_CP_CHANNEL_INFO 0x01
  17. #define IPC_SYSTEM_CHARGING_DOCK_INFO 0x02
  18. #define IPC_SYSTEM_CP_ADAPTIVE_MIPI_INFO 0x05
  19. struct __packed sipc_fmt_hdr {
  20. u16 len;
  21. u8 msg_seq;
  22. u8 ack_seq;
  23. u8 main_cmd;
  24. u8 sub_cmd;
  25. u8 cmd_type;
  26. };
  27. struct dev_ril_bridge_msg {
  28. unsigned int dev_id;
  29. unsigned int data_len;
  30. void *data;
  31. };
  32. #if IS_ENABLED(CONFIG_DEV_RIL_BRIDGE)
  33. extern int register_dev_ril_bridge_event_notifier(struct notifier_block *nb);
  34. extern int unregister_dev_ril_bridge_event_notifier(struct notifier_block *nb);
  35. extern int dev_ril_bridge_send_msg(int id, int size, void *buf);
  36. #else
  37. static inline int register_dev_ril_bridge_event_notifier(
  38. struct notifier_block *nb) {return 0;}
  39. static inline int unregister_dev_ril_bridge_event_notifier(
  40. struct notifier_block *nb) {return 0;}
  41. static inline int dev_ril_bridge_send_msg(int id, int size, void *buf) {return 0;}
  42. #endif
  43. #endif/*__DEV_RIL_BRIDGE_H__*/