ste_modem_shm.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) ST-Ericsson AB 2012
  3. * Author: Sjur Brendeland / sjur.brandeland@stericsson.com
  4. *
  5. * License terms: GNU General Public License (GPL) version 2
  6. */
  7. #ifndef __INC_MODEM_DEV_H
  8. #define __INC_MODEM_DEV_H
  9. #include <linux/types.h>
  10. #include <linux/platform_device.h>
  11. struct ste_modem_device;
  12. /**
  13. * struct ste_modem_dev_cb - Callbacks for modem initiated events.
  14. * @kick: Called when the modem kicks the host.
  15. *
  16. * This structure contains callbacks for actions triggered by the modem.
  17. */
  18. struct ste_modem_dev_cb {
  19. void (*kick)(struct ste_modem_device *mdev, int notify_id);
  20. };
  21. /**
  22. * struct ste_modem_dev_ops - Functions to control modem and modem interface.
  23. *
  24. * @power: Main power switch, used for cold-start or complete power off.
  25. * @kick: Kick the modem.
  26. * @kick_subscribe: Subscribe for notifications from the modem.
  27. * @setup: Provide callback functions to modem device.
  28. *
  29. * This structure contains functions used by the ste remoteproc driver
  30. * to manage the modem.
  31. */
  32. struct ste_modem_dev_ops {
  33. int (*power)(struct ste_modem_device *mdev, bool on);
  34. int (*kick)(struct ste_modem_device *mdev, int notify_id);
  35. int (*kick_subscribe)(struct ste_modem_device *mdev, int notify_id);
  36. int (*setup)(struct ste_modem_device *mdev,
  37. struct ste_modem_dev_cb *cfg);
  38. };
  39. /**
  40. * struct ste_modem_device - represent the STE modem device
  41. * @pdev: Reference to platform device
  42. * @ops: Operations used to manage the modem.
  43. * @drv_data: Driver private data.
  44. */
  45. struct ste_modem_device {
  46. struct platform_device pdev;
  47. struct ste_modem_dev_ops ops;
  48. void *drv_data;
  49. };
  50. #endif /*INC_MODEM_DEV_H*/