diff options
| author | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
| commit | 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e (patch) | |
| tree | d57f3a63479a07b4e0cece029886e76e04feb984 /include/linux/soc/apple/rtkit.h | |
| parent | 5dc63e56a9cf8df0b59c234a505a1653f1bdf885 (diff) | |
| parent | 53bea86b5712c7491bb3dae12e271666df0a308c (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.4 merge window.
Diffstat (limited to 'include/linux/soc/apple/rtkit.h')
| -rw-r--r-- | include/linux/soc/apple/rtkit.h | 26 | 
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h index c9cabb679cd1..fc456f75c131 100644 --- a/include/linux/soc/apple/rtkit.h +++ b/include/linux/soc/apple/rtkit.h @@ -22,6 +22,7 @@   * @size:      Size of the shared memory buffer.   * @iova:      Device VA of shared memory buffer.   * @is_mapped: Shared memory buffer is managed by the co-processor. + * @private:   Private data pointer for the parent driver.   */  struct apple_rtkit_shmem { @@ -30,6 +31,7 @@ struct apple_rtkit_shmem {  	size_t size;  	dma_addr_t iova;  	bool is_mapped; +	void *private;  };  /* @@ -78,6 +80,25 @@ struct apple_rtkit *devm_apple_rtkit_init(struct device *dev, void *cookie,  					  const struct apple_rtkit_ops *ops);  /* + * Non-devm version of devm_apple_rtkit_init. Must be freed with + * apple_rtkit_free. + * + * @dev:         Pointer to the device node this coprocessor is assocated with + * @cookie:      opaque cookie passed to all functions defined in rtkit_ops + * @mbox_name:   mailbox name used to communicate with the co-processor + * @mbox_idx:    mailbox index to be used if mbox_name is NULL + * @ops:         pointer to rtkit_ops to be used for this co-processor + */ +struct apple_rtkit *apple_rtkit_init(struct device *dev, void *cookie, +					  const char *mbox_name, int mbox_idx, +					  const struct apple_rtkit_ops *ops); + +/* + * Free an instance of apple_rtkit. + */ +void apple_rtkit_free(struct apple_rtkit *rtk); + +/*   * Reinitialize internal structures. Must only be called with the co-processor   * is held in reset.   */ @@ -105,6 +126,11 @@ int apple_rtkit_wake(struct apple_rtkit *rtk);  int apple_rtkit_shutdown(struct apple_rtkit *rtk);  /* + * Put the co-processor into idle mode + */ +int apple_rtkit_idle(struct apple_rtkit *rtk); + +/*   * Checks if RTKit is running and ready to handle messages.   */  bool apple_rtkit_is_running(struct apple_rtkit *rtk);  |