From patchwork Fri Dec 23 16:26:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13081028 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 22AACC4167B for ; Fri, 23 Dec 2022 16:28:16 +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=mqxloCQlGE9CUFpLfqhp7aGhNtK3fmQUwpf5eZNhV5c=; b=p01oy8M3c9PDy3 HGQ/cgq0VNgC4LetBwR1eDungV6NXJyJU/CK8v6kVrKAh9MiLd8KYKB16dxkCilFKenV5SO6oa0l4 jFWh8w9zytXCzs8qS2bQzhWb6FQEmygIIKdKCJsA7xoVE8jPpDm0hofpLePsnoTc926ZZHOuAopkN Ph3vFGzQ90i78C7q2pbpzM+FpthuM8nGokDQEjEpnHfw6+HLfb2Bpl5/TrkeP00sbNtQ1faNDbgtm efcOxqjV1EeIDrsOsJVZ86utT9yC6f9rgvO8bopgijewzIQ9inJ9hj/sYCjTYScYWDFYSDejlklam OnIIJemcz++sPFaoRQLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8ksl-009y8O-M8; Fri, 23 Dec 2022 16:26:51 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8ksf-009y0s-Dx for linux-arm-kernel@lists.infradead.org; Fri, 23 Dec 2022 16:26:47 +0000 Received: by mail-ej1-x62b.google.com with SMTP id tz12so13049364ejc.9 for ; Fri, 23 Dec 2022 08:26:42 -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=4Tmle9hGeHtFydMSBtgkAcVzOGdcFV8HSXUbv12rRhk=; b=DuCzDDYB1efLMrFzeKbjpXMIdenAT/evrDjfSH4ROqcb57yXZxPQaaPsOECnTdVgaa mnVCCZF7OBigddCiz5LjfaakAxcDbEaEJZJHyf8UdDMekciN4+Z8RvYAKphWfG099Y9y 5XmMXFUyiXRhz2s2wHRPxktRpT/3M9LVNBQe7ggWnB/EoDs8PhB4ER3THmbo0N3w+Bzr gcf37PSwJXA6HBVBxs1e8nxhVytZV5hChoZQwjM3zOvuyw42xIvIjIvuZeI//DZdBa+4 o61fiZVb7UYTS7/yzbtxEP5DZrWjcnDHaiDhkr4H8XwsDxmMg6LapfAHeVrSTgG5kWoA po7g== 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=4Tmle9hGeHtFydMSBtgkAcVzOGdcFV8HSXUbv12rRhk=; b=H0Z2vgC9v1iJMzvW0cwlVu8DIVIlJzrcjMDKeaQFrmZzSDlPWXV3S71IhgOlThnqRl UvELdsvmPhKfNoS1lrscn2ZUFy1iRxK4JLY2k9W7Jz70he/oeslWdgDOCXzZEJnotbAN 25wAkuXM8q+JkfrgK36Z9C1E4vxKkGFdvpxQAzHuM0xgz75nx4VwylNplO2iwSWo3Afm F+4OyVB8BXhyePW260vYsGiQFjd8uPX0KLkGG1+hj5KWUvTKktaXoEoOvdIUAjVBNYqV wIpZ1SLnf8W9MWuF77w6Ayc+f/eQ5ydUNW0Q+cqgIpVasYHvydN2CnCiatDw9EiK2Cf4 Wd3Q== X-Gm-Message-State: AFqh2kqTUJDvziha0wNTinMmLGYFUvA0F7x7PTvol/vRo3ce9oQ9qsx1 2Y+e4Kw2pLLse50WXlQI6uM= X-Google-Smtp-Source: AMrXdXuoA73NZ+Z3iFqWAxu4G6uvxB5rCJdSWOYyYJZzGXnBuH6ZBsR7lHoreRNKNFxrBe5FW1KiPA== X-Received: by 2002:a17:906:30c2:b0:7ae:c0b:a25c with SMTP id b2-20020a17090630c200b007ae0c0ba25cmr8067700ejb.13.1671812800819; Fri, 23 Dec 2022 08:26:40 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id bx4-20020a170906a1c400b007c0e6d6bd10sm1539009ejb.132.2022.12.23.08.26.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Dec 2022 08:26:39 -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, Krzysztof Kozlowski Subject: [PATCH v3 1/2] dt-bindings: iio: adc: ep93xx: Add cirrus,ep9301-adc description Date: Fri, 23 Dec 2022 17:26:35 +0100 Message-Id: <20221223162636.6488-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-20221223_082645_519406_6425C468 X-CRM114-Status: GOOD ( 14.82 ) 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. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexander Sverdlin --- 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 Fri Dec 23 16:26:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13081027 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 8223CC46467 for ; Fri, 23 Dec 2022 16:28:16 +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=OjXsW5fzKtn1FBU9L0FlWW9ERob1VE/PerFIwAV9+G4=; b=IXX+8nPvl1hj9i xUbJJmJ+dSd2dTzSgIB2YeadDgcw+C/jlhYx+ZHu3w6sdXZ6USgAl+6ylUoGYMJ4gOBtpaEX5IcPj 7SLCIfgxer6I3LYizOPA9gA8SIbctNSNprRI3i/dCnFGmCL2hiCiY5Avw8o9aU0izmFUe2XqyOmq2 DfhC2OBqqiVn3eN9m/45jOyF3yJ4U5mUyQvezTSJQvs0s/XscFgnTsSYy7Zcni/gGMM2iB6XEt9y5 XZ1sXeWIALMnal7CCdwGWyiFW5hQiEz2RoJnDr5mVuAL5I9Z3DiXl9c2y6NYHzZDPwhzC7kyPrDoL 3mpbuUeFqmQcy682cvJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8ksy-009yBY-3r; Fri, 23 Dec 2022 16:27:04 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8ksf-009y1p-V3 for linux-arm-kernel@lists.infradead.org; Fri, 23 Dec 2022 16:26:47 +0000 Received: by mail-ej1-x632.google.com with SMTP id x22so13040962ejs.11 for ; Fri, 23 Dec 2022 08:26:43 -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=wxDL+X8NmnukiauYcA33D3M1w50IAdYmljuXwdjMwII=; b=Ic2NXkxd20lD/6DOmo7za4NfqIesYZ5KwzWGj7PL1MVAd2X5VqAHmFFZkOritE9yWN Xi5samHQOW698C7ygZU0xxC2y46eMVFto07/yxTfKVCNuyXEOmuscQ/al+VDnTPri+SH UhIF5kv3Q2PgaXjY+y+WtJSSDEsjj026I1HnfcIOg2KCgH+nlb7fVhbtCu+/c4tu32XL wuVL7XghWdcFN7D8eL7jqcYBTvdsawX/JyHkRnX+Rg0H/PrebkBKbo1NlFOv6pKSBFGk 3urNCu1b3kktdvtW3pX4R7iA7BJCHV4ofK7zmO8Y8Tw/7CAmRhh+otuZpvulGkJUnTsD tb5Q== 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=wxDL+X8NmnukiauYcA33D3M1w50IAdYmljuXwdjMwII=; b=eM+ifZhDBrw25hfZ7nui1YLBuIT73NnQ4OPhKiYsy0JtV9KxXxsG5UA3hWeFMjdFrM nTazLyOGfpfaPv+QYdF0QM0Bxo17P4LXMWw87NVwCj/ty1IlEid7InsOF8YO7momm963 7kacaQnNJ9Rtmpf4hS9mhEuUQjNxLL8J0D14Nt8y0dwJEvP41cVo+b6x2CLf7KiEx7ah pw2/63m9Yol3Clpc21Ptx2aoPGmktCgyh+tPWYaLlxmzR96jlZV2BKmHKTd7Y93oCKI2 NT2YeYpwEoK3v6L0OeOBjl6TVsi50s6O10AVCVMjzD+8WpBD5/nn2t6FDQAwx9TxylU3 CORw== X-Gm-Message-State: AFqh2kr7A7gKuaEZvpPPcQBFkQzf6DRSKZWWoC0EInb4AiBIp8RlPcv3 xEc9Z7llDtILT3RFS6VLaAhOA1XK6fk= X-Google-Smtp-Source: AMrXdXsPIDPmGkpmye/C3rLElx/wzoe7cpMFawUaJnMnOf6cyBcP9awLfAw/jesDD6tBb7XqMmdw/Q== X-Received: by 2002:a17:906:5dd2:b0:7c1:7010:f413 with SMTP id p18-20020a1709065dd200b007c17010f413mr12371630ejv.19.1671812802210; Fri, 23 Dec 2022 08:26:42 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id fu19-20020a170907b01300b00781be3e7badsm1550295ejc.53.2022.12.23.08.26.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Dec 2022 08:26:41 -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 v3 2/2] iio: adc: ep93xx: Add OF support Date: Fri, 23 Dec 2022 17:26:36 +0100 Message-Id: <20221223162636.6488-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221223162636.6488-1-alexander.sverdlin@gmail.com> References: <20221223162636.6488-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-20221223_082646_058056_055B0939 X-CRM114-Status: GOOD ( 13.98 ) 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 --- Changelog: v3: Removed comma, of_match_ptr() protection and the ifdefs drivers/iio/adc/ep93xx_adc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c index fd5a9404c8dc..a35e6cead67d 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,16 @@ static int ep93xx_adc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_adc_of_ids[] = { + { .compatible = "cirrus,ep9301-adc" }, + {} +}; +MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids); + static struct platform_driver ep93xx_adc_driver = { .driver = { .name = "ep93xx-adc", + .of_match_table = ep93xx_adc_of_ids, }, .probe = ep93xx_adc_probe, .remove = ep93xx_adc_remove,