diff mbox series

[1/3] watchdog: ux500_wdt: Drop platform data

Message ID 20210922230947.1864357-1-linus.walleij@linaro.org (mailing list archive)
State Accepted
Headers show
Series [1/3] watchdog: ux500_wdt: Drop platform data | expand

Commit Message

Linus Walleij Sept. 22, 2021, 11:09 p.m. UTC
Drop the platform data passing from the PRCMU driver. This platform
data was part of the ambition to support more SoCs, which in turn
were never mass produced.

Only a name remains of the MFD cell so switch to MFD_CELL_NAME().

Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Lee: it'd be prefect if you could ACK this so the watchdog people
can merge it, it shouldn't collide with any other changes to
the PRCMU driver.
---
 drivers/mfd/db8500-prcmu.c              | 13 +------------
 drivers/watchdog/ux500_wdt.c            | 13 ++-----------
 include/linux/platform_data/ux500_wdt.h | 18 ------------------
 3 files changed, 3 insertions(+), 41 deletions(-)
 delete mode 100644 include/linux/platform_data/ux500_wdt.h

Comments

Guenter Roeck Oct. 8, 2021, 12:49 p.m. UTC | #1
On 9/22/21 4:09 PM, Linus Walleij wrote:
> Drop the platform data passing from the PRCMU driver. This platform
> data was part of the ambition to support more SoCs, which in turn
> were never mass produced.
> 
> Only a name remains of the MFD cell so switch to MFD_CELL_NAME().
> 
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Lee: it'd be prefect if you could ACK this so the watchdog people
> can merge it, it shouldn't collide with any other changes to
> the PRCMU driver.
> ---
>   drivers/mfd/db8500-prcmu.c              | 13 +------------
>   drivers/watchdog/ux500_wdt.c            | 13 ++-----------
>   include/linux/platform_data/ux500_wdt.h | 18 ------------------
>   3 files changed, 3 insertions(+), 41 deletions(-)
>   delete mode 100644 include/linux/platform_data/ux500_wdt.h
> 
> diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
> index c1d3e7c116cf..ccf6be922b39 100644
> --- a/drivers/mfd/db8500-prcmu.c
> +++ b/drivers/mfd/db8500-prcmu.c
> @@ -36,7 +36,6 @@
>   #include <linux/mfd/abx500/ab8500.h>
>   #include <linux/regulator/db8500-prcmu.h>
>   #include <linux/regulator/machine.h>
> -#include <linux/platform_data/ux500_wdt.h>
>   #include "db8500-prcmu-regs.h"
>   
>   /* Index of different voltages to be used when accessing AVSData */
> @@ -2939,18 +2938,8 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
>   	},
>   };
>   
> -static struct ux500_wdt_data db8500_wdt_pdata = {
> -	.timeout = 600, /* 10 minutes */
> -	.has_28_bits_resolution = true,
> -};
> -
>   static const struct mfd_cell common_prcmu_devs[] = {
> -	{
> -		.name = "ux500_wdt",
> -		.platform_data = &db8500_wdt_pdata,
> -		.pdata_size = sizeof(db8500_wdt_pdata),
> -		.id = -1,
> -	},
> +	MFD_CELL_NAME("ux500_wdt"),
>   	MFD_CELL_NAME("db8500-cpuidle"),
>   };
>   
> diff --git a/drivers/watchdog/ux500_wdt.c b/drivers/watchdog/ux500_wdt.c
> index 072758106865..40f8cf1cb234 100644
> --- a/drivers/watchdog/ux500_wdt.c
> +++ b/drivers/watchdog/ux500_wdt.c
> @@ -15,7 +15,6 @@
>   #include <linux/uaccess.h>
>   #include <linux/watchdog.h>
>   #include <linux/platform_device.h>
> -#include <linux/platform_data/ux500_wdt.h>
>   
>   #include <linux/mfd/dbx500-prcmu.h>
>   
> @@ -23,7 +22,6 @@
>   
>   #define WATCHDOG_MIN	0
>   #define WATCHDOG_MAX28	268435  /* 28 bit resolution in ms == 268435.455 s */
> -#define WATCHDOG_MAX32	4294967 /* 32 bit resolution in ms == 4294967.295 s */
>   
>   static unsigned int timeout = WATCHDOG_TIMEOUT;
>   module_param(timeout, uint, 0);
> @@ -80,22 +78,15 @@ static struct watchdog_device ux500_wdt = {
>   	.info = &ux500_wdt_info,
>   	.ops = &ux500_wdt_ops,
>   	.min_timeout = WATCHDOG_MIN,
> -	.max_timeout = WATCHDOG_MAX32,
> +	.max_timeout = WATCHDOG_MAX28,
>   };
>   
>   static int ux500_wdt_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	int ret;
> -	struct ux500_wdt_data *pdata = dev_get_platdata(dev);
> -
> -	if (pdata) {
> -		if (pdata->timeout > 0)
> -			timeout = pdata->timeout;
> -		if (pdata->has_28_bits_resolution)
> -			ux500_wdt.max_timeout = WATCHDOG_MAX28;
> -	}
>   
> +	timeout = 600; /* Default to 10 minutes */
>   	ux500_wdt.parent = dev;
>   	watchdog_set_nowayout(&ux500_wdt, nowayout);
>   
> diff --git a/include/linux/platform_data/ux500_wdt.h b/include/linux/platform_data/ux500_wdt.h
> deleted file mode 100644
> index de6a4ad41e76..000000000000
> --- a/include/linux/platform_data/ux500_wdt.h
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-only */
> -/*
> - * Copyright (C) ST Ericsson SA 2011
> - *
> - * STE Ux500 Watchdog platform data
> - */
> -#ifndef __UX500_WDT_H
> -#define __UX500_WDT_H
> -
> -/**
> - * struct ux500_wdt_data
> - */
> -struct ux500_wdt_data {
> -	unsigned int timeout;
> -	bool has_28_bits_resolution;
> -};
> -
> -#endif /* __UX500_WDT_H */
>
Linus Walleij Oct. 13, 2021, 11:18 p.m. UTC | #2
On Thu, Sep 23, 2021 at 1:11 AM Linus Walleij <linus.walleij@linaro.org> wrote:

> Drop the platform data passing from the PRCMU driver. This platform
> data was part of the ambition to support more SoCs, which in turn
> were never mass produced.
>
> Only a name remains of the MFD cell so switch to MFD_CELL_NAME().
>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Lee do you think you could ACK this patch so Guenther
can merge this series?

Yours,
Linus Walleij
Guenter Roeck Oct. 29, 2021, 10:31 a.m. UTC | #3
On Thu, Sep 23, 2021 at 01:09:45AM +0200, Linus Walleij wrote:
> Drop the platform data passing from the PRCMU driver. This platform
> data was part of the ambition to support more SoCs, which in turn
> were never mass produced.
> 
> Only a name remains of the MFD cell so switch to MFD_CELL_NAME().
> 
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> Lee: it'd be prefect if you could ACK this so the watchdog people
> can merge it, it shouldn't collide with any other changes to
> the PRCMU driver.

Still waiting for an Ack from Lee to be able to apply this patch
(and with it the rest of the series) through the watchdog tree.

Guenter

> ---
>  drivers/mfd/db8500-prcmu.c              | 13 +------------
>  drivers/watchdog/ux500_wdt.c            | 13 ++-----------
>  include/linux/platform_data/ux500_wdt.h | 18 ------------------
>  3 files changed, 3 insertions(+), 41 deletions(-)
>  delete mode 100644 include/linux/platform_data/ux500_wdt.h
> 
> diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
> index c1d3e7c116cf..ccf6be922b39 100644
> --- a/drivers/mfd/db8500-prcmu.c
> +++ b/drivers/mfd/db8500-prcmu.c
> @@ -36,7 +36,6 @@
>  #include <linux/mfd/abx500/ab8500.h>
>  #include <linux/regulator/db8500-prcmu.h>
>  #include <linux/regulator/machine.h>
> -#include <linux/platform_data/ux500_wdt.h>
>  #include "db8500-prcmu-regs.h"
>  
>  /* Index of different voltages to be used when accessing AVSData */
> @@ -2939,18 +2938,8 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
>  	},
>  };
>  
> -static struct ux500_wdt_data db8500_wdt_pdata = {
> -	.timeout = 600, /* 10 minutes */
> -	.has_28_bits_resolution = true,
> -};
> -
>  static const struct mfd_cell common_prcmu_devs[] = {
> -	{
> -		.name = "ux500_wdt",
> -		.platform_data = &db8500_wdt_pdata,
> -		.pdata_size = sizeof(db8500_wdt_pdata),
> -		.id = -1,
> -	},
> +	MFD_CELL_NAME("ux500_wdt"),
>  	MFD_CELL_NAME("db8500-cpuidle"),
>  };
>  
> diff --git a/drivers/watchdog/ux500_wdt.c b/drivers/watchdog/ux500_wdt.c
> index 072758106865..40f8cf1cb234 100644
> --- a/drivers/watchdog/ux500_wdt.c
> +++ b/drivers/watchdog/ux500_wdt.c
> @@ -15,7 +15,6 @@
>  #include <linux/uaccess.h>
>  #include <linux/watchdog.h>
>  #include <linux/platform_device.h>
> -#include <linux/platform_data/ux500_wdt.h>
>  
>  #include <linux/mfd/dbx500-prcmu.h>
>  
> @@ -23,7 +22,6 @@
>  
>  #define WATCHDOG_MIN	0
>  #define WATCHDOG_MAX28	268435  /* 28 bit resolution in ms == 268435.455 s */
> -#define WATCHDOG_MAX32	4294967 /* 32 bit resolution in ms == 4294967.295 s */
>  
>  static unsigned int timeout = WATCHDOG_TIMEOUT;
>  module_param(timeout, uint, 0);
> @@ -80,22 +78,15 @@ static struct watchdog_device ux500_wdt = {
>  	.info = &ux500_wdt_info,
>  	.ops = &ux500_wdt_ops,
>  	.min_timeout = WATCHDOG_MIN,
> -	.max_timeout = WATCHDOG_MAX32,
> +	.max_timeout = WATCHDOG_MAX28,
>  };
>  
>  static int ux500_wdt_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	int ret;
> -	struct ux500_wdt_data *pdata = dev_get_platdata(dev);
> -
> -	if (pdata) {
> -		if (pdata->timeout > 0)
> -			timeout = pdata->timeout;
> -		if (pdata->has_28_bits_resolution)
> -			ux500_wdt.max_timeout = WATCHDOG_MAX28;
> -	}
>  
> +	timeout = 600; /* Default to 10 minutes */
>  	ux500_wdt.parent = dev;
>  	watchdog_set_nowayout(&ux500_wdt, nowayout);
>  
> diff --git a/include/linux/platform_data/ux500_wdt.h b/include/linux/platform_data/ux500_wdt.h
> deleted file mode 100644
> index de6a4ad41e76..000000000000
> --- a/include/linux/platform_data/ux500_wdt.h
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-only */
> -/*
> - * Copyright (C) ST Ericsson SA 2011
> - *
> - * STE Ux500 Watchdog platform data
> - */
> -#ifndef __UX500_WDT_H
> -#define __UX500_WDT_H
> -
> -/**
> - * struct ux500_wdt_data
> - */
> -struct ux500_wdt_data {
> -	unsigned int timeout;
> -	bool has_28_bits_resolution;
> -};
> -
> -#endif /* __UX500_WDT_H */
Lee Jones Oct. 29, 2021, 10:50 a.m. UTC | #4
On Fri, 29 Oct 2021, Guenter Roeck wrote:

> On Thu, Sep 23, 2021 at 01:09:45AM +0200, Linus Walleij wrote:
> > Drop the platform data passing from the PRCMU driver. This platform
> > data was part of the ambition to support more SoCs, which in turn
> > were never mass produced.
> > 
> > Only a name remains of the MFD cell so switch to MFD_CELL_NAME().
> > 
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > Lee: it'd be prefect if you could ACK this so the watchdog people
> > can merge it, it shouldn't collide with any other changes to
> > the PRCMU driver.
> 
> Still waiting for an Ack from Lee to be able to apply this patch
> (and with it the rest of the series) through the watchdog tree.

Apologies for not being clear - this was for the series:

https://lore.kernel.org/all/YWfQt8V2YNMr4t8F@google.com/
Guenter Roeck Oct. 29, 2021, 3:16 p.m. UTC | #5
On Fri, Oct 29, 2021 at 11:50:37AM +0100, Lee Jones wrote:
> On Fri, 29 Oct 2021, Guenter Roeck wrote:
> 
> > On Thu, Sep 23, 2021 at 01:09:45AM +0200, Linus Walleij wrote:
> > > Drop the platform data passing from the PRCMU driver. This platform
> > > data was part of the ambition to support more SoCs, which in turn
> > > were never mass produced.
> > > 
> > > Only a name remains of the MFD cell so switch to MFD_CELL_NAME().
> > > 
> > > Cc: Lee Jones <lee.jones@linaro.org>
> > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> > > ---
> > > Lee: it'd be prefect if you could ACK this so the watchdog people
> > > can merge it, it shouldn't collide with any other changes to
> > > the PRCMU driver.
> > 
> > Still waiting for an Ack from Lee to be able to apply this patch
> > (and with it the rest of the series) through the watchdog tree.
> 
> Apologies for not being clear - this was for the series:
> 
> https://lore.kernel.org/all/YWfQt8V2YNMr4t8F@google.com/
> 

No problem, I should have asked earlier.
Thanks a lot for the clarification.

Guenter

> -- 
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
diff mbox series

Patch

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index c1d3e7c116cf..ccf6be922b39 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -36,7 +36,6 @@ 
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/regulator/db8500-prcmu.h>
 #include <linux/regulator/machine.h>
-#include <linux/platform_data/ux500_wdt.h>
 #include "db8500-prcmu-regs.h"
 
 /* Index of different voltages to be used when accessing AVSData */
@@ -2939,18 +2938,8 @@  static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
 	},
 };
 
-static struct ux500_wdt_data db8500_wdt_pdata = {
-	.timeout = 600, /* 10 minutes */
-	.has_28_bits_resolution = true,
-};
-
 static const struct mfd_cell common_prcmu_devs[] = {
-	{
-		.name = "ux500_wdt",
-		.platform_data = &db8500_wdt_pdata,
-		.pdata_size = sizeof(db8500_wdt_pdata),
-		.id = -1,
-	},
+	MFD_CELL_NAME("ux500_wdt"),
 	MFD_CELL_NAME("db8500-cpuidle"),
 };
 
diff --git a/drivers/watchdog/ux500_wdt.c b/drivers/watchdog/ux500_wdt.c
index 072758106865..40f8cf1cb234 100644
--- a/drivers/watchdog/ux500_wdt.c
+++ b/drivers/watchdog/ux500_wdt.c
@@ -15,7 +15,6 @@ 
 #include <linux/uaccess.h>
 #include <linux/watchdog.h>
 #include <linux/platform_device.h>
-#include <linux/platform_data/ux500_wdt.h>
 
 #include <linux/mfd/dbx500-prcmu.h>
 
@@ -23,7 +22,6 @@ 
 
 #define WATCHDOG_MIN	0
 #define WATCHDOG_MAX28	268435  /* 28 bit resolution in ms == 268435.455 s */
-#define WATCHDOG_MAX32	4294967 /* 32 bit resolution in ms == 4294967.295 s */
 
 static unsigned int timeout = WATCHDOG_TIMEOUT;
 module_param(timeout, uint, 0);
@@ -80,22 +78,15 @@  static struct watchdog_device ux500_wdt = {
 	.info = &ux500_wdt_info,
 	.ops = &ux500_wdt_ops,
 	.min_timeout = WATCHDOG_MIN,
-	.max_timeout = WATCHDOG_MAX32,
+	.max_timeout = WATCHDOG_MAX28,
 };
 
 static int ux500_wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	int ret;
-	struct ux500_wdt_data *pdata = dev_get_platdata(dev);
-
-	if (pdata) {
-		if (pdata->timeout > 0)
-			timeout = pdata->timeout;
-		if (pdata->has_28_bits_resolution)
-			ux500_wdt.max_timeout = WATCHDOG_MAX28;
-	}
 
+	timeout = 600; /* Default to 10 minutes */
 	ux500_wdt.parent = dev;
 	watchdog_set_nowayout(&ux500_wdt, nowayout);
 
diff --git a/include/linux/platform_data/ux500_wdt.h b/include/linux/platform_data/ux500_wdt.h
deleted file mode 100644
index de6a4ad41e76..000000000000
--- a/include/linux/platform_data/ux500_wdt.h
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) ST Ericsson SA 2011
- *
- * STE Ux500 Watchdog platform data
- */
-#ifndef __UX500_WDT_H
-#define __UX500_WDT_H
-
-/**
- * struct ux500_wdt_data
- */
-struct ux500_wdt_data {
-	unsigned int timeout;
-	bool has_28_bits_resolution;
-};
-
-#endif /* __UX500_WDT_H */