diff mbox

[2/2] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL

Message ID 1423221888-32052-3-git-send-email-k.kozlowski@samsung.com
State Accepted
Headers show

Commit Message

Krzysztof Kozlowski Feb. 6, 2015, 11:24 a.m. UTC
The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
Power Loss) were removed from rtc-s5m driver because they were not used.
Remove them (and on/off interrupt) from main MFD driver and header.

Additionally remove ENOMEM error message.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/mfd/sec-core.c           | 5 +----
 include/linux/mfd/samsung/core.h | 9 ---------
 2 files changed, 1 insertion(+), 13 deletions(-)

Comments

Krzysztof Kozlowski Feb. 24, 2015, 7:50 a.m. UTC | #1
On pią, 2015-02-06 at 12:24 +0100, Krzysztof Kozlowski wrote:
> The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
> Power Loss) were removed from rtc-s5m driver because they were not used.
> Remove them (and on/off interrupt) from main MFD driver and header.
> 
> Additionally remove ENOMEM error message.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  drivers/mfd/sec-core.c           | 5 +----
>  include/linux/mfd/samsung/core.h | 9 ---------
>  2 files changed, 1 insertion(+), 13 deletions(-)

Dear Lee,

This patch depends on 1/2 which was picked by Andrew Morton:
http://ozlabs.org/~akpm/mmots/broken-out/rtc-s5m-remove-unused-watchdog-and-sudden-momentary-power-loss.patch

If this looks OK to you, maybe you could ack it and this patch would
also go through Andrew's tree?

Best regards,
Krzysztof

> 
> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index 0a7bc43db4e4..2253d44e631c 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -267,10 +267,8 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata(
>  	struct sec_platform_data *pd;
>  
>  	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> -	if (!pd) {
> -		dev_err(dev, "could not allocate memory for pdata\n");
> +	if (!pd)
>  		return ERR_PTR(-ENOMEM);
> -	}
>  
>  	/*
>  	 * ToDo: the 'wakeup' member in the platform data is more of a linux
> @@ -333,7 +331,6 @@ static int sec_pmic_probe(struct i2c_client *i2c,
>  	}
>  	if (pdata) {
>  		sec_pmic->device_type = pdata->device_type;
> -		sec_pmic->ono = pdata->ono;
>  		sec_pmic->irq_base = pdata->irq_base;
>  		sec_pmic->wakeup = pdata->wakeup;
>  		sec_pmic->pdata = pdata;
> diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
> index 3fdb7cfbffb3..75115384f3fc 100644
> --- a/include/linux/mfd/samsung/core.h
> +++ b/include/linux/mfd/samsung/core.h
> @@ -58,13 +58,7 @@ enum sec_device_type {
>   * @irq_base:		Base IRQ number for device, required for IRQs
>   * @irq:		Generic IRQ number for device
>   * @irq_data:		Runtime data structure for IRQ controller
> - * @ono:		Power onoff IRQ number for s5m87xx
>   * @wakeup:		Whether or not this is a wakeup device
> - * @wtsr_smpl:		Whether or not to enable in RTC driver the Watchdog
> - *			Timer Software Reset (registers set to default value
> - *			after PWRHOLD falling) and Sudden Momentary Power Loss
> - *			(PMIC will enter power on sequence after short drop in
> - *			VBATT voltage).
>   */
>  struct sec_pmic_dev {
>  	struct device *dev;
> @@ -77,9 +71,7 @@ struct sec_pmic_dev {
>  	int irq;
>  	struct regmap_irq_chip_data *irq_data;
>  
> -	int ono;
>  	bool wakeup;
> -	bool wtsr_smpl;
>  };
>  
>  int sec_irq_init(struct sec_pmic_dev *sec_pmic);
> @@ -95,7 +87,6 @@ struct sec_platform_data {
>  	int				irq_base;
>  	int				(*cfg_pmic_irq)(void);
>  
> -	int				ono;
>  	bool				wakeup;
>  	bool				buck_voltage_lock;
>
Lee Jones Feb. 24, 2015, 10:20 a.m. UTC | #2
On Tue, 24 Feb 2015, Krzysztof Kozlowski wrote:

> On pią, 2015-02-06 at 12:24 +0100, Krzysztof Kozlowski wrote:
> > The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
> > Power Loss) were removed from rtc-s5m driver because they were not used.
> > Remove them (and on/off interrupt) from main MFD driver and header.
> > 
> > Additionally remove ENOMEM error message.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > ---
> >  drivers/mfd/sec-core.c           | 5 +----
> >  include/linux/mfd/samsung/core.h | 9 ---------
> >  2 files changed, 1 insertion(+), 13 deletions(-)
> 
> Dear Lee,
> 
> This patch depends on 1/2 which was picked by Andrew Morton:
> http://ozlabs.org/~akpm/mmots/broken-out/rtc-s5m-remove-unused-watchdog-and-sudden-momentary-power-loss.patch
> 
> If this looks OK to you, maybe you could ack it and this patch would
> also go through Andrew's tree?

Don't worry about the MM tree.  Once I pick both patches, they will be
automatically removed.

> > diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> > index 0a7bc43db4e4..2253d44e631c 100644
> > --- a/drivers/mfd/sec-core.c
> > +++ b/drivers/mfd/sec-core.c
> > @@ -267,10 +267,8 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata(
> >  	struct sec_platform_data *pd;
> >  
> >  	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> > -	if (!pd) {
> > -		dev_err(dev, "could not allocate memory for pdata\n");
> > +	if (!pd)
> >  		return ERR_PTR(-ENOMEM);
> > -	}
> >  
> >  	/*
> >  	 * ToDo: the 'wakeup' member in the platform data is more of a linux
> > @@ -333,7 +331,6 @@ static int sec_pmic_probe(struct i2c_client *i2c,
> >  	}
> >  	if (pdata) {
> >  		sec_pmic->device_type = pdata->device_type;
> > -		sec_pmic->ono = pdata->ono;
> >  		sec_pmic->irq_base = pdata->irq_base;
> >  		sec_pmic->wakeup = pdata->wakeup;
> >  		sec_pmic->pdata = pdata;
> > diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
> > index 3fdb7cfbffb3..75115384f3fc 100644
> > --- a/include/linux/mfd/samsung/core.h
> > +++ b/include/linux/mfd/samsung/core.h
> > @@ -58,13 +58,7 @@ enum sec_device_type {
> >   * @irq_base:		Base IRQ number for device, required for IRQs
> >   * @irq:		Generic IRQ number for device
> >   * @irq_data:		Runtime data structure for IRQ controller
> > - * @ono:		Power onoff IRQ number for s5m87xx
> >   * @wakeup:		Whether or not this is a wakeup device
> > - * @wtsr_smpl:		Whether or not to enable in RTC driver the Watchdog
> > - *			Timer Software Reset (registers set to default value
> > - *			after PWRHOLD falling) and Sudden Momentary Power Loss
> > - *			(PMIC will enter power on sequence after short drop in
> > - *			VBATT voltage).
> >   */
> >  struct sec_pmic_dev {
> >  	struct device *dev;
> > @@ -77,9 +71,7 @@ struct sec_pmic_dev {
> >  	int irq;
> >  	struct regmap_irq_chip_data *irq_data;
> >  
> > -	int ono;
> >  	bool wakeup;
> > -	bool wtsr_smpl;
> >  };
> >  
> >  int sec_irq_init(struct sec_pmic_dev *sec_pmic);
> > @@ -95,7 +87,6 @@ struct sec_platform_data {
> >  	int				irq_base;
> >  	int				(*cfg_pmic_irq)(void);
> >  
> > -	int				ono;
> >  	bool				wakeup;
> >  	bool				buck_voltage_lock;
> >  
>
Lee Jones Feb. 25, 2015, 3:29 p.m. UTC | #3
On Fri, 06 Feb 2015, Krzysztof Kozlowski wrote:

> The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
> Power Loss) were removed from rtc-s5m driver because they were not used.
> Remove them (and on/off interrupt) from main MFD driver and header.
> 
> Additionally remove ENOMEM error message.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  drivers/mfd/sec-core.c           | 5 +----
>  include/linux/mfd/samsung/core.h | 9 ---------
>  2 files changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index 0a7bc43db4e4..2253d44e631c 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -267,10 +267,8 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata(
>  	struct sec_platform_data *pd;
>  
>  	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> -	if (!pd) {
> -		dev_err(dev, "could not allocate memory for pdata\n");
> +	if (!pd)
>  		return ERR_PTR(-ENOMEM);
> -	}

This change doesn't have anything to do with removing the WTSR and
SMPL.

Once you've seperated this out, send both patches with my:

Acked-by: Lee Jones <lee.jones@linaro.org>

>  	/*
>  	 * ToDo: the 'wakeup' member in the platform data is more of a linux
> @@ -333,7 +331,6 @@ static int sec_pmic_probe(struct i2c_client *i2c,
>  	}
>  	if (pdata) {
>  		sec_pmic->device_type = pdata->device_type;
> -		sec_pmic->ono = pdata->ono;
>  		sec_pmic->irq_base = pdata->irq_base;
>  		sec_pmic->wakeup = pdata->wakeup;
>  		sec_pmic->pdata = pdata;
> diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
> index 3fdb7cfbffb3..75115384f3fc 100644
> --- a/include/linux/mfd/samsung/core.h
> +++ b/include/linux/mfd/samsung/core.h
> @@ -58,13 +58,7 @@ enum sec_device_type {
>   * @irq_base:		Base IRQ number for device, required for IRQs
>   * @irq:		Generic IRQ number for device
>   * @irq_data:		Runtime data structure for IRQ controller
> - * @ono:		Power onoff IRQ number for s5m87xx
>   * @wakeup:		Whether or not this is a wakeup device
> - * @wtsr_smpl:		Whether or not to enable in RTC driver the Watchdog
> - *			Timer Software Reset (registers set to default value
> - *			after PWRHOLD falling) and Sudden Momentary Power Loss
> - *			(PMIC will enter power on sequence after short drop in
> - *			VBATT voltage).
>   */
>  struct sec_pmic_dev {
>  	struct device *dev;
> @@ -77,9 +71,7 @@ struct sec_pmic_dev {
>  	int irq;
>  	struct regmap_irq_chip_data *irq_data;
>  
> -	int ono;
>  	bool wakeup;
> -	bool wtsr_smpl;
>  };
>  
>  int sec_irq_init(struct sec_pmic_dev *sec_pmic);
> @@ -95,7 +87,6 @@ struct sec_platform_data {
>  	int				irq_base;
>  	int				(*cfg_pmic_irq)(void);
>  
> -	int				ono;
>  	bool				wakeup;
>  	bool				buck_voltage_lock;
>
Lee Jones Feb. 25, 2015, 3:30 p.m. UTC | #4
On Wed, 25 Feb 2015, Lee Jones wrote:

> On Fri, 06 Feb 2015, Krzysztof Kozlowski wrote:
> 
> > The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
> > Power Loss) were removed from rtc-s5m driver because they were not used.
> > Remove them (and on/off interrupt) from main MFD driver and header.
> > 
> > Additionally remove ENOMEM error message.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > ---
> >  drivers/mfd/sec-core.c           | 5 +----
> >  include/linux/mfd/samsung/core.h | 9 ---------
> >  2 files changed, 1 insertion(+), 13 deletions(-)
> > 
> > diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> > index 0a7bc43db4e4..2253d44e631c 100644
> > --- a/drivers/mfd/sec-core.c
> > +++ b/drivers/mfd/sec-core.c
> > @@ -267,10 +267,8 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata(
> >  	struct sec_platform_data *pd;
> >  
> >  	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> > -	if (!pd) {
> > -		dev_err(dev, "could not allocate memory for pdata\n");
> > +	if (!pd)
> >  		return ERR_PTR(-ENOMEM);
> > -	}
> 
> This change doesn't have anything to do with removing the WTSR and
> SMPL.
> 
> Once you've seperated this out, send both patches with my:
> 
> Acked-by: Lee Jones <lee.jones@linaro.org>

Don't forget to send the RTC patch too, or I'll forget to apply it.
diff mbox

Patch

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 0a7bc43db4e4..2253d44e631c 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -267,10 +267,8 @@  static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata(
 	struct sec_platform_data *pd;
 
 	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
-	if (!pd) {
-		dev_err(dev, "could not allocate memory for pdata\n");
+	if (!pd)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	/*
 	 * ToDo: the 'wakeup' member in the platform data is more of a linux
@@ -333,7 +331,6 @@  static int sec_pmic_probe(struct i2c_client *i2c,
 	}
 	if (pdata) {
 		sec_pmic->device_type = pdata->device_type;
-		sec_pmic->ono = pdata->ono;
 		sec_pmic->irq_base = pdata->irq_base;
 		sec_pmic->wakeup = pdata->wakeup;
 		sec_pmic->pdata = pdata;
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index 3fdb7cfbffb3..75115384f3fc 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -58,13 +58,7 @@  enum sec_device_type {
  * @irq_base:		Base IRQ number for device, required for IRQs
  * @irq:		Generic IRQ number for device
  * @irq_data:		Runtime data structure for IRQ controller
- * @ono:		Power onoff IRQ number for s5m87xx
  * @wakeup:		Whether or not this is a wakeup device
- * @wtsr_smpl:		Whether or not to enable in RTC driver the Watchdog
- *			Timer Software Reset (registers set to default value
- *			after PWRHOLD falling) and Sudden Momentary Power Loss
- *			(PMIC will enter power on sequence after short drop in
- *			VBATT voltage).
  */
 struct sec_pmic_dev {
 	struct device *dev;
@@ -77,9 +71,7 @@  struct sec_pmic_dev {
 	int irq;
 	struct regmap_irq_chip_data *irq_data;
 
-	int ono;
 	bool wakeup;
-	bool wtsr_smpl;
 };
 
 int sec_irq_init(struct sec_pmic_dev *sec_pmic);
@@ -95,7 +87,6 @@  struct sec_platform_data {
 	int				irq_base;
 	int				(*cfg_pmic_irq)(void);
 
-	int				ono;
 	bool				wakeup;
 	bool				buck_voltage_lock;