From patchwork Mon Jun 17 09:36:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nikita Shubin via B4 Relay X-Patchwork-Id: 1948566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Nnz8xJWn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-pwm+bounces-2488-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W2lFR5FrZz20KL for ; Mon, 17 Jun 2024 19:38:51 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7F74E2837A7 for ; Mon, 17 Jun 2024 09:38:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 763A91946BA; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Nnz8xJWn" X-Original-To: linux-pwm@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43AFC194133; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718617104; cv=none; b=sxz+JFgc4wEHWDeuh+dTMoCgTeJUndyXAeLmOyQMBIiAWO+2WfbFxUiN5wnaVLHQUgyuPMGJn9msi4K178MF1tIcwItwsbtgvIw6d/ZgOWKcFsuF/1SA9al5zP8ID2IDtqgri3sQeqJDOBjMjOyfbOKgc3cYlqObZNMmHLcrSn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718617104; c=relaxed/simple; bh=3Q2bRQKoQu0LqnylJP2cSZjMQXfgAIE/N3cWrJixn1M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s6yGb5LNLPlF9Ql44NNwB0MrwhbAZByY/afPuTF8nijTxoqHjb0ZeUDz6LHT/5/eYoZHIaKOmSUGrFetycjmk7D/o0UtuoNzA3t0SBlLWKl1+omRHuYgxZrF2gFuXP6O2DC+JYSw46RRz/eMRCSyPNhn24PhWqEHH/tb0sGCbzI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Nnz8xJWn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 24350C4DDEC; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718617104; bh=3Q2bRQKoQu0LqnylJP2cSZjMQXfgAIE/N3cWrJixn1M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Nnz8xJWnXiB4YNsmlmclW5nWGuEbYMPMivNIqLoP5QGmO0DyGkvJcb4a4s2QY76aE WdoA6Pw5C9ghdm9AshjJ/YDEsLmtjW2KXJ4sdAxQc4coyR7QM/8n+UaTS93KAzTQ8l iaygKQUtA69bnncTjbvL0Q3vx4H6doMSX9KdNEfJ7mY8sABmD5y/5dGYqINOFpPuss wNHteJkNQfrDN4kb1F93DWd2V7J+ZV08ROZGVKI3aeIrT7Bn3rx4vtpz+aBX3H8tXi d8ugvKDGH+tzEaqLzUtKYBTQ/GktAjWQIEKgQm/R1HigCz28F0CUJ166cgA6eKyRFz LUl6hrSjy/xGA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 183FEC2BA18; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Mon, 17 Jun 2024 12:36:46 +0300 Subject: [PATCH v10 12/38] dt-bindings: pwm: Add Cirrus EP93xx Precedence: bulk X-Mailing-List: linux-pwm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240617-ep93xx-v10-12-662e640ed811@maquefel.me> References: <20240617-ep93xx-v10-0-662e640ed811@maquefel.me> In-Reply-To: <20240617-ep93xx-v10-0-662e640ed811@maquefel.me> To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexander Sverdlin , Nikita Shubin Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Krzysztof Kozlowski X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718617100; l=1848; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=z+2yOwm4hvQxzJhJWQahTMtiq2gz+415iGkW4eGQ8Eg=; b=CRV13sYmrmwzQgHe+Z5xUUu5g1+/MVhrjswJppoRx9OFYCKsp0DWNQJXjApeTIE8nonr9+lP/B2J V9tuykN/Bwl3QAbiLrh+lObNxkI479WXr855R+wRLeHvmakHm/0Z X-Developer-Key: i=nikita.shubin@maquefel.me; a=ed25519; pk=vqf5YIUJ7BJv3EJFaNNxWZgGuMgDH6rwufTLflwU9ac= X-Endpoint-Received: by B4 Relay for nikita.shubin@maquefel.me/20230718 with auth_id=65 X-Original-From: Nikita Shubin Reply-To: nikita.shubin@maquefel.me From: Nikita Shubin Add YAML bindings for ep93xx SoC PWM. Signed-off-by: Nikita Shubin Acked-by: Uwe Kleine-König Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/pwm/cirrus,ep9301-pwm.yaml | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/cirrus,ep9301-pwm.yaml b/Documentation/devicetree/bindings/pwm/cirrus,ep9301-pwm.yaml new file mode 100644 index 000000000000..903210ef9c31 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/cirrus,ep9301-pwm.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/cirrus,ep9301-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic ep93xx PWM controller + +maintainers: + - Alexander Sverdlin + - Nikita Shubin + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + oneOf: + - const: cirrus,ep9301-pwm + - items: + - enum: + - cirrus,ep9302-pwm + - cirrus,ep9307-pwm + - cirrus,ep9312-pwm + - cirrus,ep9315-pwm + - const: cirrus,ep9301-pwm + + reg: + maxItems: 1 + + clocks: + items: + - description: SoC PWM clock + + "#pwm-cells": + const: 3 + +required: + - compatible + - reg + - clocks + +unevaluatedProperties: false + +examples: + - | + #include + pwm@80910000 { + compatible = "cirrus,ep9301-pwm"; + reg = <0x80910000 0x10>; + clocks = <&syscon EP93XX_CLK_PWM>; + #pwm-cells = <3>; + }; From patchwork Mon Jun 17 09:36:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nikita Shubin via B4 Relay X-Patchwork-Id: 1948591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=TWomhbpO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org; envelope-from=linux-pwm+bounces-2489-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W2ldB6WnGz20Wg for ; Mon, 17 Jun 2024 19:55:58 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1EC6CB32518 for ; Mon, 17 Jun 2024 09:38:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AA6E1946D5; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TWomhbpO" X-Original-To: linux-pwm@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C4CB194147; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718617104; cv=none; b=t7ze8cA1PTJZHqwkNW0ATVefg1M3J4X6w9rP0Rl++G0/cF4GIPC+nrBvpykz57AGlhmUo/Eez0QzsvGp/fZRGsXGa0CQxDIX4P1x48LYN8GwMhhQhdlaYIJN4KubOfq5/fagpUWD2fEouaWfQHwoT+YJm6iqhesy1FJRp/ItQK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718617104; c=relaxed/simple; bh=OCL2OwGmR4U99+vK5ZiqzBF+MvBHnojmd1wpSc1QfaA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WXY1l2iFZNePGv/RhYNZJwcc6fMJz+bUUPQmM3TEAR8+v0HJqfLyU6mj8h2dmOnDMoR5c6ZyjzQN4jkyh1Ci60GFFO1Ox0y8fLaRYFfa+STfGGkoD1mEP0AQ1XXkdYW62GOJp+whdtDkd3Usmj7Y+TNjJMMVf6eKPmPtdakaFkc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TWomhbpO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 2EB02C4DDF3; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718617104; bh=OCL2OwGmR4U99+vK5ZiqzBF+MvBHnojmd1wpSc1QfaA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=TWomhbpOVZX3qLUGyBVFwsPbBt0lcVWsNONA/2xmbjDU+oxefBKFXC6n2i4LUpYHz hLS6BiqxZp9oD2BbWxwsjAqadTJoc1+frsghW0oHCaq9xPJ/uEeyHGbJKJz9ZXhWIL PbbZjivpxeR8MtXTt1RZOWspAkwKyykShfQ/1fMSZBGZp+WiUDvL2TTnQi+jiI592g jrKbpNxpYX7Gkh9JFt5QE88NtLC3zORQAiLd0zcASlW4L81BYxIS2HEObLRyVl3MLt NPR20zW/n6gyulhbISIdDp3Vg8DGZKabwh62LbCCdSiABUwADgjg/D1seV/vxsBC+N Vo0nWjyziqtIQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2550AC27C7B; Mon, 17 Jun 2024 09:38:24 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Mon, 17 Jun 2024 12:36:47 +0300 Subject: [PATCH v10 13/38] pwm: ep93xx: add DT support for Cirrus EP93xx Precedence: bulk X-Mailing-List: linux-pwm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240617-ep93xx-v10-13-662e640ed811@maquefel.me> References: <20240617-ep93xx-v10-0-662e640ed811@maquefel.me> In-Reply-To: <20240617-ep93xx-v10-0-662e640ed811@maquefel.me> To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Andy Shevchenko , Andy Shevchenko X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718617100; l=1236; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=ct0L8elpTvHj/aUU/OBJY6iv8PSAIzqZyzV/Ce2gcnk=; b=z7Fop/7ZnjsWnAMWHaWVTmWko0s81Hd6kfLwESWGhEDgO8WA/qW+jT3Wn8t8kSoVmZcrDt01L1M3 uvYYs3SUDFQAvTPd8cSioxXiJctvN8lII689VxSjViD7JelCIohS X-Developer-Key: i=nikita.shubin@maquefel.me; a=ed25519; pk=vqf5YIUJ7BJv3EJFaNNxWZgGuMgDH6rwufTLflwU9ac= X-Endpoint-Received: by B4 Relay for nikita.shubin@maquefel.me/20230718 with auth_id=65 X-Original-From: Nikita Shubin Reply-To: nikita.shubin@maquefel.me From: Nikita Shubin Add OF ID match table. Signed-off-by: Nikita Shubin Reviewed-by: Uwe Kleine-König Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-ep93xx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pwm/pwm-ep93xx.c b/drivers/pwm/pwm-ep93xx.c index 666f2954133c..67c3fdbf7ae3 100644 --- a/drivers/pwm/pwm-ep93xx.c +++ b/drivers/pwm/pwm-ep93xx.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include @@ -188,9 +189,16 @@ static int ep93xx_pwm_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_pwm_of_ids[] = { + { .compatible = "cirrus,ep9301-pwm" }, + { /* sentinel */} +}; +MODULE_DEVICE_TABLE(of, ep93xx_pwm_of_ids); + static struct platform_driver ep93xx_pwm_driver = { .driver = { .name = "ep93xx-pwm", + .of_match_table = ep93xx_pwm_of_ids, }, .probe = ep93xx_pwm_probe, }; From patchwork Mon Jun 17 09:37:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nikita Shubin via B4 Relay X-Patchwork-Id: 1948581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=CIYpCOyS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.199.223; helo=ny.mirrors.kernel.org; envelope-from=linux-pwm+bounces-2490-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W2lGg649Bz20KL for ; Mon, 17 Jun 2024 19:39:55 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 13C6A1C229B9 for ; Mon, 17 Jun 2024 09:39:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CCD3195389; Mon, 17 Jun 2024 09:38:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CIYpCOyS" X-Original-To: linux-pwm@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F00F194C90; Mon, 17 Jun 2024 09:38:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718617106; cv=none; b=Vgy8q5RbTsIqyVrLfJT8+cORAhMVPM43T73Ag4fo7YUE18WDEVGngMn8wE5kFUFD1FgmcRPx1VTu2LiiqpSoql9YNPsIu0QX1mccORoBCIpqR3PXBJyS2ku5DneuUuIF4RHTNhE+RaLyxHFpGauXg2opfVitd2VUJGoje+iPFqQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718617106; c=relaxed/simple; bh=TLn4iY9WirIpra11C90u3n8gyc+H+7TAKuLu1AUc2WY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LGL77mG3h1TI4VJm82ldFdL6pocvUQSrWqDsnboRGQGu4tH8Tn7ygNnfTpgLNg7B1URpkdm4j6uLhyxYZkE9rLSXMSh/Weob89DUrCn5FkSsqQIABaDvltG+nzSEUUYVAqgWEOghUm3I/RSFJBEDpdceQscLi0r89yVAaf/En00= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CIYpCOyS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id BE4C2C4DE11; Mon, 17 Jun 2024 09:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718617105; bh=TLn4iY9WirIpra11C90u3n8gyc+H+7TAKuLu1AUc2WY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=CIYpCOySLGbWhuP7K0T2rHPa8LKD8QphsyI6S1E5cRXz4UAJkVpG9hIfzKduSrIpP UdZMaIP2yj79tTsM4G2uaC1IqvfhnVsW5COkPhEbrIcLBu2brr5tN2ujODIOpMCFGW ZZKfQ0SaBb5RhgN7ESC2PiycEMqqGAoScLRBPgIF91Cxd8/oNP7oN0VLbFNywZIKid RoCpggr0LfCKSX8I8ZUCFCOdJLRtsM/k7tlvh4MFQB3xQw8JBT+2J6BGevzCyzYu5o SqqDKk/OPui/ZKlqzwXFFygOn6g/mL4N19iXPquxD4EeJHfy6HiTlatzAcZoQP8K3O 8LJ+XKGnzI2Cg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6687C2BA18; Mon, 17 Jun 2024 09:38:25 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Mon, 17 Jun 2024 12:37:07 +0300 Subject: [PATCH v10 33/38] pwm: ep93xx: drop legacy pinctrl Precedence: bulk X-Mailing-List: linux-pwm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240617-ep93xx-v10-33-662e640ed811@maquefel.me> References: <20240617-ep93xx-v10-0-662e640ed811@maquefel.me> In-Reply-To: <20240617-ep93xx-v10-0-662e640ed811@maquefel.me> To: Hartley Sweeten , Alexander Sverdlin , Russell King , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Nikita Shubin , Linus Walleij , Andy Shevchenko , Sergey Shtylyov , Thierry Reding Cc: Damien Le Moal , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, Arnd Bergmann X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718617100; l=4449; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=9tWs5wPLeKECQlcQ9rkIh26LRGvwgfxOpMK+JfxreaE=; b=vIt9ySvjKsuw8bnZ/AcGDwON6HLgWWY4qE+vPXKiuoYq8c2n4DAzyE+FYmd4KA+r36B9KzSojifW wKV/jHcgBI39+bpyuVa25ii2Rx2jATBzLbgroA79ss3Qmbo0FuLA X-Developer-Key: i=nikita.shubin@maquefel.me; a=ed25519; pk=vqf5YIUJ7BJv3EJFaNNxWZgGuMgDH6rwufTLflwU9ac= X-Endpoint-Received: by B4 Relay for nikita.shubin@maquefel.me/20230718 with auth_id=65 X-Original-From: Nikita Shubin Reply-To: nikita.shubin@maquefel.me From: Nikita Shubin Drop legacy gpio request/free since we are using pinctrl for this now. Signed-off-by: Nikita Shubin Acked-by: Uwe Kleine-König Acked-by: Thierry Reding Acked-by: Linus Walleij --- arch/arm/mach-ep93xx/core.c | 42 --------------------------------------- drivers/pwm/pwm-ep93xx.c | 18 ----------------- include/linux/soc/cirrus/ep93xx.h | 4 ---- 3 files changed, 64 deletions(-) diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index b99c46d22c4d..4ddf1a4cba33 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -577,48 +577,6 @@ void __init ep93xx_register_pwm(int pwm0, int pwm1) platform_device_register(&ep93xx_pwm1_device); } -int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) -{ - int err; - - if (pdev->id == 0) { - err = 0; - } else if (pdev->id == 1) { - err = gpio_request(EP93XX_GPIO_LINE_EGPIO14, - dev_name(&pdev->dev)); - if (err) - return err; - err = gpio_direction_output(EP93XX_GPIO_LINE_EGPIO14, 0); - if (err) - goto fail; - - /* PWM 1 output on EGPIO[14] */ - ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_PONG); - } else { - err = -ENODEV; - } - - return err; - -fail: - gpio_free(EP93XX_GPIO_LINE_EGPIO14); - return err; -} -EXPORT_SYMBOL(ep93xx_pwm_acquire_gpio); - -void ep93xx_pwm_release_gpio(struct platform_device *pdev) -{ - if (pdev->id == 1) { - gpio_direction_input(EP93XX_GPIO_LINE_EGPIO14); - gpio_free(EP93XX_GPIO_LINE_EGPIO14); - - /* EGPIO[14] used for GPIO */ - ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_PONG); - } -} -EXPORT_SYMBOL(ep93xx_pwm_release_gpio); - - /************************************************************************* * EP93xx video peripheral handling *************************************************************************/ diff --git a/drivers/pwm/pwm-ep93xx.c b/drivers/pwm/pwm-ep93xx.c index 67c3fdbf7ae3..994f89ac43b4 100644 --- a/drivers/pwm/pwm-ep93xx.c +++ b/drivers/pwm/pwm-ep93xx.c @@ -27,8 +27,6 @@ #include -#include /* for ep93xx_pwm_{acquire,release}_gpio() */ - #define EP93XX_PWMx_TERM_COUNT 0x00 #define EP93XX_PWMx_DUTY_CYCLE 0x04 #define EP93XX_PWMx_ENABLE 0x08 @@ -44,20 +42,6 @@ static inline struct ep93xx_pwm *to_ep93xx_pwm(struct pwm_chip *chip) return pwmchip_get_drvdata(chip); } -static int ep93xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) -{ - struct platform_device *pdev = to_platform_device(pwmchip_parent(chip)); - - return ep93xx_pwm_acquire_gpio(pdev); -} - -static void ep93xx_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) -{ - struct platform_device *pdev = to_platform_device(pwmchip_parent(chip)); - - ep93xx_pwm_release_gpio(pdev); -} - static int ep93xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state) { @@ -156,8 +140,6 @@ static int ep93xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, } static const struct pwm_ops ep93xx_pwm_ops = { - .request = ep93xx_pwm_request, - .free = ep93xx_pwm_free, .apply = ep93xx_pwm_apply, }; diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h index 8942bfaf1545..f6376edc1b33 100644 --- a/include/linux/soc/cirrus/ep93xx.h +++ b/include/linux/soc/cirrus/ep93xx.h @@ -37,8 +37,6 @@ struct ep93xx_regmap_adev { container_of((_adev), struct ep93xx_regmap_adev, adev) #ifdef CONFIG_ARCH_EP93XX -int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); -void ep93xx_pwm_release_gpio(struct platform_device *pdev); int ep93xx_ide_acquire_gpio(struct platform_device *pdev); void ep93xx_ide_release_gpio(struct platform_device *pdev); int ep93xx_i2s_acquire(void); @@ -46,8 +44,6 @@ void ep93xx_i2s_release(void); unsigned int ep93xx_chip_revision(void); #else -static inline int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) { return 0; } -static inline void ep93xx_pwm_release_gpio(struct platform_device *pdev) {} static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; } static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {} static inline int ep93xx_i2s_acquire(void) { return 0; }