Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1492081

Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge current

From Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge current
Date 2016-09-27 20:00 +0200
Message-ID <sm4PD-441-17@gated-at.bofh.it> (permalink)
References <sm3gR-3iu-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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? Unfortunately, I don't have access to the datasheet and I didn't
find it online so I don't know where the actual current can be
accessed.

Thanks,
Wolfgang

[1] https://code.fossencdi.org/kernel_samsung_smdk4412.git/tree/drivers/battery/max77693_charger.c#n531

[2] https://code.fossencdi.org/kernel_samsung_smdk4412.git/tree/drivers/battery/max77693_charger.c#n552

-- 
Website: https://fossencdi.org
OpenPGP: 0F30 D1A0 2F73 F70A 6FEE  048E 5816 A24C 1075 7FC4
Key download: https://wiedmeyer.de/keys/ww.asc

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] max77693: USB event listener for charger Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 01:40 +0200
  [PATCH 3/3] power_supply: max77693: Listen for cable events and enable charging Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 01:40 +0200
    Re: [PATCH 3/3] power_supply: max77693: Listen for cable events and  enable charging Krzysztof Kozlowski <krzk@kernel.org> - 2016-09-27 10:20 +0200
      Re: [PATCH 3/3] power_supply: max77693: Listen for cable events and enable charging Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 15:40 +0200
        Re: [PATCH 3/3] power_supply: max77693: Listen for cable events and  enable charging Krzysztof Kozlowski <krzk@kernel.org> - 2016-09-28 10:00 +0200
  [PATCH 2/3] regulator: max77693: Also manipulate the fast charge current Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 01:40 +0200
    Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge  current Krzysztof Kozlowski <krzk@kernel.org> - 2016-09-27 10:10 +0200
      Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge current Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 16:00 +0200
        Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge  current Mark Brown <broonie@kernel.org> - 2016-09-27 18:20 +0200
          Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge current Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> - 2016-09-27 20:00 +0200
            Re: [PATCH 2/3] regulator: max77693: Also manipulate the fast charge  current Krzysztof Kozlowski <krzk@kernel.org> - 2016-09-28 10:10 +0200

csiph-web