linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jonghwa3.lee@samsung.com
To: myungjoo.ham@samsung.com
Cc: 이종화 <jonghwa3.lee@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"sre@kernel.org" <sre@kernel.org>,
	"dbaryshkov@gmail.com" <dbaryshkov@gmail.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"anton@enomsg.org" <anton@enomsg.org>,
	"pavel@ucw.cz" <pavel@ucw.cz>, 최찬우 <cw00.choi@samsung.com>
Subject: Re: [PATCH RESEND v2 02/10] power: charger-manager: Use power_supply_changed() not private uevent.
Date: Fri, 19 Dec 2014 17:21:50 +0900	[thread overview]
Message-ID: <5493E01E.6090806@samsung.com> (raw)
In-Reply-To: <1443120167.38671418974875751.JavaMail.weblogic@epmlwas08d>

On 2014년 12월 19일 16:41, MyungJoo Ham wrote:

>>   
>>  Whenever battery status is changed, charger manager tries to trigger uevent
>> through private interface. This patch modifies it to use power_supply_changed()
>> since it belongs to power supply subsystem.
>>
>> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> 
> The original uevent_notify() has two additional mechanisms:
> C1. Save events in suspend-again context and show them up at wakeup.
> C2. If the new event is a duplicated event, ignore it.
> 
> Questions:
> Q1. Have you checked if C1 is met with the modification? Besides, have
> you made it sure that the modification won't change the behavior of
> suspend-again context? (whether "theoretical" or "experimental")


It won't ruin suspend-again context because it just changes the location where
the charger manager's notice to go.

> Q2. Do you still support C2?
>   For example, if we have notifited the user that we are charging
>   30 seconds ago, we should never bother the user with another message
>   that declares that it is charging unless we have notified that
>   we are not charging since then.
> 


Above case never happens. If charging state is not changed, the report will not
be triggered. Maybe current driver will send same event repeatedly even though,
these patch series will guarantee not to do so.

And also if we have a status changing while short time wake-up which expects
suspend-again proceeds in near future, I think it is better to notify it to the
user not to keep until undetermined 'TRUE' wake-up.

Thanks,
Jonghwa

> Cheers,
> MyungJoo.
> 
>> ---
>>  drivers/power/charger-manager.c |   91 +++++----------------------------------
>>  1 file changed, 11 insertions(+), 80 deletions(-)
>>
> N�����r��y���b�X��ǧv�^�)޺{.n�+����{��h��\x17��ܨ}���Ơz�&j:+v���\a����zZ+��+zf���h���~����i���z�\x1e�w���?����&�)ߢ^[fl===



  reply	other threads:[~2014-12-19  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19  7:41 [PATCH RESEND v2 02/10] power: charger-manager: Use power_supply_changed() not private uevent MyungJoo Ham
2014-12-19  8:21 ` jonghwa3.lee [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-12-19  2:47 [PATCH RESEND V2 0/10] Improve charger manager driver for optimized operation Jonghwa Lee
2014-12-19  2:47 ` [PATCH RESEND v2 02/10] power: charger-manager: Use power_supply_changed() not private uevent Jonghwa Lee

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=5493E01E.6090806@samsung.com \
    --to=jonghwa3.lee@samsung.com \
    --cc=anton@enomsg.org \
    --cc=cw00.choi@samsung.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.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).