Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751572AbdH2Jn5 (ORCPT ); Tue, 29 Aug 2017 05:43:57 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.219]:31585 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbdH2Jn4 (ORCPT ); Tue, 29 Aug 2017 05:43:56 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcecEarQROEYabkiUo6mSAGQ+qKID81PEGXJZ8= X-RZG-CLASS-ID: mo00 From: "H. Nikolaus Schaller" Content-Type: text/plain; charset=us-ascii Subject: dt-bindings: power: supply: bq27xxx: Add monitored-battery documentation Date: Tue, 29 Aug 2017 11:43:43 +0200 Message-Id: Cc: LKML , Discussions about the Letux Kernel , kernel@pyra-handheld.com To: Liam Breck , Sebastian Reichel Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7TGURaP028109 Content-Length: 1555 Lines: 36 Hi, I am trying to get this working on our bq27421. But the only message I get is: [ 6.086407] bq27xxx-battery 1-0055: data memory update not supported for chip A little research shows that this message comes from http://elixir.free-electrons.com/linux/v4.13-rc7/source/drivers/power/supply/bq27xxx_battery.c#L1279 So di->dm_regs is NULL. But doing an fgrep for dm_regs shows no line of code where the pointer is set to a non-null value: master hns$ fgrep -R dm_regs * drivers/power/supply/bq27xxx_battery.c: .class = (di)->dm_regs[i].subclass_id, \ drivers/power/supply/bq27xxx_battery.c: .block = (di)->dm_regs[i].offset / BQ27XXX_DM_SZ, \ drivers/power/supply/bq27xxx_battery.c: struct bq27xxx_dm_reg *reg = &di->dm_regs[reg_id]; drivers/power/supply/bq27xxx_battery.c: if (!di->dm_regs) { drivers/power/supply/bq27xxx_battery.c: max = di->dm_regs[BQ27XXX_DM_DESIGN_ENERGY].max; drivers/power/supply/bq27xxx_battery.c: max = di->dm_regs[BQ27XXX_DM_DESIGN_CAPACITY].max; drivers/power/supply/bq27xxx_battery.c: min = di->dm_regs[BQ27XXX_DM_TERMINATE_VOLTAGE].min; drivers/power/supply/bq27xxx_battery.c: max = di->dm_regs[BQ27XXX_DM_TERMINATE_VOLTAGE].max; Binary file drivers/power/supply/bq27xxx_battery.ko matches Binary file drivers/power/supply/bq27xxx_battery.o matches Binary file drivers/power/supply/bq27xxx_battery_i2c.ko matches Binary file drivers/power/supply/bq27xxx_battery_i2c.o matches include/linux/power/bq27xxx_battery.h: struct bq27xxx_dm_reg *dm_regs; master hns$ What am I doing wrong here? BR and thanks, Nikolaus