From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933455AbcK1RNa (ORCPT ); Mon, 28 Nov 2016 12:13:30 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:51608 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933198AbcK1RNX (ORCPT ); Mon, 28 Nov 2016 12:13:23 -0500 Subject: Re: [PATCH] power: supply: bq27xxx_battery: Fix register map for BQ27510 and BQ27520 To: Sebastian Reichel References: <20161104183313.2767-1-afd@ti.com> <20161123230832.anbbhmllij4bxpsh@earth> CC: =?UTF-8?Q?Pali_Roh=c3=a1r?= , , From: "Andrew F. Davis" Message-ID: <792c4722-9f32-3fda-85b2-6c8320111151@ti.com> Date: Mon, 28 Nov 2016 11:13:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161123230832.anbbhmllij4bxpsh@earth> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/23/2016 05:08 PM, Sebastian Reichel wrote: > Hi, > > On Fri, Nov 04, 2016 at 01:33:13PM -0500, Andrew F. Davis wrote: >> The BQ27510 and BQ27520 use a slightly different register map than the >> BQ27500, add a new type enum and add these gauges to it. >> >> Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") >> Based-on-patch-by: Kenneth R. Crudup >> Signed-off-by: Andrew F. Davis >> --- >> drivers/power/supply/bq27xxx_battery.c | 41 +++++++++++++++++++++++++++++- >> drivers/power/supply/bq27xxx_battery_i2c.c | 4 +-- >> include/linux/power/bq27xxx_battery.h | 3 ++- >> 3 files changed, 44 insertions(+), 4 deletions(-) > > Queued into for-next. I think pali's hint, that bq27xxx_battery_overtemp() > should be implemented using a switch-case is valid to make the code more > readable. Please provide this change as follow-up patch. > I think there may be better ways than even switch-case, perhaps we can add additional info flags to the part's description tables, then just branch on that for each accessor type. Anyway, I'll see what I can to to clean this up when I get some bandwidth. Thanks, Andrew