SPMI queue for next merge window
Subsystems (2)
Stephen Boyd
maintainercover SPMI queue for next merge window
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
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 1/4 spmi: get rid of a warning when built with W=1
From: Mauro Carvalho Chehab <[email protected]>
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.
--- drivers/spmi/spmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/spmi/spmi.c +1 -4
@@ -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);
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 2/4 spmi: fix some coding style issues at the spmi core
In reply to Stephen BoydFrom: Mauro Carvalho Chehab <[email protected]>
While preparing to port the HiSilicon 6421v600 SPMI driver, I noticed some coding style issues at the SPMI core.
Address them.
--- drivers/spmi/spmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/spmi/spmi.c +4 -1
@@ -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 ;
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 3/4 spmi: Add driver shutdown support
In reply to Stephen BoydFrom: Hsin-Hsiung Wang <[email protected]>
Add new shutdown() method. Use it in the standard driver model style.
--- drivers/spmi/spmi.c | 9 +++++++++ include/linux/spmi.h | 1 + 2 files changed, 10 insertions(+)
drivers/spmi/spmi.c +9 -0
@@ -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, };
include/linux/spmi.h +1 -0
@@ -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)
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 4/4 MAINTAINERS: Mark SPMI as maintained
In reply to Stephen BoydI 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.
--- MAINTAINERS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
MAINTAINERS +4 -2
@@ -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 <[email protected]> -L: [email protected] +M: Stephen Boyd <[email protected]> +L: [email protected] +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
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git