All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Yangtao Li" <frank.li@vivo.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Broadcom internal kernel review list 
	<bcm-kernel-feedback-list@broadcom.com>,
	Kamal Dasu <kamal.dasu@broadcom.com>,
	Al Cooper <alcooperx@gmail.com>,
	Michal Simek <michal.simek@amd.com>,
	Eugen Hristev <eugen.hristev@collabora.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Lars Povlsen <lars.povlsen@microchip.com>,
	Steen Hegelund <Steen.Hegelund@microchip.com>,
	Daniel Machon <daniel.machon@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Brian Norris <briannorris@chromium.org>,
	Ye Xingchen <ye.xingchen@zte.com.cn>,
	Brad Larson <blarson@amd.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>,
	Swati Agarwal <swati.agarwal@amd.com>,
	Andy Tang <andy.tang@nxp.com>,
	Georgii Kruglov <georgy.kruglov@yandex.ru>,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Doug Brown <doug@schmorgal.com>, Li Zetao <lizetao1@huawei.com>,
	Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/16] mmc: sdhci-pltfm: Minor clean up
Date: Fri, 11 Aug 2023 16:03:35 +0300	[thread overview]
Message-ID: <20230811130351.7038-1-adrian.hunter@intel.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Yangtao Li" <frank.li@vivo.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
	Al Cooper <alcooperx@gmail.com>, Li Zetao <lizetao1@huawei.com>,
	Brad Larson <blarson@amd.com>,
	Swati Agarwal <swati.agarwal@amd.com>,
	linux-kernel@vger.kernel.org,
	Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Steen Hegelund <Steen.Hegelund@microchip.com>,
	Brian Norris <briannorris@chromium.org>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	linux-arm-kernel@lists.infradead.org,
	Ye Xingchen <ye.xingchen@zte.com.cn>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Kamal Dasu <kamal.dasu@broadcom.com>,
	Doug Brown <doug@schmorgal.com>,
	Daniel Machon <daniel.machon@microchip.com>,
	Ray Jui <rjui@broadcom.com>,
	Eugen Hristev <eugen.hristev@collabora.com>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Georgii Kruglov <georgy.kruglov@yandex.ru>,
	Michal Simek <michal.simek@amd.com>,
	Lars Povlsen <lars.povlsen@microchip.com>,
	Andy Tang <andy.tang@nxp.com>,
	Scott Branden <sbranden@broadcom.com>,
	linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com,
	Claudiu Beznea <claudiu.beznea@microchip.com>
Subject: [PATCH 00/16] mmc: sdhci-pltfm: Minor clean up
Date: Fri, 11 Aug 2023 16:03:35 +0300	[thread overview]
Message-ID: <20230811130351.7038-1-adrian.hunter@intel.com> (raw)

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2023-08-11 13:04 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 13:03 Adrian Hunter [this message]
2023-08-11 13:03 ` [PATCH 00/16] mmc: sdhci-pltfm: Minor clean up Adrian Hunter
2023-08-11 13:03 ` [PATCH 01/16] mmc: sdhci-pltfm: Add sdhci_pltfm_remove() Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 02/16] mmc: sdhci-bcm-kona: Use sdhci_pltfm_remove() Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 03/16] mmc: sdhci-brcmstb: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-25 16:22   ` Kamal Dasu
2023-08-25 16:22     ` Kamal Dasu
2023-08-11 13:03 ` [PATCH 04/16] mmc: sdhci-cadence: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 05/16] mmc: sdhci-dove: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 06/16] mmc: sdhci_f_sdh30: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 07/16] mmc: sdhci-iproc: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 08/16] mmc: sdhci-of-arasan: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 09/16] mmc: sdhci-of-at91: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 10/16] mmc: sdhci-of-esdhc: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 11/16] mmc: sdhci-of-hlwd: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 12/16] mmc: sdhci-of-sparx5: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 13/16] mmc: sdhci-pxav2: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 14/16] mmc: sdhci-st: " Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 15/16] mmc: sdhci-pltfm: Remove sdhci_pltfm_unregister() Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:03 ` [PATCH 16/16] mmc: sdhci-pltfm: Rename sdhci_pltfm_register() Adrian Hunter
2023-08-11 13:03   ` Adrian Hunter
2023-08-11 13:42 ` [PATCH 00/16] mmc: sdhci-pltfm: Minor clean up Andy Shevchenko
2023-08-11 13:42   ` Andy Shevchenko
2023-08-15 11:40 ` Ulf Hansson
2023-08-15 11:40   ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230811130351.7038-1-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Steen.Hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alcooperx@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.tang@nxp.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=blarson@amd.com \
    --cc=briannorris@chromium.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=claudiu.beznea@microchip.com \
    --cc=daniel.machon@microchip.com \
    --cc=doug@schmorgal.com \
    --cc=eugen.hristev@collabora.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=frank.li@vivo.com \
    --cc=georgy.kruglov@yandex.ru \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=kamal.dasu@broadcom.com \
    --cc=lars.povlsen@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=lizetao1@huawei.com \
    --cc=michal.simek@amd.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=rjui@broadcom.com \
    --cc=sai.krishna.potthuri@amd.com \
    --cc=sbranden@broadcom.com \
    --cc=swati.agarwal@amd.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=ulf.hansson@linaro.org \
    --cc=ye.xingchen@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.