From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 16/24] ab8500-bm: Flush all work queues before suspending
Date: Tue, 22 Jan 2013 08:43:34 +0000 [thread overview]
Message-ID: <20130122084334.GD6857@gmail.com> (raw)
In-Reply-To: <20130121191411.GA16177@lizard.mcd01528.sjc.wayport.net>
On Mon, 21 Jan 2013, Anton Vorontsov wrote:
> On Mon, Jan 21, 2013 at 12:03:52PM +0000, Lee Jones wrote:
> > From: Jonas Aaberg <jonas.aberg@stericsson.com>
> >
> > Flush all workqueues at suspend time to avoid suspending during work.
> >
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
> > Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
> > Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/61915
>
> I do remeber I was commenting on that patch, and I was asking to merge the
> changes into the patches that introduce the workqueues (aka problems).
>
> Now I see that "ab8500_charger: Detect charger removal" commit already in
> the mainline, i.e. I merged the patch with the *known* possible
> regression. The issue was known to me during the first review cycle, and I
> pointed you to my review comments. But the patch sneaked in anyway...
I assure you I didn't _sneak_ any patch in. I'm working on small, simplified
patch-sets for your convenience. I didn't look at the review comments
for this patch until I placed it in this patch-set. By the time I did
look, the offending patch was already in -next. To solve this type of
situation, I can either send you the whole lot in one go with
everything fixed-up and squashed, or we can continue dealing with more
manageable patch-sets where situations like this are bound to happen
occasionally.
Even when working directly with Mainline, we still have patches which
fixup issues which were introduced earlier in the development
cycle. I'm not sure on your view of it exactly, but I don't think it's
the end of the world?
> > ---
> > drivers/power/ab8500_charger.c | 11 +++++++++++
> > drivers/power/ab8500_fg.c | 5 +++++
> > 2 files changed, 16 insertions(+)
> >
> > diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
> > index da965ee..a632b94 100644
> > --- a/drivers/power/ab8500_charger.c
> > +++ b/drivers/power/ab8500_charger.c
> > @@ -2866,6 +2866,17 @@ static int ab8500_charger_suspend(struct platform_device *pdev,
> > if (delayed_work_pending(&di->check_hw_failure_work))
> > cancel_delayed_work(&di->check_hw_failure_work);
> >
> > + flush_delayed_work(&di->attach_work);
> > + flush_delayed_work(&di->usb_charger_attached_work);
> > + flush_delayed_work(&di->ac_charger_attached_work);
> > + flush_delayed_work(&di->check_usbchgnotok_work);
> > + flush_delayed_work(&di->check_vbat_work);
> > + flush_delayed_work(&di->kick_wd_work);
> > +
> > + flush_work(&di->usb_link_status_work);
> > + flush_work(&di->ac_work);
> > + flush_work(&di->detect_usb_type_work);
> > +
> > return 0;
> > }
> > #else
> > diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
> > index 0378aab..1a78116 100644
> > --- a/drivers/power/ab8500_fg.c
> > +++ b/drivers/power/ab8500_fg.c
> > @@ -2410,6 +2410,11 @@ static int ab8500_fg_suspend(struct platform_device *pdev,
> > struct ab8500_fg *di = platform_get_drvdata(pdev);
> >
> > flush_delayed_work(&di->fg_periodic_work);
> > + flush_work(&di->fg_work);
> > + flush_work(&di->fg_acc_cur_work);
> > + flush_delayed_work(&di->fg_reinit_work);
> > + flush_delayed_work(&di->fg_low_bat_work);
> > + flush_delayed_work(&di->fg_check_hw_failure_work);
> >
> > /*
> > * If the FG is enabled we will disable it before going to suspend
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2013-01-22 8:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 12:03 [PATCH 00/24] Power: Next batch of AB8500 Battery Management patches Lee Jones
2013-01-21 12:03 ` [PATCH 01/24] pm2301: Provide u9540 support for the pm2301 charger Lee Jones
2013-01-21 12:03 ` [PATCH 02/24] ab8500-charger: AB workaround for invalid charger Lee Jones
2013-01-21 12:03 ` [PATCH 03/24] ab8500-fg: Adjust for RF bursts voltage drops Lee Jones
2013-01-21 12:03 ` [PATCH 04/24] ab8500-btemp: Adaptation to AB8505 and AB9540 platforms Lee Jones
2013-01-21 12:03 ` [PATCH 05/24] ab8500-charger: Kick watchdog Lee Jones
2013-01-21 12:03 ` [PATCH 06/24] ab8500-chargalg: Update battery health on safety timer exp Lee Jones
2013-01-21 12:03 ` [PATCH 07/24] pm2301: Add deep debug Lee Jones
2013-01-21 12:03 ` [PATCH 08/24] pm2301: Clean-up PM2301 interrupt management Lee Jones
2013-01-21 12:03 ` [PATCH 09/24] pm2301: Remove volt_now & curr_now properties Lee Jones
2013-01-21 12:03 ` [PATCH 10/24] ab8500-chargalg: Only root should have write permission on sysfs file Lee Jones
2013-01-21 19:17 ` Anton Vorontsov
2013-01-21 12:03 ` [PATCH 11/24] pm2301: Update watchdog for pm2xxx support Lee Jones
2013-01-21 12:03 ` [PATCH 12/24] ab8500-fg: Add test interface for u9540 Lee Jones
2013-01-21 12:03 ` [PATCH 13/24] abx500-chargalg: Add new sysfs interface to get current charge status Lee Jones
2013-01-21 12:03 ` [PATCH 14/24] ab8500-charger: Add support for autopower on AB8505 and AB9540 Lee Jones
2013-01-21 12:03 ` [PATCH 15/24] ab8500-fg: Go to INIT_RECOVERY when charger removed Lee Jones
2013-01-21 12:03 ` [PATCH 16/24] ab8500-bm: Flush all work queues before suspending Lee Jones
2013-01-21 19:14 ` Anton Vorontsov
2013-01-22 8:43 ` Lee Jones [this message]
2013-01-21 12:03 ` [PATCH 17/24] ab8500-fg-deepdebug: Create Deep Debug interface Lee Jones
2013-01-21 12:03 ` [PATCH 18/24] pm2301: Enable vbat low monitoring Lee Jones
2013-01-21 12:03 ` [PATCH 19/24] pm2301: LPN mode control support Lee Jones
2013-01-21 12:03 ` [PATCH 20/24] ab8500-fg: Use correct battery charge full design Lee Jones
2013-01-21 12:03 ` [PATCH 21/24] ab8500-charger: Do not touch VBUSOVV bits Lee Jones
2013-01-21 12:03 ` [PATCH 22/24] ab8500-bm: Remove individual [charger|btemp|fg|chargalg] pdata structures Lee Jones
2013-01-21 12:03 ` [PATCH 23/24] ab8500-bm: Fix minor niggles experienced during testing Lee Jones
2013-01-21 19:13 ` Anton Vorontsov
2013-01-22 8:44 ` Lee Jones
2013-01-22 9:27 ` Lee Jones
2013-01-23 6:25 ` Anton Vorontsov
2013-01-23 8:16 ` Lee Jones
2013-01-21 12:04 ` [PATCH 24/24] u8500-charger: Delay for USB enumeration Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130122084334.GD6857@gmail.com \
--to=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).