Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3206811lqp; Tue, 26 Mar 2024 02:45:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWI97WUSbrrzGM4esPc0l9xp1nACkyMbBYpXDanhaLd57QfAN+XG6HtaLbliztgF1Nzqnt4UiM962wTWTqPL26MlYpF4Nvnt/vSF9LRXg== X-Google-Smtp-Source: AGHT+IEA+8pcmKHdbKlQharJKyjOmPN//tHeNEDjRC4nU6Qr3EKwbiIOgoo8ymjqvcRjzTD34aPV X-Received: by 2002:a05:6a20:8906:b0:1a3:7e72:316c with SMTP id i6-20020a056a20890600b001a37e72316cmr6961919pzg.31.1711446309917; Tue, 26 Mar 2024 02:45:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711446309; cv=pass; d=google.com; s=arc-20160816; b=bHwj7BWqCOA/zZYmcy+gGlj5f48X/SYJPQE3peXR7RmmIVJkmRBI0O/8WwTB6NK+qi ZhUtjaQj3hcbM4F4Suc+v/p0Mj9u+e1ruHLKwiAu7t1FAQytwz3XiKulDnycq/XvKJ1p uGlMizNR0AKMwrkpHgr6Y0SOkyT9TAIaDkdh6EcpEzEPr+1WsljmbxI/OnQ/xcp0LkL3 2eFy/crGbq/9+200RfYdvOZS5kMtVDfCjr6YeXNeh2nYhhlU+BfJYRfc4IcfYFAOZS85 e3ZKJ0HXM42CpwGNCXGtWkBZh1r15ajEfSK/DzdUmkG8ZVWTKLpEncO3XpupGHCpiGsB aBdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=e9GUx6RYqpXhB9Nu/kZ70O54clVfNKYCLJg3YBUTd6Y=; fh=TUlWEbs4BtZSZkae35yefXcYPNoksqg0f9DiDVa7QV0=; b=VxPiCfXDhmaM8qNCitPs4A441aOFuDGDHP2mPQmqA4+j+jsrig9GGfMnHpEzyTEOn9 ak6JiVyQZSlByl7Uo2Qw0GfN8y7unNhA+taheIUwrSDDh81itJoFMUiz8PcXNLAlBHPo BazTFYppx4JmUdq+KYYi+ByN88pBAmk3B07Wl0+RurQ5Jm7FCbaMPVexLmJDYYkWjNZJ u10yB9+mVRLVdzwtiYHkr07szJqhLdOYq0P65Qe9hN4JkwoKMFEa9HP9gELdjSFrvv6n hOjd7RfcIVXOJa8QtrgeOlae0a5UvcQkNqf6DK4DAOXJZ/+I0Zc65VISLtVDmbn8Hw9r UUzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OKsT6ole; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118670-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 91-20020a17090a09e400b002a03864ce2bsi8876043pjo.171.2024.03.26.02.45.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 02:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OKsT6ole; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118670-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 56478301AF2 for ; Tue, 26 Mar 2024 09:33:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D94E212EBEA; Tue, 26 Mar 2024 09:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OKsT6ole" 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 A3A3373525; Tue, 26 Mar 2024 09:20:43 +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=1711444843; cv=none; b=pn66TMh78Yx1fQLrqS3HeiPwckb8+OioZ9gqqGQBufo7RRZ9x3nHBaB++PUrZ3sB2anriqsDaxvTCy93ABHart6BBTJikb1EoARFNy0yiZTjAfUUjFvZLUzin037tdXKmsztrBWThBGMyh+3lDuHNDqIyqkVMuxo1mVcta/NnGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711444843; c=relaxed/simple; bh=vFjngrZeEoq8sH0Bscvgq0VlTmRBzBhtIbMiB/Mt7Co=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rIR3iyNTg99RwPqxjapvy2ILrVjK6tiPJx6Qdc0HYo4mDc2L3sD6OkNMqfOepPWRLQ4Jle24iwykjfGbLq8XJhNrw7fIbPAJmUJOL6A0gm+FW/aNMSC3x/us1y+SlFhygKXxHqnLy/nzezBBez5MoEjRQIEsFKP5RitPVHkGVN0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OKsT6ole; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id CAF0AC3278E; Tue, 26 Mar 2024 09:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711444842; bh=vFjngrZeEoq8sH0Bscvgq0VlTmRBzBhtIbMiB/Mt7Co=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=OKsT6oleeJuigmWrUM+0+DOtsPX7jbu2mzr2rE22fqa2HUqGUCo0yP2jtfnSJRdl1 D6+oatqXo13DeZkQXkUQ+LqO9uLqMqvqhe2SSV28fg3SgPAIYsqLDhZLovk+rikh1y XVCoBtSlTj8N2dx+UgMBw308czBjTc/WZix3zHmI+wHckdZiYv6KWudC3l2edu++vM sGdBPKLqbJsB8neKwbGGcKBueQGKMl4Vg7L4O6CTd/VgNhdrUOc5XWIkiR02tc3ovr 9SQ4XJafPqd5WrCRt9QfIivK62Ul6VgO/YxztnAlsJb/+n4pU00D03JsrkRygBy8jG 0wgqsPfZo2bIg== 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 AEBE3CD11DF; Tue, 26 Mar 2024 09:20:42 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Tue, 26 Mar 2024 12:19:00 +0300 Subject: [PATCH v9 33/38] pwm: ep93xx: drop legacy pinctrl Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240326-ep93xx-v9-33-156e2ae5dfc8@maquefel.me> References: <20240326-ep93xx-v9-0-156e2ae5dfc8@maquefel.me> In-Reply-To: <20240326-ep93xx-v9-0-156e2ae5dfc8@maquefel.me> To: Hartley Sweeten , Alexander Sverdlin , Russell King , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Nikita Shubin , Linus Walleij , Dmitry Torokhov , Sergey Shtylyov Cc: Thierry Reding , 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=1711444837; l=4449; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=spARdgbKBuuWnnbjpo1qWIl9UuS2EbkYHg0kmK3FPj4=; b=votECEEU575q5GoWWRzZ2MKIaptIcLnFlZedZPKft4IZzpeTPq5yZjQz5qrrFNhecvdgFt0mN+kY SwcGFLLyA2xQ16jlKU8IlPgpoCiIjEQhwbXHkXKV7ZjiLPeuy12I 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. Acked-by: Uwe Kleine-König 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 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; } -- 2.41.0