lkml.org 
[lkml]   [2020]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv1 15/19] power: supply: sbs-battery: add ability to disable charger broadcasts
On 2020/05/13, Sebastian Reichel wrote:
> From: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
>
> In certain designs, it is possible to add a battery on a populated i2c
> bus without an sbs compliant charger. In that case, the battery will
> un-necessarily and sometimes un-desirably master the bus trying to write
> info in the charger.

Nit: s/un-/un/

>
> It is observed in many occasion that these battery "broadcasts" are even
> corrupting other ongoing master to slave communication. I.e. the
> multi-master support in the battery is inadequate.
>
> Thankfully, the CHARGER_MODE bit allows designers to disable that SBS
> battery behaviour.
>
> This needs to be done once when the battery is first seen on the bus.
>
> Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
> [rebased code]
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---

> @@ -1017,6 +1043,9 @@ static int sbs_probe(struct i2c_client *client,
> }
> chip->i2c_retry_count = chip->i2c_retry_count + 1;
>
> + chip->charger_broadcasts = !of_property_read_bool(client->dev.of_node,
> + "sbs,disable-charger-broadcasts");
> +
This patch adds the of_property_read, only for it to be replaced in the next
patch. Consider flipping the patch order?

-Emil

\
 
 \ /
  Last update: 2020-05-15 17:01    [W:0.493 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site