From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932988AbcGEMnh (ORCPT ); Tue, 5 Jul 2016 08:43:37 -0400 Received: from smtprelay.restena.lu ([158.64.1.62]:54221 "EHLO smtprelay.restena.lu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932877AbcGEMne (ORCPT ); Tue, 5 Jul 2016 08:43:34 -0400 Date: Tue, 5 Jul 2016 14:43:17 +0200 From: Bruno =?UTF-8?B?UHLDqW1vbnQ=?= To: Icenowy Zheng Cc: Michael Haas , Wens , Maxime Ripard , sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org, robh+dt@kernel.org, Mark Rutland , linux@armlinux.org.uk, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] [PATCH 2/4] power: add axp20x-battery driver Message-ID: <20160705144317.4a654376@pluto.restena.lu> In-Reply-To: <112861467708458@web7h.yandex.ru> References: <20160701092926.32005-1-icenowy@aosc.xyz> <20160701092926.32005-2-icenowy@aosc.xyz> <577B44FD.6040404@mailbox.org> <112861467708458@web7h.yandex.ru> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 05 Jul 2016 16:47:38 +0800 Icenowy Zheng wrote: > I read the datasheet of axp20x, and then found that this driver does > not support backup RTC battery. > (But maybe backup battery do not need a driver -- at least on IBM PC > it has no driver) A driver is needed to enable/disable the RTC battery charging (unless uboot does it). However all the driver can do according to datasheet is configure the charge voltage/current or disable charging completely. Monitoring RTC battery is not possible, neither is presence detection. So driver should just apply configuration it finds in device-tree and eventually share that information via power supply class. > And I don't know whether the axp20x has default Li-ion/LiPo battery > OCV parameter. (axp22x seems to be have a set of default OCV) It seems to have default OCV parameters as well. With empty RTC battery OCV values are present. > You can test this driver on AXP20x. (I think I didn't access to > AXP22x-specified registers in the power supply code) Bruno