summaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg/rpmsg_internal.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-30 10:43:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-30 10:43:19 -0700
commit3312db01db06ace51bb4934e9de64da62fac3f38 (patch)
tree2aa2f5ff07332239d7817fe6c97880ddd98e1f81 /drivers/rpmsg/rpmsg_internal.h
parentf18e345dd156cc0fcf4a4911af2f959120613871 (diff)
parent8109517b394e6deab5fd21cc5460e82ffed229c6 (diff)
downloadlinux-3312db01db06ace51bb4934e9de64da62fac3f38.tar.bz2
Merge tag 'rpmsg-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
Pull rpmsg updates from Bjorn Andersson: "The major part of the rpmsg changes for v5.18 relates to improvements in the rpmsg char driver, which now allow automatically attaching to rpmsg channels as well as initiating new communication channels from the Linux side. The SMD driver is moved to arch_initcall with the purpose of registering root clocks earlier during boot. Also in the SMD driver, a workaround for the resource power management (RPM) channel is introduced to resolve an issue where both the RPM and Linux side waits for the other to close the communication established by the bootloader - this unblocks support for clocks and regulators on some older Qualcomm platforms" * tag 'rpmsg-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: ctrl: Introduce new RPMSG_CREATE/RELEASE_DEV_IOCTL controls rpmsg: char: Introduce the "rpmsg-raw" channel rpmsg: char: Add possibility to use default endpoint of the rpmsg device rpmsg: char: Refactor rpmsg_chrdev_eptdev_create function rpmsg: Update rpmsg_chrdev_register_device function rpmsg: Move the rpmsg control device from rpmsg_char to rpmsg_ctrl rpmsg: Create the rpmsg class in core instead of in rpmsg char rpmsg: char: Export eptdev create and destroy functions rpmsg: char: treat rpmsg_trysend() ENOMEM as EAGAIN rpmsg: qcom_smd: Fix redundant channel->registered assignment rpmsg: use struct_size over open coded arithmetic rpmsg: smd: allow opening rpm_requests even if already opened rpmsg: qcom_smd: Promote to arch_initcall
Diffstat (limited to 'drivers/rpmsg/rpmsg_internal.h')
-rw-r--r--drivers/rpmsg/rpmsg_internal.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h
index b1245d3ed7c6..d4b23fd019a8 100644
--- a/drivers/rpmsg/rpmsg_internal.h
+++ b/drivers/rpmsg/rpmsg_internal.h
@@ -18,6 +18,8 @@
#define to_rpmsg_device(d) container_of(d, struct rpmsg_device, dev)
#define to_rpmsg_driver(d) container_of(d, struct rpmsg_driver, drv)
+extern struct class *rpmsg_class;
+
/**
* struct rpmsg_device_ops - indirection table for the rpmsg_device operations
* @create_channel: create backend-specific channel, optional
@@ -84,16 +86,16 @@ struct rpmsg_device *rpmsg_create_channel(struct rpmsg_device *rpdev,
int rpmsg_release_channel(struct rpmsg_device *rpdev,
struct rpmsg_channel_info *chinfo);
/**
- * rpmsg_chrdev_register_device() - register chrdev device based on rpdev
+ * rpmsg_ctrldev_register_device() - register a char device for control based on rpdev
* @rpdev: prepared rpdev to be used for creating endpoints
*
* This function wraps rpmsg_register_device() preparing the rpdev for use as
* basis for the rpmsg chrdev.
*/
-static inline int rpmsg_chrdev_register_device(struct rpmsg_device *rpdev)
+static inline int rpmsg_ctrldev_register_device(struct rpmsg_device *rpdev)
{
- strcpy(rpdev->id.name, "rpmsg_chrdev");
- rpdev->driver_override = "rpmsg_chrdev";
+ strcpy(rpdev->id.name, "rpmsg_ctrl");
+ rpdev->driver_override = "rpmsg_ctrl";
return rpmsg_register_device(rpdev);
}