sdca_ump.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * The MIPI SDCA specification is available for public downloads at
  4. * https://www.mipi.org/mipi-sdca-v1-0-download
  5. *
  6. * Copyright (C) 2025 Cirrus Logic, Inc. and
  7. * Cirrus Logic International Semiconductor Ltd.
  8. */
  9. #ifndef __SDCA_UMP_H__
  10. #define __SDCA_UMP_H__
  11. struct regmap;
  12. struct sdca_control;
  13. struct sdca_entity;
  14. struct sdca_function_data;
  15. struct snd_soc_component;
  16. struct delayed_work;
  17. int sdca_ump_get_owner_host(struct device *dev,
  18. struct regmap *function_regmap,
  19. struct sdca_function_data *function,
  20. struct sdca_entity *entity,
  21. struct sdca_control *control);
  22. int sdca_ump_set_owner_device(struct device *dev,
  23. struct regmap *function_regmap,
  24. struct sdca_function_data *function,
  25. struct sdca_entity *entity,
  26. struct sdca_control *control);
  27. int sdca_ump_read_message(struct device *dev,
  28. struct regmap *device_regmap,
  29. struct regmap *function_regmap,
  30. struct sdca_function_data *function,
  31. struct sdca_entity *entity,
  32. unsigned int offset_sel, unsigned int length_sel,
  33. void **msg);
  34. int sdca_ump_write_message(struct device *dev,
  35. struct regmap *device_regmap,
  36. struct regmap *function_regmap,
  37. struct sdca_function_data *function,
  38. struct sdca_entity *entity,
  39. unsigned int offset_sel, unsigned int msg_offset,
  40. unsigned int length_sel,
  41. void *msg, int msg_len);
  42. void sdca_ump_cancel_timeout(struct delayed_work *work);
  43. void sdca_ump_schedule_timeout(struct delayed_work *work,
  44. unsigned int timeout_us);
  45. #endif // __SDCA_UMP_H__