Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp569316ybk; Fri, 15 May 2020 08:02:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM4wjsbus+Y03KNMnS4r0j0QLOI+KDcR7PYblC0NCHytd4be40YYiOz36KdRWwBHtkMpc4 X-Received: by 2002:a05:6402:1d30:: with SMTP id dh16mr3107192edb.302.1589554955135; Fri, 15 May 2020 08:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589554955; cv=none; d=google.com; s=arc-20160816; b=kr5H8SHcXopnaBTGOqR9v66P0UEl2El3xW2of1xTEFMWAofa5Akaj0WyO7SJYRFpXU 1ZAMoQpuVLfIbjY/+uhdo9t8HnEgmYDEQbY6/BdPkj6+WXfbZjiwuQRMAtDasew65IPt 8auQttuuAq/Zh2rsXn0Mi5VSJbp3CQRSQDg2KcQ3n1liyYM3Dh8qZ2bzebWVxlkG+6az dScpLBMTYTmqCv02CBN/0g6hdHM+kN6REDD2NqBpCxYvitYQxstePZdsNq5UVf7YWe3n pwUWkfFSojKSXwsgayPPa7fmBVWwS4vz8K/UoYTIgpymwLKpI16XTT6KDNZovPx5CkqC 2PvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=wOccazWz/zek/S2ETYxlEqPvNK5A1zM29sk/YaYdyQQ=; b=xnTnO9MY8E8wOLPlJv0HoF2GOQSN8Hv+0K3lS1usrEyYpDKMDiD5oieCKXKyI6/19a AXv6NVsthZwAuTFIZ3V3hBM4Cvg4ws/RU9ehYgKRxA8NCc3ArB0zbscYyO2MmlhrYv70 W+TbLemHTF+Q+Kl9XEGkSZBibQb9GKciNJUlldR1gNXZKHxW4Wdcy3mOPwFmLrOU6lIN LgFrbD9Bt/l3dv6mfpISRADVvmvEb62VGWGq5lqX5P844/932SMn7AXLr20fMaDnLMAp z1/Tcul4ItWKmMDH23o/57GNqFupF989DRJxCa6XqmE7RN1S9ALgpzzJdnrBPk3q8KC1 ipww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ar7si1368757ejc.449.2020.05.15.08.02.07; Fri, 15 May 2020 08:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726227AbgEOPAf (ORCPT + 99 others); Fri, 15 May 2020 11:00:35 -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