From patchwork Fri Aug 11 13:03:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350866 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 1BF20C04A94 for ; Fri, 11 Aug 2023 13:04:48 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=qpYdg8YKZwbWk8JPfYMKl1BC6Vke/gze3Go/XTZS1Sk=; b=vpe1jWPFWf8+9y AChwoEhpIQpv7lFXn5EKo6grbSB80PsgKTps/q48gRdUokADlNap/uf5BKhCAwetA5X6CqxpzCs1y ztiSzDhmR6A46vipmmXwGcZIRYtNh2+k+eeBcSVcme5zks/Twpmsr67m+H5htF+RQKw2q/F1eOd1o mh26zWun69YTOhjt54Lm5Zzu4xqBPEL8SJaf5m4vcfEBywNN9fvfSayUm0KQkSJfAVnnUyvv5cFns sQNbR7yhFKVnd2Qdaku49jLhtEu9xFbvXw9taCqlkUeciDBrHfdvM/bTpILJ5XqqndmxnPcyhfiiq 7zwR4gM5JXNU+aJPPX6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURoQ-00AfFF-1z; Fri, 11 Aug 2023 13:04:18 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURoN-00AfEG-2i for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:04:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759055; x=1723295055; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Z8+rkxc4P60KdDoslinpq17RvjhrHcszfdDCu5xSmBY=; b=LT2RTU93eJbifXinzGgsKXjQkoTVMDtrCn4X6JmpbrvJXp5jqd4ixNnx ywzh9mXm105qGpgn/iJ+ZhOPZMQIAR36Ry0VwrmjHkElSUPCGqXZSSWc1 uxwT3SAliYSE9EJvuU9/StC+psUR+8wugy+2eEh2GyQbYmfY3F2ImoDnp O64Zcn44tQUU6QA9H4uMMySus1iTMbqPHw4zM4hcRnPEcEE0kF8ch83YY 1vHKH/r0NoF0E8WHOmE2GAyABPgyw8tvqaJa3M1yM7WcsXwvTiiS45M3u e6r3zWoJ5U2mc2l5IiBGZUr9g6EZJ1V+0LZpBC4Sp228DXWqhinIFZjX0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811612" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811612" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535172" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535172" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:03 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 00/16] mmc: sdhci-pltfm: Minor clean up Date: Fri, 11 Aug 2023 16:03:35 +0300 Message-Id: <20230811130351.7038-1-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060415_946632_5789245D X-CRM114-Status: GOOD ( 11.20 ) 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: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi sdhci_pltfm_unregister() does: clk_disable_unprepare(pltfm_host->clk) which prevents drivers from using devm_clk_get_enabled() or similar. Move it out, and where drivers are doing devm_clk_get*() immediately followed by clk_prepare_enable(), combine them into devm_clk_get_*enabled(). sdhci_pltfm_register() and sdhci_pltfm_unregister() are not paired functions. That are just helpers and effectively get renamed: sdhci_pltfm_register() -> sdhci_pltfm_init_and_add_host() sdhci_pltfm_unregister() -> sdhci_pltfm_remove() Please note, the patches are based on top of some "Convert to platform remove callback returning void" patches by Yangtao Li, which were posted here: https://lore.kernel.org/linux-mmc/20230727070051.17778-1-frank.li@vivo.com/ Patches can also be found here: https://github.com/ahunter6/linux/commits/sdhci-pltfm-cleanup-1 Adrian Hunter (16): mmc: sdhci-pltfm: Add sdhci_pltfm_remove() mmc: sdhci-bcm-kona: Use sdhci_pltfm_remove() mmc: sdhci-brcmstb: Use sdhci_pltfm_remove() mmc: sdhci-cadence: Use sdhci_pltfm_remove() mmc: sdhci-dove: Use sdhci_pltfm_remove() mmc: sdhci_f_sdh30: Use sdhci_pltfm_remove() mmc: sdhci-iproc: Use sdhci_pltfm_remove() mmc: sdhci-of-arasan: Use sdhci_pltfm_remove() mmc: sdhci-of-at91: Use sdhci_pltfm_remove() mmc: sdhci-of-esdhc: Use sdhci_pltfm_remove() mmc: sdhci-of-hlwd: Use sdhci_pltfm_remove() mmc: sdhci-of-sparx5: Use sdhci_pltfm_remove() mmc: sdhci-pxav2: Use sdhci_pltfm_remove() mmc: sdhci-st: Use sdhci_pltfm_remove() mmc: sdhci-pltfm: Remove sdhci_pltfm_unregister() mmc: sdhci-pltfm: Rename sdhci_pltfm_register() drivers/mmc/host/sdhci-bcm-kona.c | 12 +++++++++++- drivers/mmc/host/sdhci-brcmstb.c | 18 +++++------------- drivers/mmc/host/sdhci-cadence.c | 17 ++++------------- drivers/mmc/host/sdhci-dove.c | 8 ++------ drivers/mmc/host/sdhci-iproc.c | 14 +++----------- drivers/mmc/host/sdhci-of-arasan.c | 4 +++- drivers/mmc/host/sdhci-of-at91.c | 2 +- drivers/mmc/host/sdhci-of-esdhc.c | 2 +- drivers/mmc/host/sdhci-of-hlwd.c | 4 ++-- drivers/mmc/host/sdhci-of-sparx5.c | 17 ++++++----------- drivers/mmc/host/sdhci-pltfm.c | 14 ++++++-------- drivers/mmc/host/sdhci-pltfm.h | 8 ++++---- drivers/mmc/host/sdhci-pxav2.c | 19 ++++++------------- drivers/mmc/host/sdhci-st.c | 4 +++- drivers/mmc/host/sdhci_f_sdh30.c | 2 +- 15 files changed, 58 insertions(+), 87 deletions(-) Regards Adrian Reviewed-by: Andy Shevchenko