From patchwork Mon Dec 19 17:36:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13077065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E953C4332F for ; Mon, 19 Dec 2022 19:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=F4oGhksY1H4B1P6iKRRShGeih9MdQjO6epbYm1yyDtw=; b=u2PgdPRqlzRrlc uBC73CXlfFv4ZSdXx0Ormjx5nO+whZeoBrhqhFPhBTXClCXI51HACXb2wj4LZnWZrOOtVvLJFEgEg PfUYjiUb8CLocB+/mHT4JIHrxqlqf7txFLBNadoPP9QfsBdNDoyW5nCcSVJD/ROKzsnMQ1JpdEdHK CUrcvE6aWiNEFy8LFfR0F5zvB3AmSNJk6N1mEBKhdSJPKRo/qA0WiWw89x/jrZRaX12DJYHxxQyoG QBS44agplLxJARV3RBmiuOSLAypCNp5lWq+rcQu1rzjMipKGcV7M2tk4ef2dm6L2qRQwoFfElUvtC m1Uq0yAvTIB/hatPHO3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7LXM-000dxA-Fd; Mon, 19 Dec 2022 19:10:56 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7K3w-00GrJY-6L for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2022 17:36:30 +0000 Received: by mail-ej1-x62c.google.com with SMTP id fc4so23213275ejc.12 for ; Mon, 19 Dec 2022 09:36:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1SUx4YxBJbW2R7ovNPCFyF9xOKCwgY1o0HqXnE9Kzl8=; b=jpTtdQNQM3Yxi5Nf6/+5xf+/rghnp2f7NhMX2DtUaLELb6WakVq7gWsYPlbsyiL6PS ChAupK2HDu3Y9LU1fN+yCe7pPeTrG61BQaGyW/jDQx/+HHN2bMbWxoVxYZqfyiJwlfWa Y4h7iJvv4QIFpOoVyXIX19weZKsj9Cb6tADl7LQNqkD4T1wSYxbYS5HeqVefq90eA+ER /Nk7kAHpjjpXbjqGM1KRD1sSDI3O/5MLQ40SbYxa/HDE5seoG5uLTOmMSb71JLg2mGZZ lGDUyB1i+XE6M5lJ2ttLvYFNOBmrvQLtRzaDCIzMNHrNHSn16xwD0q8i2hUE+HNnuXoQ nFdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1SUx4YxBJbW2R7ovNPCFyF9xOKCwgY1o0HqXnE9Kzl8=; b=Y3LCwtxmvBWLsS0VYRLzVLOcgmTCkjaj0B4aWQOiDhxfM+ZNIxktj8DIyhNhvXtTlV TAwHq9Es7lF4makvITDLjE5Phlm7gyRSpOd4870phekKjq7jBYo+cTdeKWyH1RDtgy2o BAM0GZVs25Jox60CoUvrfg1bNdwMS7B6I7AFH7VvTG8kPC3qSs/nvjG9xuv5Vt2qzw1C lqfZYYJ8LITH8uGlGGK1kpHsIav+0CyDGELOG2BTdp9sWiNHK6yl9g7I5msxa8V7EfLB Lz9dO/8gYqxGo3ro80D1qrjdNijFzzFNzUNjVaemVgWVqtObIy43DUZgSdhYxtyz4EJN ZDEw== X-Gm-Message-State: ANoB5plwSThXM4DradUbHkTGGRX40cCbLKHLXAymL67vUA905uTL/heW 4pnTXIAHIEqIcrwVmaRN4wzA29Ltpa80cg== X-Google-Smtp-Source: AA0mqf5IeWagWC7vwl63uutw6mzJKidMwPtteo4m7qSQQpMtuhJ7rCJKW2KVN5qNXPj0ETrQq1lqfA== X-Received: by 2002:a17:906:f6d7:b0:7c0:bf7c:19f4 with SMTP id jo23-20020a170906f6d700b007c0bf7c19f4mr36417779ejb.74.1671471384471; Mon, 19 Dec 2022 09:36:24 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id 17-20020a170906211100b007bb32e2d6f5sm4574859ejt.207.2022.12.19.09.36.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Dec 2022 09:36:24 -0800 (PST) From: Alexander Sverdlin To: linux-iio@vger.kernel.org Cc: Alexander Sverdlin , Hartley Sweeten , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: iio: adc: ep93xx: Add cirrus,ep9301-adc description Date: Mon, 19 Dec 2022 18:36:17 +0100 Message-Id: <20221219173618.1030415-1-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_093628_346489_AFB3576A X-CRM114-Status: GOOD ( 15.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add device tree bindings for Cirrus Logic EP9301/EP9302 internal SoCs' ADC block. Signed-off-by: Alexander Sverdlin Reviewed-by: Krzysztof Kozlowski --- Changelog: v2: removed clock-names property, soc node and include as Krzysztof suggested .../bindings/iio/adc/cirrus,ep9301-adc.yaml | 47 +++++++++++++++++++ MAINTAINERS | 2 + 2 files changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/cirrus,ep9301-adc.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/cirrus,ep9301-adc.yaml b/Documentation/devicetree/bindings/iio/adc/cirrus,ep9301-adc.yaml new file mode 100644 index 000000000000..6d4fb3e1d2a2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/cirrus,ep9301-adc.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/cirrus,ep9301-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic EP930x internal ADC + +description: | + Cirrus Logic EP9301/EP9302 SoCs' internal ADC block. + + User's manual: + https://cdn.embeddedts.com/resource-attachments/ts-7000_ep9301-ug.pdf + +maintainers: + - Alexander Sverdlin + +properties: + compatible: + const: cirrus,ep9301-adc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + adc: adc@80900000 { + compatible = "cirrus,ep9301-adc"; + reg = <0x80900000 0x28>; + clocks = <&syscon 24>; + interrupt-parent = <&vic1>; + interrupts = <30>; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index 69565ac0c224..4a914d5bc2e6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2027,8 +2027,10 @@ M: Hartley Sweeten M: Alexander Sverdlin L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained +F: Documentation/devicetree/bindings/iio/adc/cirrus,ep9301-adc.yaml F: arch/arm/mach-ep93xx/ F: arch/arm/mach-ep93xx/include/mach/ +F: drivers/iio/adc/ep93xx_adc.c ARM/CLKDEV SUPPORT M: Russell King From patchwork Mon Dec 19 17:36:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13077066 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5B867C4332F for ; Mon, 19 Dec 2022 19:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Sz5Ck8IMRaYGHC/vONKAiY56BrYnQojyebWEoyBCi5Q=; b=xlvpnIIuZzj2xY VWMkjMKkPGqRXbwXHmc5y+hg4DneOm3UdjPLRvBYpRls+TqVqfZtmC9cdLmPl9ydd5Mt/VX2WQeYt kFEtZEyqjchReqVWpaLsfpSeXr5tYLdU8M+NoeRMQUEk5wHj/xG2nl0lL9KXbU+Kzqgyn2jpp1Jkp L1HJ2awYIegJg7YL6ofN/yCdEEk6dI5aP5QcUQDBLtKwn0M7NJ5M23zbyHa37MAaXCNE1VXII3FsK 6iVK48o3Ork3MuvO3pl3Y8XQPZBNo3BHZjqYXe6i/u50VBytxaHTYQKLPpj6R/w/WNAg3C4s1x1EZ ech5c8EOCfor1YtOuU/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7LXf-000eDw-Qb; Mon, 19 Dec 2022 19:11:15 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7K3z-00GrKU-7G for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2022 17:36:32 +0000 Received: by mail-ed1-x52c.google.com with SMTP id i9so13955005edj.4 for ; Mon, 19 Dec 2022 09:36:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L/0xWO84mZV4IGXHow05EqrpGj/+BB5Qsxuyp4ptP3o=; b=IXJg1WpwcF38WgEOXYS+xE1R3q/Z5A+KzeHCXSKBNq5Q9V0PsxvFniq+18LDkn1XBG CFbGy2tqhjBQ+pvKE3BwkwjIUVs6jdRW/l7n7Uxnxayl3ASOyWKMks9g/JjtVKUgUu0T F/wStXQetiQCpFFzJ5xr7X1d/G3g5X7AbbcM6Tta8slZlSahJuMLoD8qHl59PRKbiHEJ XQ6H2LAqexaC+QDoGUyrXdhPqNc+SjHe/dtySKTEGiNKM3+vxrNoiqKIQRePrXM9vRcR 8i03/UO7WlHqFw/UBDWv8zf1TzeY5CsgTq4sVhueJk2QMZoZYvOuH05lVWq7+IdIPDUe WWsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L/0xWO84mZV4IGXHow05EqrpGj/+BB5Qsxuyp4ptP3o=; b=Zel4ZLQCCvfON3MV9fr1PAKCcUdG7nQOOqptd2uBDpklsBZ+BQp5mtDNGrjUOap4q6 L4aqpI+az2PgSHF+WEAVzWUIoRyhJjfKzBfAvDCbxiHWS3NB1LI2kaixn/RemIb8/aCb WM9yVrBhWabCTxqIXVb+XjRF5iCqqBuRePd/fbYkTuq7UhtJn5e4Fyl8PHHav9cIrGXt OuSnsiyWx7FmhpxrwXs5p+s9BPR6c7CRYG/5OBd2oaj9vIQ9UwidFVo02rgRCIB/6R06 9+YgTkoeDxvgmuEuZgb4keOZtf026JW/GyfwJQOztowRiZSSky4Uh+huTukJyP3/beKn SFjw== X-Gm-Message-State: AFqh2kpEEzPhNq2lSWOuM2FMebcf6BPoJEHodhzOEyEb4X/H9rvpUF6m QzK82JbYJAD41Ft2CxrmNQU= X-Google-Smtp-Source: AMrXdXs8NpfCdv5tqouJXLm9aXjxeW2XHzpk2ex5vtv6JINkuwxTYtIEEkYhlhxDYlVZd5Rzgb/jag== X-Received: by 2002:a05:6402:2b8c:b0:466:12a0:11f3 with SMTP id fj12-20020a0564022b8c00b0046612a011f3mr9955256edb.22.1671471385610; Mon, 19 Dec 2022 09:36:25 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id p18-20020a17090653d200b007c1651aeeacsm4600337ejo.181.2022.12.19.09.36.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Dec 2022 09:36:25 -0800 (PST) From: Alexander Sverdlin To: linux-iio@vger.kernel.org Cc: Alexander Sverdlin , Hartley Sweeten , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] iio: adc: ep93xx: Add OF support Date: Mon, 19 Dec 2022 18:36:18 +0100 Message-Id: <20221219173618.1030415-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221219173618.1030415-1-alexander.sverdlin@gmail.com> References: <20221219173618.1030415-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_093631_481240_6A61E852 X-CRM114-Status: GOOD ( 14.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Prepare for EP93xx conversion to DT. Signed-off-by: Alexander Sverdlin --- drivers/iio/adc/ep93xx_adc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c index fd5a9404c8dc..e530a37180e1 100644 --- a/drivers/iio/adc/ep93xx_adc.c +++ b/drivers/iio/adc/ep93xx_adc.c @@ -21,6 +21,7 @@ #include #include #include +#include /* * This code could benefit from real HR Timers, but jiffy granularity would @@ -227,9 +228,18 @@ static int ep93xx_adc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id ep93xx_adc_of_ids[] = { + { .compatible = "cirrus,ep9301-adc" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids); +#endif + static struct platform_driver ep93xx_adc_driver = { .driver = { .name = "ep93xx-adc", + .of_match_table = of_match_ptr(ep93xx_adc_of_ids), }, .probe = ep93xx_adc_probe, .remove = ep93xx_adc_remove,