Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1153977rbb; Sun, 25 Feb 2024 23:38:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXA3y1NX39+uSaUC4xDGXiyqooT8kB8+pffjAjzhyfYecfzLpXfqDud4eXffo6Ll2ymxgyHoXZ45JytwjYhuQ7e6Qs7qmAwYSidtYNl3g== X-Google-Smtp-Source: AGHT+IFwHIAwLHd0M7GTsWmr5I2Jh9i65b0VYK49uVPyAhAXzpjQkSyzPomacr9rFyL1MEpsPsUK X-Received: by 2002:a17:906:1c19:b0:a43:7d9c:3c91 with SMTP id k25-20020a1709061c1900b00a437d9c3c91mr222440ejg.54.1708933086683; Sun, 25 Feb 2024 23:38:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708933086; cv=pass; d=google.com; s=arc-20160816; b=c46Ea0Qai+q0Px+ZxLPi12kXzHkbcqivPDWUhqq2xKmNUbx0qlILufdPFPwJf45TTU jWazZYZx9VIHp0SBWLxF4El59Vk7fmh1Jj29OaLrPRtQO8mz2bQHXta9aJm00av1WuuT 9Pn75zAHwxtU/b2lqPipzSbB2KYJY24n/Xdz2HUAJf6eyxUfQh7RnoQeTqM+PCxVsHmm yBIDcO6Mk/pflpPqHR5tvQFJ8EPx8yTkxAHSk02+y4uh2pbxhpvEH4sPbz4BftiTDl8u KqGI2h3vqmVXCaq2vHT+pMAy+CkdCPKUMb639RdLpp+lYsQYP9qa6kq9juMZZT5a12XU cdjw== 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=muLapihpZSTnfFNqjYOg8D2W2jFOv/aF1bLU1LUABL4=; b=COmJHAufT5DcND73yLQV0Pj5djO9N2zfDgN4emk5t5czjfll61uRFwNNkCK1tmDhSF KPJPvlDpRrnwMmmnvBN7UAOUNRi+B1czK1V9MdmTMx4hsmUkmeENDN8qxsw/5D+/my6G TL+TXga8Ale5WrFztJPVj/QLZWmXQHE2q/9dpjWdYd/hj3nx1SMoWnpFp4qiKTnfaBRc fetWzOuKRPd/137OKHvvx1gObLhDJfmifpYLmM/x4v+RKqKrDjjpo64MVBwK7qEPCJ1D zQJXDT6m5m5zv5AGyKOqeIvDXSY7tGYIsMr2R/8Aqo9nrTejgY9t37p6W1kqqqXybkPM vtqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S8e7ms5K; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80667-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n21-20020a170906725500b00a3fb1b2a2bbsi1888697ejk.1042.2024.02.25.23.38.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 23:38:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S8e7ms5K; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80667-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4859C1F217CA for ; Mon, 26 Feb 2024 07:38:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8240654672; Mon, 26 Feb 2024 07:31:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="S8e7ms5K" 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 E5CC91EB2B; Mon, 26 Feb 2024 07:31: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=1708932685; cv=none; b=DJEucOWiO0Fhrp9pOoDF4LxcCxQp9++6TRflpCNylVufFTWcuIOtz+ulqK5GaKvrk93635WofSZ/0l4qcdWul6UMmN3SK8eUiMr50pDe9AP3vkMu0/nhXXob/lbCBsu5gWT4tTy0Q+59SrVEPNN9ZIOFzMpUcztn014DxwlGue8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708932685; c=relaxed/simple; bh=0AP5jOr0kcxnDwVy44nLG1Q6cTn3VJnAgm1Ofg4TYoQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VXkGU1zlDguXxWUzLPgohkxPlurOva3Q0vrjqjR5GDPBkKQ7gz1OCnvjQmXywGnztCo3QIvm7stP0onBxYZJFXUM0eIs7SYP0wTuHPTOf32q8UZlYSkceOti1KrIErnr8IeeGWzkRZLGEzklY9t+tM5/fDxY++C6jUh0xDxXIQw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=S8e7ms5K; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id C0CB3C4E75A; Mon, 26 Feb 2024 07:31:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708932683; bh=0AP5jOr0kcxnDwVy44nLG1Q6cTn3VJnAgm1Ofg4TYoQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=S8e7ms5KB5SJasT/vkq5K0CT5VpUB2vYZr8t5/tjdUGSl7qiBR9EwP4hTt1h2F27W ZlrEKW487OXkqj1hl/QMvvUGgbqymzABjsfDLWLfowsS370Qw8Rh2tIx9hGyITGDuE kuam/6rPZziW5vjS9BfhWvgk96ziY8bkJ07RiOkzc9Ag4kS54bn0vlw9zVxVJ0SotM nbSYCfWwB+HdsdkwMRWJAbHtiotD/SX7uRR2j0UU7vltYA51JArtYZ+r3yrFol9+Ou ggAVv+F//Jzcjg40H30oncyAhcbAms/ZlldxVfFU4l6IWE1uUwZKxvu97xeyEEh8Bk 1Z+5R7Y9NHDZg== 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 AD119C54E49; Mon, 26 Feb 2024 07:31:23 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Mon, 26 Feb 2024 10:30:29 +0300 Subject: [PATCH v8 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: <20240226-ep93xx-v8-33-3136dca7238f@maquefel.me> References: <20240226-ep93xx-v8-0-3136dca7238f@maquefel.me> In-Reply-To: <20240226-ep93xx-v8-0-3136dca7238f@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 , Andy Shevchenko Cc: 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=1708932678; l=4445; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=TKmzJsDbCt6jQiF+EbUv2e6fJpGA78evP9E+SCft8XM=; =?utf-8?q?b=3DbnqmuHyfylu7?= =?utf-8?q?t3YC9vq/t3XZ0+NEvOcVX5sfhiQPp4QUITvpXPBpN4kquuX1LmqbS+Tajk4yYMJK?= 33EnJrBwDbi2FFI6/DMTQUnh7Rb18PCLkTRgvJEmFAJe6a3PoP8r 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