From nobody Wed Dec 17 23:29:25 2025 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 06E64C61D9C for ; Wed, 22 Nov 2023 09:03:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235231AbjKVJDn (ORCPT ); Wed, 22 Nov 2023 04:03:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343575AbjKVJB0 (ORCPT ); Wed, 22 Nov 2023 04:01:26 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D42DCF4 for ; Wed, 22 Nov 2023 01:01:19 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPS id 1CFE5C4E67D; Wed, 22 Nov 2023 09:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700643676; bh=0b1oOIKSonoNpzqhYrexAH7NPPnUv6uLf+ZzCDCtDjc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=s+YXIoEoo/dp7X6bX6RpMGJAL3TPO/0fWA4VZRdMFKU4BNdpvz/0wp1A6ppiJCcIp jT5FEYe1j2ocMX9bWvE6aF4xpiJ2DWR9fFsgJNAOcMU/Dpmt/r5hKqhj10VYtXEkcs XItAxQ7ucYiL270/OPNkzywg5ld1+lKSW6Q4swTaL4RsF7sqFXEKh+ssUDYXBp1ab5 /RxSwrwLg21gvNF2752Izy9YD5sSCVGfObRR/fT6VZjEEswlfP2WwOGLrAhcISfuuD 8YFiXaBm/OgFpebG44UfSe8RwEcfGeqzoB6CeUoF/fqmCEe3B0beMnVvzbopYvqyys i8gLCVoxa4qUw== 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 0A5F0C61DB1; Wed, 22 Nov 2023 09:01:16 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Wed, 22 Nov 2023 12:00:12 +0300 Subject: [PATCH v5 34/39] pwm: ep93xx: drop legacy pinctrl MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231122-ep93xx-v5-34-d59a76d5df29@maquefel.me> References: <20231122-ep93xx-v5-0-d59a76d5df29@maquefel.me> In-Reply-To: <20231122-ep93xx-v5-0-d59a76d5df29@maquefel.me> To: Hartley Sweeten , Alexander Sverdlin , Russell King , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Nikita Shubin , Linus Walleij , Damien Le Moal , Dmitry Torokhov Cc: Sergey Shtylyov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, Alexander Sverdlin X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700643671; l=4467; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=5BHGSx0rvPz4xyQWEXwBhZIRB6xUAXP0jsfbP3JUPqk=; =?utf-8?q?b=3Du+NbkYcgvcPH?= =?utf-8?q?BPZ1uMc807B8+XPrq3vATcMYNI/EMFnVsvMCr3QbwLoH5izcR4ZgIOE8qpIkqExI?= BDZ6kfjKCAjlCrx3D9gGjW1yq0V8wXV3fCdsFxmGDoJcUmh3njex 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikita Shubin Drop legacy gpio request/free since we are using pinctrl for this now. Acked-by: Uwe Kleine-K=C3=B6nig Acked-by: Thierry Reding Acked-by: Linus Walleij Signed-off-by: Nikita Shubin --- 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 c60a9d3632dd..9afc6095d1c1 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -576,48 +576,6 @@ void __init ep93xx_register_pwm(int pwm0, int pwm1) platform_device_register(&ep93xx_pwm1_device); } =20 -int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) -{ - int err; - - if (pdev->id =3D=3D 0) { - err =3D 0; - } else if (pdev->id =3D=3D 1) { - err =3D gpio_request(EP93XX_GPIO_LINE_EGPIO14, - dev_name(&pdev->dev)); - if (err) - return err; - err =3D 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 =3D -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 =3D=3D 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 361984ef4c0b..ac08bd0e7572 100644 --- a/drivers/pwm/pwm-ep93xx.c +++ b/drivers/pwm/pwm-ep93xx.c @@ -27,8 +27,6 @@ =20 #include =20 -#include /* for ep93xx_pwm_{acquire,release}_g= pio() */ - #define EP93XX_PWMx_TERM_COUNT 0x00 #define EP93XX_PWMx_DUTY_CYCLE 0x04 #define EP93XX_PWMx_ENABLE 0x08 @@ -45,20 +43,6 @@ static inline struct ep93xx_pwm *to_ep93xx_pwm(struct pw= m_chip *chip) return container_of(chip, struct ep93xx_pwm, chip); } =20 -static int ep93xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pw= m) -{ - struct platform_device *pdev =3D to_platform_device(chip->dev); - - return ep93xx_pwm_acquire_gpio(pdev); -} - -static void ep93xx_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) -{ - struct platform_device *pdev =3D to_platform_device(chip->dev); - - ep93xx_pwm_release_gpio(pdev); -} - static int ep93xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state) { @@ -157,8 +141,6 @@ static int ep93xx_pwm_apply(struct pwm_chip *chip, stru= ct pwm_device *pwm, } =20 static const struct pwm_ops ep93xx_pwm_ops =3D { - .request =3D ep93xx_pwm_request, - .free =3D ep93xx_pwm_free, .apply =3D ep93xx_pwm_apply, .owner =3D THIS_MODULE, }; diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/e= p93xx.h index ea2b2c1074e4..fc4a2f9d4729 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) =20 #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); =20 #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; } --=20 2.41.0