linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: supply: bq24910_charger: reset first_time check
@ 2016-09-23  3:32 Matt Ranostay
  2016-09-27  3:14 ` Matt Ranostay
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Ranostay @ 2016-09-23  3:32 UTC (permalink / raw)
  To: linux-pm, linux-kernel; +Cc: Sebastian Reichel, Matt Ranostay

bq24190_register_reset() function needs to reset the bdi->first_time
condition every time to avoid spurious interrupts in suspend/resume.

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
---
 drivers/power/supply/bq24190_charger.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index f5746b9f4e83..cc1dbdb1737f 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -513,6 +513,8 @@ static int bq24190_register_reset(struct bq24190_dev_info *bdi)
 	int ret, limit = 100;
 	u8 v;
 
+	bdi->first_time = true;
+
 	/* Reset the registers */
 	ret = bq24190_write_mask(bdi, BQ24190_REG_POC,
 			BQ24190_REG_POC_RESET_MASK,
@@ -1375,7 +1377,6 @@ static int bq24190_probe(struct i2c_client *client,
 	bdi->model = id->driver_data;
 	strncpy(bdi->model_name, id->name, I2C_NAME_SIZE);
 	mutex_init(&bdi->f_reg_lock);
-	bdi->first_time = true;
 	bdi->charger_health_valid = false;
 	bdi->battery_health_valid = false;
 	bdi->battery_status_valid = false;
-- 
2.7.4


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

* Re: [PATCH] power: supply: bq24910_charger: reset first_time check
  2016-09-23  3:32 [PATCH] power: supply: bq24910_charger: reset first_time check Matt Ranostay
@ 2016-09-27  3:14 ` Matt Ranostay
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Ranostay @ 2016-09-27  3:14 UTC (permalink / raw)
  To: Matt Ranostay; +Cc: linux-pm, linux-kernel, Sebastian Reichel

Hold off on this one. Currently reworking a patch series that won't
need this change after all.

On Thu, Sep 22, 2016 at 8:32 PM, Matt Ranostay <mranostay@gmail.com> wrote:
> bq24190_register_reset() function needs to reset the bdi->first_time
> condition every time to avoid spurious interrupts in suspend/resume.
>
> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
> ---
>  drivers/power/supply/bq24190_charger.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
> index f5746b9f4e83..cc1dbdb1737f 100644
> --- a/drivers/power/supply/bq24190_charger.c
> +++ b/drivers/power/supply/bq24190_charger.c
> @@ -513,6 +513,8 @@ static int bq24190_register_reset(struct bq24190_dev_info *bdi)
>         int ret, limit = 100;
>         u8 v;
>
> +       bdi->first_time = true;
> +
>         /* Reset the registers */
>         ret = bq24190_write_mask(bdi, BQ24190_REG_POC,
>                         BQ24190_REG_POC_RESET_MASK,
> @@ -1375,7 +1377,6 @@ static int bq24190_probe(struct i2c_client *client,
>         bdi->model = id->driver_data;
>         strncpy(bdi->model_name, id->name, I2C_NAME_SIZE);
>         mutex_init(&bdi->f_reg_lock);
> -       bdi->first_time = true;
>         bdi->charger_health_valid = false;
>         bdi->battery_health_valid = false;
>         bdi->battery_status_valid = false;
> --
> 2.7.4
>

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

end of thread, other threads:[~2016-09-27  3:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23  3:32 [PATCH] power: supply: bq24910_charger: reset first_time check Matt Ranostay
2016-09-27  3:14 ` Matt Ranostay

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