LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Cai Huoqing <caihuoqing@baidu.com>
To: <jic23@kernel.org>, <lars@metafoo.de>, <robh+dt@kernel.org>,
<shawnguo@kernel.org>, <s.hauer@pengutronix.de>,
<kernel@pengutronix.de>, <festevam@gmail.com>,
<linux-imx@nxp.com>, <alex.dewar90@gmail.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
"Cai Huoqing" <caihuoqing@baidu.com>
Subject: [PATCH 1/6] iio: adc: Init the driver for NXP i.MX8QuadXPlus
Date: Tue, 31 Aug 2021 01:21:35 +0800 [thread overview]
Message-ID: <20210830172140.414-2-caihuoqing@baidu.com> (raw)
In-Reply-To: <20210830172140.414-1-caihuoqing@baidu.com>
ADC
The NXP i.MX 8QuadXPlus SOC has a new ADC IP. This patch init
this ADC driver.
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
drivers/iio/adc/imx8qxp-adc.c | 67 +++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 drivers/iio/adc/imx8qxp-adc.c
diff --git a/drivers/iio/adc/imx8qxp-adc.c b/drivers/iio/adc/imx8qxp-adc.c
new file mode 100644
index 000000000000..aec1b45c8fb9
--- /dev/null
+++ b/drivers/iio/adc/imx8qxp-adc.c
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * NXP i.MX8QXP ADC driver
+ */
+
+#include <linux/clk.h>
+#include <linux/completion.h>
+#include <linux/err.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/module.h>
+#include <linux/pm_runtime.h>
+#include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
+#include <linux/iio/iio.h>
+#include <linux/iio/driver.h>
+#include <linux/iio/sysfs.h>
+
+#define ADC_DRIVER_NAME "imx8qxp-adc"
+
+static int imx8qxp_adc_probe(struct platform_device *pdev)
+{
+ return 0;
+}
+
+static int imx8qxp_adc_remove(struct platform_device *pdev)
+{
+ return 0;
+}
+
+static int imx8qxp_adc_runtime_suspend(struct device *dev)
+{
+ return 0;
+}
+
+static int imx8qxp_adc_runtime_resume(struct device *dev)
+{
+ return 0;
+}
+
+static const struct dev_pm_ops imx8qxp_adc_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
+ SET_RUNTIME_PM_OPS(imx8qxp_adc_runtime_suspend, imx8qxp_adc_runtime_resume, NULL)
+};
+
+static const struct of_device_id imx8qxp_adc_match[] = {
+ { .compatible = "nxp,imx8qxp-adc", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, imx8qxp_adc_match);
+
+static struct platform_driver imx8qxp_adc_driver = {
+ .probe = imx8qxp_adc_probe,
+ .remove = imx8qxp_adc_remove,
+ .driver = {
+ .name = ADC_DRIVER_NAME,
+ .of_match_table = imx8qxp_adc_match,
+ .pm = &imx8qxp_adc_pm_ops,
+ },
+};
+
+module_platform_driver(imx8qxp_adc_driver);
+
+MODULE_DESCRIPTION("i.MX8QuadXPlus ADC driver");
+MODULE_LICENSE("GPL v2");
--
2.25.1
next prev parent reply other threads:[~2021-08-30 17:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 17:21 [PATCH 0/6] Add driver support for NXP IMX8QXP ADC Cai Huoqing
2021-08-30 17:21 ` Cai Huoqing [this message]
2021-08-30 17:41 ` [PATCH 1/6] iio: adc: Init the driver for NXP i.MX8QuadXPlus Fabio Estevam
2021-09-05 11:30 ` Jonathan Cameron
2021-08-30 17:21 ` [PATCH 2/6] iio: adc: Add configuration for NXP i.MX8QuadXPlus ADC driver Cai Huoqing
2021-08-30 17:21 ` [PATCH 3/6] iio: imx8qxp-adc: Add the detail " Cai Huoqing
2021-09-05 11:54 ` Jonathan Cameron
2021-08-30 17:21 ` [PATCH 4/6] dt-bindings: iio: adc: Add the binding documentation for NXP IMX8QXP ADC Cai Huoqing
2021-08-31 0:03 ` Rob Herring
2021-09-05 11:55 ` Jonathan Cameron
2021-08-30 17:21 ` [PATCH 5/6] MAINTAINERS: Add the driver info of the " Cai Huoqing
2021-08-30 17:21 ` [PATCH 6/6] iio: imx8qxp-adc: Add the copyright for NXP i.MX8QuadXPlus ADC driver Cai Huoqing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210830172140.414-2-caihuoqing@baidu.com \
--to=caihuoqing@baidu.com \
--cc=alex.dewar90@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--subject='Re: [PATCH 1/6] iio: adc: Init the driver for NXP i.MX8QuadXPlus' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).