linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] various ab8500 fixes
@ 2013-04-26 12:17 Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 1/5] mfd: abx500-core: fix sparse warning Fabio Baltieri
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Fabio Baltieri @ 2013-04-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Samuel,

this series contains various fixes I found on the current -next ab8500
driver(s).

Patches 1 and 2 are just sparse warning, patch 3 drops reference to a
superseeded driver and last two makes ab8500-sysctrl works again without
an explicit ab8500->sysctrl defined, as it is in current kernel.

Thanks,
Fabio


Fabio Baltieri (5):
  mfd: abx500-core: fix sparse warning
  mfd: ab8500-sysctrl: fix sparse warning
  mfd: ab8500: drop references to ab8500-leds
  mfd: ab8500-sysctrl: set sysctrl_dev during probe
  mfd: ab8500-sysctrl: let sysctrl driver work without pdata

 drivers/mfd/ab8500-core.c    | 13 -------------
 drivers/mfd/ab8500-sysctrl.c |  9 +++++----
 drivers/mfd/abx500-core.c    |  2 +-
 3 files changed, 6 insertions(+), 18 deletions(-)

-- 
1.8.1.3

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

* [PATCH 1/5] mfd: abx500-core: fix sparse warning
  2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
@ 2013-04-26 12:17 ` Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 2/5] mfd: ab8500-sysctrl: " Fabio Baltieri
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Fabio Baltieri @ 2013-04-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

Fix sparse warning:

drivers/mfd/abx500-core.c:159:38: warning: Using plain integer as NULL pointer

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
 drivers/mfd/abx500-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
index 9818afb..3714acb 100644
--- a/drivers/mfd/abx500-core.c
+++ b/drivers/mfd/abx500-core.c
@@ -156,7 +156,7 @@ EXPORT_SYMBOL(abx500_startup_irq_enabled);
 void abx500_dump_all_banks(void)
 {
 	struct abx500_ops *ops;
-	struct device dummy_child = {0};
+	struct device dummy_child = {NULL};
 	struct abx500_device_entry *dev_entry;
 
 	list_for_each_entry(dev_entry, &abx500_list, list) {
-- 
1.8.1.3

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

* [PATCH 2/5] mfd: ab8500-sysctrl: fix sparse warning
  2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 1/5] mfd: abx500-core: fix sparse warning Fabio Baltieri
@ 2013-04-26 12:17 ` Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 3/5] mfd: ab8500: drop references to ab8500-leds Fabio Baltieri
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Fabio Baltieri @ 2013-04-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

Fix sparse warning:

drivers/mfd/ab8500-sysctrl.c:26:6: warning: symbol 'ab8500_power_off' was not declared. Should it be static?

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
 drivers/mfd/ab8500-sysctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index fbca1ce..640495e 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -23,7 +23,7 @@
 
 static struct device *sysctrl_dev;
 
-void ab8500_power_off(void)
+static void ab8500_power_off(void)
 {
 	sigset_t old;
 	sigset_t all;
-- 
1.8.1.3

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

* [PATCH 3/5] mfd: ab8500: drop references to ab8500-leds
  2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 1/5] mfd: abx500-core: fix sparse warning Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 2/5] mfd: ab8500-sysctrl: " Fabio Baltieri
@ 2013-04-26 12:17 ` Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 4/5] mfd: ab8500-sysctrl: set sysctrl_dev during probe Fabio Baltieri
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Fabio Baltieri @ 2013-04-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

The ab8500-leds driver has never been upstreamed and was replaced by a
PWM framework based driver, so these references are not needed anymore.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
 drivers/mfd/ab8500-core.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 8e8a016..dd41ae2 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -1089,10 +1089,6 @@ static struct mfd_cell ab8500_devs[] = {
 		.id = 3,
 	},
 	{
-		.name = "ab8500-leds",
-		.of_compatible = "stericsson,ab8500-leds",
-	},
-	{
 		.name = "ab8500-denc",
 		.of_compatible = "stericsson,ab8500-denc",
 	},
@@ -1161,9 +1157,6 @@ static struct mfd_cell ab9540_devs[] = {
 		.id = 1,
 	},
 	{
-		.name = "ab8500-leds",
-	},
-	{
 		.name = "abx500-temp",
 		.num_resources = ARRAY_SIZE(ab8500_temp_resources),
 		.resources = ab8500_temp_resources,
@@ -1231,9 +1224,6 @@ static struct mfd_cell ab8505_devs[] = {
 		.id = 1,
 	},
 	{
-		.name = "ab8500-leds",
-	},
-	{
 		.name = "ab8500-gpio",
 	},
 	{
@@ -1294,9 +1284,6 @@ static struct mfd_cell ab8540_devs[] = {
 		.id = 1,
 	},
 	{
-		.name = "ab8500-leds",
-	},
-	{
 		.name = "abx500-temp",
 		.num_resources = ARRAY_SIZE(ab8500_temp_resources),
 		.resources = ab8500_temp_resources,
-- 
1.8.1.3

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

* [PATCH 4/5] mfd: ab8500-sysctrl: set sysctrl_dev during probe
  2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
                   ` (2 preceding siblings ...)
  2013-04-26 12:17 ` [PATCH 3/5] mfd: ab8500: drop references to ab8500-leds Fabio Baltieri
@ 2013-04-26 12:17 ` Fabio Baltieri
  2013-04-26 12:17 ` [PATCH 5/5] mfd: ab8500-sysctrl: let sysctrl driver work without pdata Fabio Baltieri
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Fabio Baltieri @ 2013-04-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

The driver requires sysctrl_dev to be set at probe, as it's used by
other driver functions.  This was dropped by mistake in:

2377e52 mfd: ab8500-sysctrl: Error check clean up

making all driver functions fail.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
 drivers/mfd/ab8500-sysctrl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index 640495e..b851692 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -191,6 +191,8 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
 	if (!(plat && plat->sysctrl))
 		return -EINVAL;
 
+	sysctrl_dev = &pdev->dev;
+
 	if (plat->pm_power_off)
 		pm_power_off = ab8500_power_off;
 
-- 
1.8.1.3

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

* [PATCH 5/5] mfd: ab8500-sysctrl: let sysctrl driver work without pdata
  2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
                   ` (3 preceding siblings ...)
  2013-04-26 12:17 ` [PATCH 4/5] mfd: ab8500-sysctrl: set sysctrl_dev during probe Fabio Baltieri
@ 2013-04-26 12:17 ` Fabio Baltieri
  2013-05-02 12:34 ` [PATCH 0/5] various ab8500 fixes Linus Walleij
  2013-05-03  8:01 ` Lee Jones
  6 siblings, 0 replies; 8+ messages in thread
From: Fabio Baltieri @ 2013-04-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

A check for a valid plat->sysctrl was introduced in:

2377e52 mfd: ab8500-sysctrl: Error check clean up

but the driver works just fine even without that initialization data.
This patch removes the check and let the driver go ahead with probe.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
 drivers/mfd/ab8500-sysctrl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index b851692..eadae4d 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -104,7 +104,7 @@ void ab8500_restart(char mode, const char *cmd)
 
 	plat = dev_get_platdata(sysctrl_dev->parent);
 	pdata = plat->sysctrl;
-	if (pdata->reboot_reason_code)
+	if (pdata && pdata->reboot_reason_code)
 		reason = pdata->reboot_reason_code(cmd);
 	else
 		pr_warn("[%s] No reboot reason set. Default reason %d\n",
@@ -188,7 +188,7 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
 
 	plat = dev_get_platdata(pdev->dev.parent);
 
-	if (!(plat && plat->sysctrl))
+	if (!plat)
 		return -EINVAL;
 
 	sysctrl_dev = &pdev->dev;
@@ -197,7 +197,6 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
 		pm_power_off = ab8500_power_off;
 
 	pdata = plat->sysctrl;
-
 	if (pdata) {
 		int last, ret, i, j;
 
-- 
1.8.1.3

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

* [PATCH 0/5] various ab8500 fixes
  2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
                   ` (4 preceding siblings ...)
  2013-04-26 12:17 ` [PATCH 5/5] mfd: ab8500-sysctrl: let sysctrl driver work without pdata Fabio Baltieri
@ 2013-05-02 12:34 ` Linus Walleij
  2013-05-03  8:01 ` Lee Jones
  6 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2013-05-02 12:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 26, 2013 at 2:17 PM, Fabio Baltieri
<fabio.baltieri@linaro.org> wrote:

> Hi Samuel,
>
> this series contains various fixes I found on the current -next ab8500
> driver(s).

The series:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [PATCH 0/5] various ab8500 fixes
  2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
                   ` (5 preceding siblings ...)
  2013-05-02 12:34 ` [PATCH 0/5] various ab8500 fixes Linus Walleij
@ 2013-05-03  8:01 ` Lee Jones
  6 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-05-03  8:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 26 Apr 2013, Fabio Baltieri wrote:

> Hi Samuel,
> 
> this series contains various fixes I found on the current -next ab8500
> driver(s).
> 
> Patches 1 and 2 are just sparse warning, patch 3 drops reference to a
> superseeded driver and last two makes ab8500-sysctrl works again without
> an explicit ab8500->sysctrl defined, as it is in current kernel.
> 
> Thanks,
> Fabio
> 
> 
> Fabio Baltieri (5):
>   mfd: abx500-core: fix sparse warning
>   mfd: ab8500-sysctrl: fix sparse warning
>   mfd: ab8500: drop references to ab8500-leds
>   mfd: ab8500-sysctrl: set sysctrl_dev during probe
>   mfd: ab8500-sysctrl: let sysctrl driver work without pdata

I have a really petty point:

Try and keep to the $SUBJECT line conventions which are preferred by
each subsystem maintainer. Linus Walleij tends to prefer the scheme
you've used above, but Sam likes the description to start with an
uppercase character. No biggy, I'll just fix that up for you.

>  drivers/mfd/ab8500-core.c    | 13 -------------
>  drivers/mfd/ab8500-sysctrl.c |  9 +++++----
>  drivers/mfd/abx500-core.c    |  2 +-
>  3 files changed, 6 insertions(+), 18 deletions(-)

All patches applied. Thanks Fabio.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2013-05-03  8:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 12:17 [PATCH 0/5] various ab8500 fixes Fabio Baltieri
2013-04-26 12:17 ` [PATCH 1/5] mfd: abx500-core: fix sparse warning Fabio Baltieri
2013-04-26 12:17 ` [PATCH 2/5] mfd: ab8500-sysctrl: " Fabio Baltieri
2013-04-26 12:17 ` [PATCH 3/5] mfd: ab8500: drop references to ab8500-leds Fabio Baltieri
2013-04-26 12:17 ` [PATCH 4/5] mfd: ab8500-sysctrl: set sysctrl_dev during probe Fabio Baltieri
2013-04-26 12:17 ` [PATCH 5/5] mfd: ab8500-sysctrl: let sysctrl driver work without pdata Fabio Baltieri
2013-05-02 12:34 ` [PATCH 0/5] various ab8500 fixes Linus Walleij
2013-05-03  8:01 ` Lee Jones

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).