linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] SPMI queue for next merge window
@ 2020-12-10  2:33 Stephen Boyd
  2020-12-10  2:33 ` [PATCH 1/4] spmi: get rid of a warning when built with W=1 Stephen Boyd
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stephen Boyd @ 2020-12-10  2:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel

Please apply these SPMI patches for the next merge window.
I've collected the few patches that were ready and setup a git
tree on kernel.org to push them to.

Hsin-Hsiung Wang (1):
  spmi: Add driver shutdown support

Mauro Carvalho Chehab (2):
  spmi: get rid of a warning when built with W=1
  spmi: fix some coding style issues at the spmi core

Stephen Boyd (1):
  MAINTAINERS: Mark SPMI as maintained

 MAINTAINERS          |  6 ++++--
 drivers/spmi/spmi.c  | 19 ++++++++++++++-----
 include/linux/spmi.h |  1 +
 3 files changed, 19 insertions(+), 7 deletions(-)


base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec
-- 
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] spmi: get rid of a warning when built with W=1
  2020-12-10  2:33 [PATCH 0/4] SPMI queue for next merge window Stephen Boyd
@ 2020-12-10  2:33 ` Stephen Boyd
  2020-12-10  2:33 ` [PATCH 2/4] spmi: fix some coding style issues at the spmi core Stephen Boyd
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2020-12-10  2:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mauro Carvalho Chehab, linux-kernel

From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

The SPMI core complaing with this warning when built with W=1:

	drivers/spmi/spmi.c: In function ‘spmi_controller_remove’:
	drivers/spmi/spmi.c:548:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
	  548 |  int dummy;
	      |      ^~~~~

As the dummy var isn't needed, remove it.

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/aacfd03835b7d1b3b6c21665b44000fe7242e535.1601360391.git.mchehab+huawei@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
 drivers/spmi/spmi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index c16b60f645a4..fd3ff6079b15 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -545,13 +545,10 @@ static int spmi_ctrl_remove_device(struct device *dev, void *data)
  */
 void spmi_controller_remove(struct spmi_controller *ctrl)
 {
-	int dummy;
-
 	if (!ctrl)
 		return;
 
-	dummy = device_for_each_child(&ctrl->dev, NULL,
-				      spmi_ctrl_remove_device);
+	device_for_each_child(&ctrl->dev, NULL, spmi_ctrl_remove_device);
 	device_del(&ctrl->dev);
 }
 EXPORT_SYMBOL_GPL(spmi_controller_remove);
-- 
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] spmi: fix some coding style issues at the spmi core
  2020-12-10  2:33 [PATCH 0/4] SPMI queue for next merge window Stephen Boyd
  2020-12-10  2:33 ` [PATCH 1/4] spmi: get rid of a warning when built with W=1 Stephen Boyd
@ 2020-12-10  2:33 ` Stephen Boyd
  2020-12-10  2:33 ` [PATCH 3/4] spmi: Add driver shutdown support Stephen Boyd
  2020-12-10  2:33 ` [PATCH 4/4] MAINTAINERS: Mark SPMI as maintained Stephen Boyd
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2020-12-10  2:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mauro Carvalho Chehab, linux-kernel

From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

While preparing to port the HiSilicon 6421v600 SPMI driver,
I noticed some coding style issues at the SPMI core.

Address them.

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/fec878502147336cbf2cf86e476e9dd797cd7e6f.1601360391.git.mchehab+huawei@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
 drivers/spmi/spmi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index fd3ff6079b15..253340e10dab 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -23,6 +23,7 @@ static DEFINE_IDA(ctrl_ida);
 static void spmi_dev_release(struct device *dev)
 {
 	struct spmi_device *sdev = to_spmi_device(dev);
+
 	kfree(sdev);
 }
 
@@ -33,6 +34,7 @@ static const struct device_type spmi_dev_type = {
 static void spmi_ctrl_release(struct device *dev)
 {
 	struct spmi_controller *ctrl = to_spmi_controller(dev);
+
 	ida_simple_remove(&ctrl_ida, ctrl->nr);
 	kfree(ctrl);
 }
@@ -487,7 +489,7 @@ static void of_spmi_register_devices(struct spmi_controller *ctrl)
 			continue;
 
 		sdev->dev.of_node = node;
-		sdev->usid = (u8) reg[0];
+		sdev->usid = (u8)reg[0];
 
 		err = spmi_device_add(sdev);
 		if (err) {
@@ -531,6 +533,7 @@ EXPORT_SYMBOL_GPL(spmi_controller_add);
 static int spmi_ctrl_remove_device(struct device *dev, void *data)
 {
 	struct spmi_device *spmidev = to_spmi_device(dev);
+
 	if (dev->type == &spmi_dev_type)
 		spmi_device_remove(spmidev);
 	return 0;
-- 
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] spmi: Add driver shutdown support
  2020-12-10  2:33 [PATCH 0/4] SPMI queue for next merge window Stephen Boyd
  2020-12-10  2:33 ` [PATCH 1/4] spmi: get rid of a warning when built with W=1 Stephen Boyd
  2020-12-10  2:33 ` [PATCH 2/4] spmi: fix some coding style issues at the spmi core Stephen Boyd
@ 2020-12-10  2:33 ` Stephen Boyd
  2020-12-10  2:33 ` [PATCH 4/4] MAINTAINERS: Mark SPMI as maintained Stephen Boyd
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2020-12-10  2:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Hsin-Hsiung Wang, linux-kernel

From: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

Add new shutdown() method.  Use it in the standard driver model style.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Link: https://lore.kernel.org/r/1603187810-30481-2-git-send-email-hsin-hsiung.wang@mediatek.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
 drivers/spmi/spmi.c  | 9 +++++++++
 include/linux/spmi.h | 1 +
 2 files changed, 10 insertions(+)

diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index 253340e10dab..51f5aeb65b3b 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -359,6 +359,14 @@ static int spmi_drv_remove(struct device *dev)
 	return 0;
 }
 
+static void spmi_drv_shutdown(struct device *dev)
+{
+	const struct spmi_driver *sdrv = to_spmi_driver(dev->driver);
+
+	if (sdrv && sdrv->shutdown)
+		sdrv->shutdown(to_spmi_device(dev));
+}
+
 static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
 	int ret;
@@ -375,6 +383,7 @@ static struct bus_type spmi_bus_type = {
 	.match		= spmi_device_match,
 	.probe		= spmi_drv_probe,
 	.remove		= spmi_drv_remove,
+	.shutdown	= spmi_drv_shutdown,
 	.uevent		= spmi_drv_uevent,
 };
 
diff --git a/include/linux/spmi.h b/include/linux/spmi.h
index 394a3f68bad5..729bcbf9f5ad 100644
--- a/include/linux/spmi.h
+++ b/include/linux/spmi.h
@@ -138,6 +138,7 @@ struct spmi_driver {
 	struct device_driver driver;
 	int	(*probe)(struct spmi_device *sdev);
 	void	(*remove)(struct spmi_device *sdev);
+	void	(*shutdown)(struct spmi_device *sdev);
 };
 
 static inline struct spmi_driver *to_spmi_driver(struct device_driver *d)
-- 
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] MAINTAINERS: Mark SPMI as maintained
  2020-12-10  2:33 [PATCH 0/4] SPMI queue for next merge window Stephen Boyd
                   ` (2 preceding siblings ...)
  2020-12-10  2:33 ` [PATCH 3/4] spmi: Add driver shutdown support Stephen Boyd
@ 2020-12-10  2:33 ` Stephen Boyd
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2020-12-10  2:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, linux-arm-msm

I can do more than just review patches here. The plan is to pick up
patches from the list and shuttle them up to gregkh. The korg tree will
be used to hold the pending patches. Move the list away from
linux-arm-msm to just be linux-kernel as SPMI isn't msm specific
anymore.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-arm-msm@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20201207214204.1284946-1-sboyd@kernel.org
---
 MAINTAINERS | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e73636b75f29..a8b02bb842c4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16533,8 +16533,10 @@ F:	Documentation/networking/device_drivers/ethernet/toshiba/spider_net.rst
 F:	drivers/net/ethernet/toshiba/spider_net*
 
 SPMI SUBSYSTEM
-R:	Stephen Boyd <sboyd@kernel.org>
-L:	linux-arm-msm@vger.kernel.org
+M:	Stephen Boyd <sboyd@kernel.org>
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
 F:	Documentation/devicetree/bindings/spmi/
 F:	drivers/spmi/
 F:	include/dt-bindings/spmi/spmi.h
-- 
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-10  2:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10  2:33 [PATCH 0/4] SPMI queue for next merge window Stephen Boyd
2020-12-10  2:33 ` [PATCH 1/4] spmi: get rid of a warning when built with W=1 Stephen Boyd
2020-12-10  2:33 ` [PATCH 2/4] spmi: fix some coding style issues at the spmi core Stephen Boyd
2020-12-10  2:33 ` [PATCH 3/4] spmi: Add driver shutdown support Stephen Boyd
2020-12-10  2:33 ` [PATCH 4/4] MAINTAINERS: Mark SPMI as maintained Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).