Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3777746pxb; Mon, 30 Aug 2021 10:22:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfXPofaKpRHjjPLgY8dle0WOL2Xtl5q08+N1vxP/F9eoKDixX+ZuGRFeOOvppQFPy04Cfq X-Received: by 2002:a92:c091:: with SMTP id h17mr14681101ile.286.1630344173529; Mon, 30 Aug 2021 10:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630344173; cv=none; d=google.com; s=arc-20160816; b=cnNdy4xXdq80SrUn0pk62tZ29w5YAxehRwgkvjWLJchW0sVOf94gw6sJ2A7DC/lJF1 m2jzohvMd0hu8gkJU08ZdFCmbKV1YfGGi3gf/wo+vVsJwSTr/RN7JbsH20unf7RKCWmf /vzp38QJC+YMXYvJZe5gZCbO1cCwlJStXywNhNWml3GooHJrpB8in5pQShrXNxae8jhx hlyEREnVblVDeNBpLnRN+31pMf9S0FMiftyFTmT7JUxMyXlgDTaWtii90syvHSxpyMnb adcNkFZYoGL/UnzKME7hagycKhQ1iJB7LqVrBPFApxi3pF3AKK6QIyXcGgrqn7g2mO4r o92w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=B6gEW3dBebm2Bj8AG3Vr+DiihWRAof7mzBYAI/QkdxY=; b=w9Nn+4LBE9riYkTp7VKOVdEAIvguXMwCRZgRS1gf05W5j8/5w1PrM9TX6F9iGPxm7V DszfMhgdszakOP7HeoWhCawS9iko8O6JdQOzcI9+9s+D7FApkFch2mVjqH69wWEQDg+j p0b5vworiISzoS6HDLfRGuT7WhTIB8lErYKSvQ4x4SOnE1pJhTzheaBaFTaZT97sZErZ OB5Q+bi0208Qv6m9UxW8zQP/3FT9vCAqyGnR9WjNSLIu2wyGc6A3gQYnBKudZHvkK3Yd iZqizEDrMNy+Yb8t40wu6TYWDDWQMv/rVCgzR/YX2zu7bL9hSwTOQvBsFe20u2VBkpYn zfgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p35si14494493jal.123.2021.08.30.10.22.42; Mon, 30 Aug 2021 10:22:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238066AbhH3RWs (ORCPT + 99 others); Mon, 30 Aug 2021 13:22:48 -0400 Received: from mx20.baidu.com ([111.202.115.85]:33494 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237976AbhH3RWq (ORCPT ); Mon, 30 Aug 2021 13:22:46 -0400 Received: from BJHW-MAIL-EX04.internal.baidu.com (unknown [10.127.64.14]) by Forcepoint Email with ESMTPS id 4C2DF96757A6066B6F37; Tue, 31 Aug 2021 01:21:50 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-MAIL-EX04.internal.baidu.com (10.127.64.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 31 Aug 2021 01:21:50 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 31 Aug 2021 01:21:49 +0800 From: Cai Huoqing To: , , , , , , , , CC: , , , , "Cai Huoqing" Subject: [PATCH 1/6] iio: adc: Init the driver for NXP i.MX8QuadXPlus Date: Tue, 31 Aug 2021 01:21:35 +0800 Message-ID: <20210830172140.414-2-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210830172140.414-1-caihuoqing@baidu.com> References: <20210830172140.414-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex15.internal.baidu.com (172.31.51.55) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ADC The NXP i.MX 8QuadXPlus SOC has a new ADC IP. This patch init this ADC driver. Signed-off-by: Cai Huoqing --- 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#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