From patchwork Thu Jul 14 11:55:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12917751 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 147F3C43334 for ; Thu, 14 Jul 2022 11:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=seoRPmII4/MlYl8s1n2ADTaHn+l+WOeS6sJfKHEVQRM=; b=cPGJk+gZ3kmnk7 Fmvp+7Omxp/te+vQhJuedPVUSYmXq4hDVG0mWv8e6s6DqpMWH44Sq4MkbDo+smEngFDbfYZ63Trma PTp07yaD3BIA+ALLXK/LDbOMt9Hh2WWDOcYOZ9sDtDG+HC8UlvhtudlbbXgCV/UlZ2aeaucOIViHC zKry9jTrku9i7TAgu6Ih+iI2p0DLdlTtYBu9vD0Q4NhkcmXlLUvdrm2P3xs7qETbmkZMoq4wy7rgS VmziD/+tlVC9kH8pbxPO4C0320NUQ4ISjNxyFud59xDVu7mlbCqXpcLRf4j0DjwE1gluIBRMeL+9D GRdpamA9RRig38LPsDsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBxSY-00DyWM-Bf; Thu, 14 Jul 2022 11:56:46 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBxS9-00DyIB-43 for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2022 11:56:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id AABFACE2693; Thu, 14 Jul 2022 11:56:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E36B3C34114; Thu, 14 Jul 2022 11:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657799772; bh=kMHYnrEnWCDRZLx3w2/b7o5Qlq/C+lrcPobY/5NWAME=; h=From:To:Cc:Subject:Date:From; b=GjRXKN9g5LMFI0DX13xliVDcHGudOPZvUDepRt2Uw1pAe75XfnDZ/vKod5jO6OtnF v+Uz/mIgbF0zCjRqEj0f85s4hNAiyPeQ63L5zPiGBHCCDjTBvnBXJICkXQ0fNjJWeG /YQjkuJ+Q812pCWUiG2XfnJ6C8EHKo0B1pmjUR95WJezFk3fj14fpuvlQ92fJCtRoE g9Eur6CDSq9HolDsx90so4jZ+VwZgjFegxZ1hD6AD6KY9lXfAkG8xoxEj6B+Dfkrhr wXT/vyFoN57IZBLXUYafzSChpyOF8o1tDWlro15PgE25EjpljtzOc4yxDf7GFV7qHl Gp8D1R5iayPCg== Received: by pali.im (Postfix) id E7DF01295; Thu, 14 Jul 2022 13:56:08 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Lee Jones , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , =?utf-8?q?Marek_Be?= =?utf-8?q?h=C3=BAn?= Cc: linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] gpio: mvebu: Fix check for pwm support on non-A8K platforms Date: Thu, 14 Jul 2022 13:55:12 +0200 Message-Id: <20220714115515.5748-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220714_045621_421019_63587EA0 X-CRM114-Status: GOOD ( 14.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org pwm support incompatible with Armada 80x0/70x0 API is not only in Armada 370, but also in Armada XP, 38x and 39x. So basically every non-A8K platform. Fix check for pwm support appropriately. Fixes: 85b7d8abfec7 ("gpio: mvebu: add pwm support for Armada 8K/7K") Signed-off-by: Pali Rohár --- drivers/gpio/gpio-mvebu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 2db19cd640a4..70a22b68c034 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -793,8 +793,7 @@ static int mvebu_pwm_probe(struct platform_device *pdev, u32 offset; u32 set; - if (of_device_is_compatible(mvchip->chip.of_node, - "marvell,armada-370-gpio")) { + if (mvchip->soc_variant != MVEBU_GPIO_SOC_VARIANT_A8K) { /* * There are only two sets of PWM configuration registers for * all the GPIO lines on those SoCs which this driver reserves