Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1854946pxb; Fri, 24 Sep 2021 13:36:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxM2htMrRPhWkQ++fGHmpPqdDXhtg/pbUBSl7f0VgHWoN3DT71u/8kTQNK/FfK3mFX9WH76 X-Received: by 2002:a17:906:eb0f:: with SMTP id mb15mr13470725ejb.113.1632515790126; Fri, 24 Sep 2021 13:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632515790; cv=none; d=google.com; s=arc-20160816; b=pjG89P/mwywFok9571JHoNJ71jp9QU4BHxxGOhr4DvZ1yTysw3QrM22GOkhAZ8Wo1L iolKM874x+YGrj0mszGWjzGOaOiioPpkGq7TZshxpTr2T0Hh8p9Ip+HZ5lv/pJjPLROe fbiFXW4DjdK4MTo7JnJxDlXH3hkx7Pml7vj/XdsYElt1YKxKfFRQ4EDgSSkf0MfAgjvO VAk+pCqBll+3vV+3M7cI2fpkOTThO6Oz4NMJqod73cvVPdZszYoE1E7xQ/8FapFMSEpO PR5qAJG409qzpT6A+BTO6j67RVnuno+JCwsd793IHXRdBHsRp3Q67PdV8tAS9dJ4iz4X 9ylQ== 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=DfIMYu9pnmee693GayBNy43Pn5QevqHwzQmMVnGbSqE=; b=lgalkkrsb7X1iy5JZsIsGNttbkJrjrsIToCDklNKiItS6NYhuzJ8d4Bz2jWhATV/XC MGOOglYuCtTz4eUv7/QZi0tnnkeCaPOtVXC4uG7w8nTD9G6otBAYceaAQ31NW11HZ5Lh 8aT3MqZzKuhDqov2ubTENK/ubbaM3wPLprPwilXIynljA87CWTfbqpp1AzGmCyVi7/WG e47ehVl02z2o8nPmwzsoXNUi85bBqm7LYM0oPnuBv54/7skWGY2lhCNoBuz9IxTBarhf qIVAQiTTwT8MhzSU/QtjHrfzRpVo8qEpagLYTdU8SgUJ2exo7BwNFbvRA/iPKlYZUZJI 5Evw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2jqwhGOK; 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 o8si12307629ejj.94.2021.09.24.13.35.49; Fri, 24 Sep 2021 13:36:30 -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=2jqwhGOK; 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 S1345719AbhIXNO1 (ORCPT + 99 others); Fri, 24 Sep 2021 09:14:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:38898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346161AbhIXNKT (ORCPT ); Fri, 24 Sep 2021 09:10:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DC2CF615A7; Fri, 24 Sep 2021 12:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632488293; bh=s+6M7smfVbonIUXmdU6r9y3qwUuASd6HErQYJRWCFBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2jqwhGOKaDzFHdkV/q9xDzp+RDCpb66facLCQ0aK562Pp9EdzlqTes9KBH27HJq4f E5MjsSylSn8Sys61bIwRCBeppaT9+Q+BlsVObCnLaPvathnJF/6d6S2R2RatutfKuk I0JIyRDCwnGCz1XkZVV4kFXaveaxNAbtgB6j+mcs= 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 5.10 57/63] pwm: rockchip: Dont modify HW state in .remove() callback Date: Fri, 24 Sep 2021 14:44:57 +0200 Message-Id: <20210924124336.230659223@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924124334.228235870@linuxfoundation.org> References: <20210924124334.228235870@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 3b8da7b0091b..1f3079562b38 100644 --- a/drivers/pwm/pwm-rockchip.c +++ b/drivers/pwm/pwm-rockchip.c @@ -382,20 +382,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