aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorDave Ertman <[email protected]>2020-12-03 00:54:24 +0000
committerGreg Kroah-Hartman <[email protected]>2020-12-04 11:23:25 +0000
commit7de3697e9cbd4bd3d62bafa249d57990e1b8f294 (patch)
treef7cc86874738deef11a859b92c792807c7f8aa4d /scripts/mod/file2alias.c
parentLinux 5.10-rc3 (diff)
downloadkernel-7de3697e9cbd4bd3d62bafa249d57990e1b8f294.tar.gz
kernel-7de3697e9cbd4bd3d62bafa249d57990e1b8f294.zip
Add auxiliary bus support
Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver. It enables drivers to create an auxiliary_device and bind an auxiliary_driver to it. The bus supports probe/remove shutdown and suspend/resume callbacks. Each auxiliary_device has a unique string based id; driver binds to an auxiliary_device based on this id through the bus. Co-developed-by: Kiran Patil <[email protected]> Co-developed-by: Ranjani Sridharan <[email protected]> Co-developed-by: Fred Oh <[email protected]> Co-developed-by: Leon Romanovsky <[email protected]> Signed-off-by: Kiran Patil <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Fred Oh <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Dave Ertman <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Shiraz Saleem <[email protected]> Reviewed-by: Parav Pandit <[email protected]> Reviewed-by: Dan Williams <[email protected]> Reviewed-by: Martin Habets <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]> Link: https://lore.kernel.org/r/160695681289.505290.8978295443574440604.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 2417dd1dee33..fb4827027536 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1364,6 +1364,13 @@ static int do_mhi_entry(const char *filename, void *symval, char *alias)
{
DEF_FIELD_ADDR(symval, mhi_device_id, chan);
sprintf(alias, MHI_DEVICE_MODALIAS_FMT, *chan);
+ return 1;
+}
+
+static int do_auxiliary_entry(const char *filename, void *symval, char *alias)
+{
+ DEF_FIELD_ADDR(symval, auxiliary_device_id, name);
+ sprintf(alias, AUXILIARY_MODULE_PREFIX "%s", *name);
return 1;
}
@@ -1442,6 +1449,7 @@ static const struct devtable devtable[] = {
{"tee", SIZE_tee_client_device_id, do_tee_entry},
{"wmi", SIZE_wmi_device_id, do_wmi_entry},
{"mhi", SIZE_mhi_device_id, do_mhi_entry},
+ {"auxiliary", SIZE_auxiliary_device_id, do_auxiliary_entry},
};
/* Create MODULE_ALIAS() statements.