From patchwork Mon Jun 12 18:07:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 9782605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C221D602DA for ; Mon, 12 Jun 2017 18:07:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B072228640 for ; Mon, 12 Jun 2017 18:07:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A526D2869F; Mon, 12 Jun 2017 18:07:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A26728640 for ; Mon, 12 Jun 2017 18:07:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752115AbdFLSHq (ORCPT ); Mon, 12 Jun 2017 14:07:46 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:51820 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbdFLSHq (ORCPT ); Mon, 12 Jun 2017 14:07:46 -0400 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990644AbdFLSHochhNd (ORCPT ); Mon, 12 Jun 2017 20:07:44 +0200 Date: Mon, 12 Jun 2017 20:07:41 +0200 From: Ladislav Michl To: Mike Looijmans Cc: linux-pm@vger.kernel.org, Javier Martinez Canillas Subject: Re: [PATCH 2/2] power: supply: ltc2941-battery-gauge: Add support for LTC2942 Message-ID: <20170612180741.indbu2qkt6hz7ji4@lenoch> References: <20170612150226.woxfdi4lharq5gtq@lenoch> <20170612150453.kjsyu5jjsfb7kzoq@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jun 12, 2017 at 06:29:54PM +0200, Mike Looijmans wrote: > On 12-6-2017 17:04, Ladislav Michl wrote: > > LTC2942 is pin compatible with LTC2941 providing additional > > informations about battery voltage and temperature. It can > > be runtime detected using bit A7 in the Status register. > > Runtime detection is always nice. I'd suggest adding "ltc2942" to the device > name list, since having to specify "ltc2941" when the chip is in fact an > "ltc2942" looks a bit strange. It is not that strange after the one who would otherwise blindly type ltc2942 reads the datasheet ;-) > Again, no strong preference, whatever the maintainers think is best is fine > with me also. What about adding something like this? diff --git a/Documentation/devicetree/bindings/power/supply/ltc2941.txt b/Documentation/devicetree/bindings/power/supply/ltc2941.txt index a9d7aa60558b..0d065d54d294 100644 --- a/Documentation/devicetree/bindings/power/supply/ltc2941.txt +++ b/Documentation/devicetree/bindings/power/supply/ltc2941.txt @@ -1,9 +1,10 @@ -binding for LTC2941 and LTC2943 battery gauges +binding for LTC2941, LTC2942 and LTC2943 battery gauges -Both the LTC2941 and LTC2943 measure battery capacity. -The LTC2943 is compatible with the LTC2941, it adds voltage and -temperature monitoring, and uses a slightly different conversion -formula for the charge counter. +All chips measure battery capacity. +The LTC2942 is pin compatible with the LTC2941, it adds voltage and +temperature monitoring, and is runtime detected. LTC2943 is software +compatible, uses a slightly different conversion formula for the +charge counter and adds voltage, current and temperature monitoring. Required properties: - compatible: Should contain "lltc,ltc2941" or "lltc,ltc2943" which also