diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-10-22 12:48:35 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-20 09:24:51 +0000 |
commit | 8fc60754dd1df91560a3123454df1ad0ecf0ac92 (patch) | |
tree | 4a53db0baee7b907eef264df6936dc302467ffc9 /plugins/qcom-soc/mm-plugin-qcom-soc.h | |
parent | cab4b54ad106caadb7f70025348f0aab5522bde4 (diff) |
qcom-soc: new plugin for Qualcomm SoCs
This plugin implements support for old Qualcomm SoCs like the MSM8916
or the MSM8974, where:
* control ports are available via RPMSG channels exported as devices
e.g. with rpmsgexport:
https://github.com/andersson/rpmsgexport
* network ports are exposed by the bam-dmux kernel driver:
https://github.com/msm8916-mainline/linux/commits/bam-dmux
Adding support for newer Qualcomm SoCs (e.g. QRTR+IPA) could be done
in a similar way on this very same plugin.
This plugin is the first and only one that implements support for a
modem device that is "built in" the system, as opposed to external
modems that may be available via USB or PCI.
The ID_MM_PHYSDEV_UID based udev tags provided by the plugin provide
the logic to bind all the SoC ports together in the same modem object,
and therefore ID_MM_PHYSDEV_UID should not be used by users to
override the ones set by the plugin.
All "rpmsg[0-9]*" ports that are considered part of the modem are
flagged as candidate, ignoring the parent "rpmsg_ctrl[0-9]*" ports on
purpose. This setup therefore assumes that the channels have been
exported already as devices (e.g. using rpmsgexport).
libqmi 1.27.2 is required to support the "WDS Bind Data Port" message.
Diffstat (limited to 'plugins/qcom-soc/mm-plugin-qcom-soc.h')
-rw-r--r-- | plugins/qcom-soc/mm-plugin-qcom-soc.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/qcom-soc/mm-plugin-qcom-soc.h b/plugins/qcom-soc/mm-plugin-qcom-soc.h new file mode 100644 index 00000000..54da154f --- /dev/null +++ b/plugins/qcom-soc/mm-plugin-qcom-soc.h @@ -0,0 +1,40 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Copyright (C) 2020 Aleksander Morgado <aleksander@aleksander.es> + */ + +#ifndef MM_PLUGIN_QCOM_SOC_H +#define MM_PLUGIN_QCOM_SOC_H + +#include "mm-plugin.h" + +#define MM_TYPE_PLUGIN_QCOM_SOC (mm_plugin_qcom_soc_get_type ()) +#define MM_PLUGIN_QCOM_SOC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_PLUGIN_QCOM_SOC, MMPluginQcomSoc)) +#define MM_PLUGIN_QCOM_SOC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_PLUGIN_QCOM_SOC, MMPluginQcomSocClass)) +#define MM_IS_PLUGIN_QCOM_SOC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_PLUGIN_QCOM_SOC)) +#define MM_IS_PLUGIN_QCOM_SOC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_PLUGIN_QCOM_SOC)) +#define MM_PLUGIN_QCOM_SOC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PLUGIN_QCOM_SOC, MMPluginQcomSocClass)) + +typedef struct { + MMPlugin parent; +} MMPluginQcomSoc; + +typedef struct { + MMPluginClass parent; +} MMPluginQcomSocClass; + +GType mm_plugin_qcom_soc_get_type (void); + +G_MODULE_EXPORT MMPlugin *mm_plugin_create (void); + +#endif /* MM_PLUGIN_QCOM_SOC_H */ |