Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751310AbdH2RbR (ORCPT ); Tue, 29 Aug 2017 13:31:17 -0400 Received: from kronos.dragonbox.de ([88.99.27.96]:49486 "EHLO kronos.dragonbox.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbdH2RbQ (ORCPT ); Tue, 29 Aug 2017 13:31:16 -0400 Message-ID: <1504027874.1404.4.camel@openpandora.org> Subject: Re: dt-bindings: power: supply: bq27xxx: Add monitored-battery documentation From: Michael Mrozek To: "H. Nikolaus Schaller" Cc: kernel@pyra-handheld.com, Liam Breck , Sebastian Reichel , Discussions about the Letux Kernel , LKML Date: Tue, 29 Aug 2017 19:31:14 +0200 In-Reply-To: <295D5DC5-7385-425B-847B-5AF9F93F85F7@goldelico.com> References: <0AB88D4C-1F05-4B4A-909E-7DBBD6FD0B13@openpandora.org> <295D5DC5-7385-425B-847B-5AF9F93F85F7@goldelico.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.4 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3290 Lines: 108 Am Dienstag, den 29.08.2017, 15:33 +0200 schrieb H. Nikolaus Schaller: Yes, they were just quick fixes for us, not to be used directly for something else. I just thought those might help finding the issue for you :) > Hi, > > > Am 29.08.2017 um 15:25 schrieb Michael Mrozek > ra.org>: > > > > The battery monitor has been fixed by notaz. > > Find the commits here: > > > > https://dev.pyra-handheld.com/notaz/pyra-kernel/commits/pyra-4.10 < > > https://dev.pyra-handheld.com/notaz/pyra-kernel/commits/pyra-4.10> > > yes, I have seen it. > > Anyways the patches from Liam seem to work on 4.13-rc7 and are a much > more general solution. > I am just starting to test a little. > > BR, > Nikolaus > > > > > > On August 29, 2017 11:43:43 AM GMT+02:00, "H. Nikolaus Schaller" > ns@goldelico.com> wrote: > > 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/po > > wer/supply/bq27xxx_battery.c#L1279 > m/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 > > > > > > Kernel mailing list > > Kernel@pyra-handheld.com > > http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel > ra-handheld.com/cgi-bin/mailman/listinfo/kernel> > > > > -- > > Sent from my Android device with K-9 Mail. Please excuse my > > brevity. > > -- Mit freundlichen Grüßen, Michael Mrozek ----------------------- OpenPandora GmbH Geschäftsführer: Michael Mrozek Schäffbräustr. 11 85049 Ingolstadt Deutschland Tel.: 0841 / 990 5548 http://www.openpandora.de/ HRB 4879, Amtsgericht Ingolstadt ----------------------- eMail: mrozek@openpandora.org