Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1746025pxb; Fri, 24 Sep 2021 10:53:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaRVuDbKvk5IOZnGSFNHNT3DXgGfxQojugi779sAxF1hIAfRH4C+cNFCBkf+osMURl0Ct2 X-Received: by 2002:a05:6602:2193:: with SMTP id b19mr10201654iob.27.1632506005287; Fri, 24 Sep 2021 10:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632506005; cv=none; d=google.com; s=arc-20160816; b=Lg2amLOiUycU7jtl+npLO3j6c2jLU838gxByUWXEUU/9kL4W8R5bowPd0htYVaa36m 42TCWsEkgaiS51pRIJKfBPUr82uVAQTTKHSk+D0Oqjqn+9Qr0lh3ZVadlShhJy4pTr0E wkvjePX3M+TXTk7gYIJoRrN7NRewcPbNba39sdQDWRv+wWzj2C7fdwMgK4tcRztPq2/p UqUv/nTYWBkL8BlKdVZVG2CWW4yXDcobE2xLtN+PGJyApWTsrA+XgqjTzq71l0kHckFz i42yB0DQk5y9py2gz3l6TXONb63e77BjgyyZvonHvSG/lQw1vylxs/aOj3P7IUjEyBcP rO6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=82OVFCWhkfgnbEqczrFjzx+JYT9/yfJmX2VVt/WJdUM=; b=cQdKEuGuse0nxCNEQspUxvV1r51ptNAI1o2ILJYkG1W8u5FwTVQQWu2onHSTB5+4kH IFGSZ3zghbCmhH73tCT0wbk9Or9iRxoCroUqcFU3MI+3uDpWz2kvjKk2il5TPwhc8nj0 OYEHNeVUfsfxLY1rnG3Ce7kO0vW5m3JevhAQPGJ1eCNpUc8gh/xXq8+NJid2Bg66TtEj eA4SDJmeKPPcai6qp+qABpMPrhPQAsmThCJTXqgu/WQEg+1W8JG0CK2vBJtiPrW7h4a9 Dt3Ll4Sgi9EovUGMoh/INtXy7QYx7WwuW07YNXUFiM6q1hrkpnENf/5Y0uRP7CQFpM1d 3fhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RBz2hh56; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si9783350ila.86.2021.09.24.10.53.11; Fri, 24 Sep 2021 10:53:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RBz2hh56; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344721AbhIXMyY (ORCPT + 99 others); Fri, 24 Sep 2021 08:54:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:45856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344594AbhIXMwT (ORCPT ); Fri, 24 Sep 2021 08:52:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 96BC26124B; Fri, 24 Sep 2021 12:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632487773; bh=BkISNqFHSRmUOB9cYBFY3T37xo5rngboc71OMME0GQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RBz2hh56ZwllQPsSLqH2M4Cfq54SbKurEyS/S26JR+7gXRP37HlEADLxyCSWQFOuq Q/pEiteTz2HvBYYBH7MMcpBN8gMsvM14Pywp7z2tU1sIr67uPiMwOBLzP3BjJpTmB1 NpOIGc10FwDgKaqY+8q0RcabBFn787ZMBAmPlRQI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Thierry Reding , Sasha Levin Subject: [PATCH 4.19 31/34] pwm: rockchip: Dont modify HW state in .remove() callback Date: Fri, 24 Sep 2021 14:44:25 +0200 Message-Id: <20210924124330.982955102@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924124329.965218583@linuxfoundation.org> References: <20210924124329.965218583@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Uwe Kleine-König [ Upstream commit 9d768cd7fd42bb0be16f36aec48548fca5260759 ] A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/pwm/pwm-rockchip.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c index 48bcc853d57a..cf34fb00c054 100644 --- a/drivers/pwm/pwm-rockchip.c +++ b/drivers/pwm/pwm-rockchip.c @@ -392,20 +392,6 @@ static int rockchip_pwm_remove(struct platform_device *pdev) { struct rockchip_pwm_chip *pc = platform_get_drvdata(pdev); - /* - * Disable the PWM clk before unpreparing it if the PWM device is still - * running. This should only happen when the last PWM user left it - * enabled, or when nobody requested a PWM that was previously enabled - * by the bootloader. - * - * FIXME: Maybe the core should disable all PWM devices in - * pwmchip_remove(). In this case we'd only have to call - * clk_unprepare() after pwmchip_remove(). - * - */ - if (pwm_is_enabled(pc->chip.pwms)) - clk_disable(pc->clk); - clk_unprepare(pc->pclk); clk_unprepare(pc->clk); -- 2.33.0