From: Krzysztof Kozlowski <krzk@kernel.org>
To: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>,
Mark Brown <broonie@kernel.org>
Cc: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org,
cw00.choi@samsung.com, b.zolnierkie@samsung.com,
lgirdwood@gmail.com, lee.jones@linaro.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge current
Date: Wed, 28 Sep 2016 10:04:41 +0200 [thread overview]
Message-ID: <e9c76587-1a50-167c-0f4b-2442cbc0fa39@kernel.org> (raw)
In-Reply-To: <874m51w7r7.fsf@machinist.wiedmeyer.de>
On 09/27/2016 07:51 PM, Wolfgang Wiedmeyer wrote:
>
> Mark Brown writes:
>
>> On Tue, Sep 27, 2016 at 03:50:42PM +0200, Wolfgang Wiedmeyer wrote:
>>
>>> When charging is disabled (e.g. by removing the USB cable) the charge
>>> current is not reset to zero. So if I expose the current by the
>>> CURRENT_NOW property, it incorrectly reports the current that was set
>>> when charging was enabled, although there is no charging going on
>>> anymore. So I felt the need to update the charge current every time the
>>> charger gets enabled or disabled.
>>> Initially, the charge current is set to zero, so I think it needs to be
>>> set at least at the beginning to enable charging.
>>
>> Are you sure that the register value you're looking at is the actual
>> charge current right now and not just the maximum that the charger will
>> try to use depending on the conditions (supply available, battery
>> state...)? It seems like you're acting as though it's the latter but
>> that's not what the chip is doing.
>
> I was looking at the vendor code that was released for the Galaxy S3 and
> there the same register gets accessed for getting the current for
> the CURRENT_NOW property [1] and for setting the current [2]. So is this
> probably the wrong use of the CURRENT_NOW property because not the
> actual charge current is read but the maximum value that was
> set?
Yes, reading from this register will give only information about
currently set charge current. Not the real current.
Best regards,
Krzysztof
next prev parent reply other threads:[~2016-09-28 8:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 23:31 [PATCH 0/3] max77693: USB event listener for charger Wolfgang Wiedmeyer
2016-09-26 23:31 ` [PATCH 1/3] mfd: max77693: Add defines for charger current control Wolfgang Wiedmeyer
2016-09-27 8:06 ` Krzysztof Kozlowski
2016-09-27 13:54 ` Wolfgang Wiedmeyer
2016-09-26 23:31 ` [PATCH 2/3] regulator: max77693: Also manipulate the fast charge current Wolfgang Wiedmeyer
2016-09-27 8:03 ` Krzysztof Kozlowski
2016-09-27 13:50 ` Wolfgang Wiedmeyer
2016-09-27 16:15 ` Mark Brown
2016-09-27 17:51 ` Wolfgang Wiedmeyer
2016-09-28 8:04 ` Krzysztof Kozlowski [this message]
2016-09-26 23:31 ` [PATCH 3/3] power_supply: max77693: Listen for cable events and enable charging Wolfgang Wiedmeyer
2016-09-27 8:13 ` Krzysztof Kozlowski
2016-09-27 13:34 ` Wolfgang Wiedmeyer
2016-09-28 7:56 ` Krzysztof Kozlowski
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=e9c76587-1a50-167c-0f4b-2442cbc0fa39@kernel.org \
--to=krzk@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
--cc=wolfgit@wiedmeyer.de \
/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
Powered by JetHome