Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp203468rdb; Thu, 18 Jan 2024 00:32:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyQb2YgPuTR0UpajdApMZIKHoE6fxQ9q/rusjD7BIOv9nbwH3mPzhV1gdrZoSknvntB0L7 X-Received: by 2002:a05:6a20:8e07:b0:199:8d8a:a746 with SMTP id y7-20020a056a208e0700b001998d8aa746mr573981pzj.29.1705566742947; Thu, 18 Jan 2024 00:32:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705566742; cv=pass; d=google.com; s=arc-20160816; b=oZkMz+s2n0P5pXTRxgN1pBboCFnnxyEWOSQEJg7SUPb5GUktnBpPGcTY7mO0cuyKrp B24+xoNCsJKgGQ2cHqwQc6QbjWkrLXL0yqztLN6AngAoxtDTAwBRO4A4FlYptkOGpME3 qe6x58pV98G1XMRbr5GgXPv3s0SkEXnM099Mx57JYsN6xU9YePKgjA0gc7qcTMrwGISB 7D2pU2Z06mbZFbSKrbIHkzPh5uWfK3zeGJ9MzogvNqdBAw0TJd3y6VPtSokiwTjCNaIe YUTXj72m5wAXikU/rwmuuH/EaqAv+Qh0N5oZb3272cTx8v2sCUp76G9tNKyL1BHO+f+9 dKUw== 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=mWLT7hO4vuFgOyKd0PZvXVo0dXbDr21/Q3dsdwCNSvA=; fh=6+FfLPFfhBkrGLTlIjmoSX6GM6TPPv8u5KtR4uIIZCU=; b=inLTgQ/VXzt14UvmdOzlW3wyIMh715sJvn2kdpqqRl4dzOOAsB9KnLKTBS+7k/lz3F aC2fHjX/nPTRN+BJky3K4HRVIj8/3MWFwIukSyKaniOIiy00opu4o/rY2N2USHCWsukC BtuFEhPh2Tm+Ws4pmML1xsy5ndMmyYBcWB60vV3C8Q5/4Qb5zLhrqtXwV5FK6h2rVxEF th5K0UeIj1iKVzI4PKb8XVj3NXetO7/EzPpaFQsv+iv3ec9S4FsJ+9qY6SCLMNbI92IJ 1blbl9Ca/vPwc9UgQ/N/dcJ78FLxk58tHrCHIGBB6QPokRKXehpwbS7hEvhaFZyUlpNR W1Lw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V9eiBwBm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29884-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 m3-20020a633f03000000b0058afac51c12si1095477pga.545.2024.01.18.00.32.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 00:32:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29884-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=V9eiBwBm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29884-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 A20AB283A05 for ; Thu, 18 Jan 2024 08:32:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE553321A1; Thu, 18 Jan 2024 08:23:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V9eiBwBm" 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 8B02420B19; Thu, 18 Jan 2024 08:23:00 +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=1705566180; cv=none; b=Hqo8J6k/D/P5cESqoEHNb7cKbEDJHvS6hTWr/6nV46Tzl0K8cIBP3t+KzrT3YWOeH9QeaL+yzv6D+i48NzKK/jKklL9xBYHlEAmUU06tkbHGFRRGeRqzyCgmn5Z9SpDhnIzKSuJAm0qxKIkahDqQBEhRaWpeumBcaontL09vx+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705566180; c=relaxed/simple; bh=0AP5jOr0kcxnDwVy44nLG1Q6cTn3VJnAgm1Ofg4TYoQ=; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; b=XnHeWrnZ3fOykjKSH3I218MA7YvGW7xtPZVQ/rdbGrduyyJ+mBsyBHzBIhEGjFRnlc0panTYV66pPk9XIYfaOe0CVZ88pU6ybxDfX2/jEcQ4YQevvUltGtP2rjv7M/TJAV699bOsEs2WeVK/1xGmqZYFegJsnlTQiEpiQoz0r1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V9eiBwBm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 56542C4E67C; Thu, 18 Jan 2024 08:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705566180; bh=0AP5jOr0kcxnDwVy44nLG1Q6cTn3VJnAgm1Ofg4TYoQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=V9eiBwBmVJizwx9kN3fY2dZWZmXkRA9WyoaKxKs/wo6fqyrPCdiS2dXnXyk2144Wd cxW0jngPkOr05HywUF8L2FNkA31cn8uu1Od3BKaLHo8UEnEOqUDUM/EVYq4RaHwcFo il6reDafINpdPMF/JqJnWruFkcYLRJClCaKbRFFdAjaJktMH/k4MPcVcsA4Er4pf3o I8gLOae6cwUmD4N/I5gNSOeJVeRCHbCT+MvE4SAk3ckUbIRiCYep9xE4DkHFb53kNi D68EVw1I/x7eQapR73m5ZQGP/wozB/eLWzD+QmqcppGs2CsjZUF3PbaWZg9meQJiJs 7KP++IoKiHw7w== 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 41B49C47DCF; Thu, 18 Jan 2024 08:23:00 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Thu, 18 Jan 2024 11:21:17 +0300 Subject: [PATCH v7 34/39] 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: <20240118-ep93xx-v7-34-d953846ae771@maquefel.me> References: <20240118-ep93xx-v7-0-d953846ae771@maquefel.me> In-Reply-To: <20240118-ep93xx-v7-0-d953846ae771@maquefel.me> To: Hartley Sweeten , Alexander Sverdlin , Russell King , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Nikita Shubin , Linus Walleij , Damien Le Moal , Dmitry Torokhov , Sergey Shtylyov Cc: Thierry Reding , Andy Shevchenko , 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=1705566176; l=4445; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=TKmzJsDbCt6jQiF+EbUv2e6fJpGA78evP9E+SCft8XM=; =?utf-8?q?b=3DuTNETrcDdVn4?= =?utf-8?q?grQ+DzKgLck9mFseBIzYK2sG5C9k4qes3E0+i+e7QVxCqZcwd/eJodiHDoULoENl?= 5ehihrh2BSKrZqJonrvKYHz8cMMb177v66ZbH8QXFJpdvNVXGRaD 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: 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 7cf05d0b78fb..0d17dbe10fcf 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 @@ -45,20 +43,6 @@ static inline struct ep93xx_pwm *to_ep93xx_pwm(struct pwm_chip *chip) return container_of(chip, struct ep93xx_pwm, chip); } -static int ep93xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) -{ - struct platform_device *pdev = 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 = 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, 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