From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7B53C433E1 for ; Fri, 15 May 2020 15:00:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD3B9207BB for ; Fri, 15 May 2020 15:00:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726250AbgEOPAg (ORCPT ); Fri, 15 May 2020 11:00:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726174AbgEOPAf (ORCPT ); Fri, 15 May 2020 11:00:35 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 472FFC061A0C; Fri, 15 May 2020 08:00:35 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: evelikov) with ESMTPSA id A7C892A2DB7 Date: Fri, 15 May 2020 15:57:55 +0100 From: Emil Velikov To: Sebastian Reichel Cc: Sebastian Reichel , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Jean-Francois Dagenais Subject: Re: [PATCHv1 15/19] power: supply: sbs-battery: add ability to disable charger broadcasts Message-ID: <20200515145755.GD2836808@arch-x1c3> References: <20200513185615.508236-1-sebastian.reichel@collabora.com> <20200513185615.508236-16-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200513185615.508236-16-sebastian.reichel@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/05/13, Sebastian Reichel wrote: > From: Jean-Francois Dagenais > > 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 > [rebased code] > Signed-off-by: Sebastian Reichel > --- > @@ -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