From patchwork Wed Dec 14 22:20:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13073622 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24C43C4167B for ; Wed, 14 Dec 2022 22:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbiLNWUc (ORCPT ); Wed, 14 Dec 2022 17:20:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbiLNWUa (ORCPT ); Wed, 14 Dec 2022 17:20:30 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94E2545EDA; Wed, 14 Dec 2022 14:20:28 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id bx10so1340802wrb.0; Wed, 14 Dec 2022 14:20:28 -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=f08SdDPxY3s7apm0pW8UKA50CDY6FJL0VeamqVNi2UA=; b=Yjc45udOXyFthyeieoMF0iG5GxAXVAOAm3WA9qfLuCaeCLmKptSOjG58ePgvuGXpi9 DWoQX4TPN2WILUT4d2fTwYi1ed4dWBz9Ime0tX4MGrTOhrIvaNDwfZH0zreHeBohxqsA aELRE8ls53U/xplxi7975YKZmQEsTykJopLLo2rjTBulTcqufV8dfOXu34eRKyqLH+bO yJKCWjl07uU+W9J/t0h9yH1bvUEkEfkwMdbOpTdtnH8pDbgfjPEftMq1F+65w0+/xmxF 93NV2qY1VGm5VwirQ0F6VCYhFUFp5Zr5gAbiZ4TsyjFcHlvO2l8AgdOM9Fv53RBal+61 aVXg== 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=f08SdDPxY3s7apm0pW8UKA50CDY6FJL0VeamqVNi2UA=; b=lMKSd0J8kEtdsaFDGG5b9mZmJ8QUrwszllqN5R6iAjw0xtxSXqovoHsL+VgC5parV4 aNOgIaYv35kmVYM03eXVkMfRjbA+a8yU+g3vVIjMO7OOF6YiDqDEsz6N8lqSawc4m8rC nKXPuE1+noO73mCa9KjdRm4avvgVw41uzAEaUIsAAk9RjFAcWpJYj6sJZJA3+uywueJo Pbw4cEucnvLb8Suv7/58XykretQ8TknfLy4rW9YEUZZnUCc8lrkvtFxiJXyRl9ootUeZ wb4zUCSHXAk3KgJhvLJB1r3VbEXVluiPjSA++tIBCJoYjaA18LWGlEQHJNnFvD2lavQd TryQ== X-Gm-Message-State: ANoB5pnSvV6D7iKX+oLOd67ac2ctNckBFdIgb1fZr8x4v8LqLIOk0QlK 1ITA1flVlTu15gdfiBZf3ZkAL4XNdwFOrA== X-Google-Smtp-Source: AA0mqf7HYjkDNlcQozVgR36OzLerd5FB4x0I+KKgj+etRfLwfqEbTkYMiL6WxHZlYFmXFQhdZ2aIZQ== X-Received: by 2002:adf:a45b:0:b0:242:64fd:3e05 with SMTP id e27-20020adfa45b000000b0024264fd3e05mr15823475wra.53.1671056427012; Wed, 14 Dec 2022 14:20:27 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id k17-20020adfb351000000b002423edd7e50sm4208950wrd.32.2022.12.14.14.20.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Dec 2022 14:20:26 -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 1/2] dt-bindings: iio: adc: ep93xx: Add cirrus,ep9301-adc description Date: Wed, 14 Dec 2022 23:20:23 +0100 Message-Id: <20221214222024.951984-1-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Add device tree bindings for Cirrus Logic EP9301/EP9302 internal SoCs' ADC block. Signed-off-by: Alexander Sverdlin --- .../bindings/iio/adc/cirrus,ep9301-adc.yaml | 58 +++++++++++++++++++ MAINTAINERS | 2 + 2 files changed, 60 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..d0fd24d1be04 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/cirrus,ep9301-adc.yaml @@ -0,0 +1,58 @@ +# 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 + + clock-names: + const: ep93xx-adc + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + + adc: adc@80900000 { + compatible = "cirrus,ep9301-adc"; + reg = <0x80900000 0x28>; + clocks = <&syscon EP93XX_CLK_ADC>; + clock-names = "ep93xx-adc"; + 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 Wed Dec 14 22:20:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13073623 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CE26C46467 for ; Wed, 14 Dec 2022 22:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229741AbiLNWUe (ORCPT ); Wed, 14 Dec 2022 17:20:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbiLNWUb (ORCPT ); Wed, 14 Dec 2022 17:20:31 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D64D45ED2; Wed, 14 Dec 2022 14:20:29 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id k22-20020a05600c1c9600b003d1ee3a6289so514143wms.2; Wed, 14 Dec 2022 14:20:29 -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=wPREbJk824mHynEMZOnSi0K0a5V18kJznKBGD4RRywY=; b=l66GEwC5C6VAS63K9J3rZjKXv9Ah6JEmGkuUGTVHgliCPY1cXbu5ewkG01mSuzfOXD tDbxZKkVQiouTZLeMmdg8ADhLgjvkP2wFX/bPfh+phz68l/x5yxvzk2PuceUI81df6Wn cOjmzuKX0dQJMpWSv6CzEZySAEl9bbDI5wBAt9rXkH0czm+jeEvmQg+aLeZ8gYzFAYD6 mV29/0ZPxC6sI/8oT/T2Cc3aUQw6lvAFKYpQrlfEFWIQPSTMebp8pO0puAK+W6JX1SPO 8Bgo844ywOv1nreOSxlJtW45S4yK6i7govngZIKnx73r0zaR33+EmSbRLTWrl8pAEcue gQTA== 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=wPREbJk824mHynEMZOnSi0K0a5V18kJznKBGD4RRywY=; b=2xCP8VQrXdR9Nx0hw1Ef904S7NwyZcD1qXs50d6g1LPq87yc7odgwN2vJhOuTws7cn pxDYb7s5j24J66Itwbixd1FfGzW6H6FjmIqRJZ84tNn43pl/4USEd/sJ4VpXcOZ1edWB Fjrgc11RBPlKBewNPS6s5IxqeTeg8Ca++sRBcMV4cjaMFVNtOpc8KTKEFx7mqj3mM4c1 KxOZ/P4A0pRRfVyaoPe3e8RVQOZu6CXwLHJ6MO+B3ompRAn0S7F/3Pk17h6aEJqN9OAn 3LUQahpLJlXJx5ivoXJTnKswz6qVKp121ZTkrVxeAGy7Hf8jJsmPE/67vqn4xsNVQRBk CeFg== X-Gm-Message-State: ANoB5plggdx7dV0V06ZBzJ5ngPBlrzlM8tfUyj0T5TeJlPScp8iChJ3D 91wzM6gjj0WQ1PplXK3hvGeaV/HAH04P7w== X-Google-Smtp-Source: AA0mqf5Ji4XUil9erQ2oeZMLnbnZyZcIGBqTvrqtrXfVbfgMHW3zGU9xw1FA1j3kxScoRn5UhzdNJA== X-Received: by 2002:a05:600c:1d98:b0:3cf:74b4:c3c8 with SMTP id p24-20020a05600c1d9800b003cf74b4c3c8mr20435849wms.17.1671056428101; Wed, 14 Dec 2022 14:20:28 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id w23-20020a05600c099700b003d1de805de5sm3512107wmp.16.2022.12.14.14.20.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Dec 2022 14:20:27 -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 2/2] iio: adc: ep93xx: Add OF support Date: Wed, 14 Dec 2022 23:20:24 +0100 Message-Id: <20221214222024.951984-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221214222024.951984-1-alexander.sverdlin@gmail.com> References: <20221214222024.951984-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.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,