From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759123Ab0I0Mfe (ORCPT ); Mon, 27 Sep 2010 08:35:34 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:51302 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759095Ab0I0Mfc (ORCPT ); Mon, 27 Sep 2010 08:35:32 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=YPLPWlqSi27QGCav/uUTqYWX3HmfWS7x6IyVlFewvyrxYkphgEml78AYjYa6WO2Ude FZ436PNVC2XAGwz/HcsXt/LbKQAxWeNgQqN/d/jI0NjyvDEwlJtiB4avwBXtSq7BvHIR F1QH9bBDeGnzfx4QEicNoczJfEvZBBpHnCK6w= MIME-Version: 1.0 In-Reply-To: References: <1285529740-28232-1-git-send-email-notasas@gmail.com> Date: Mon, 27 Sep 2010 18:05:22 +0530 Message-ID: Subject: Re: [PATCH v3] power_supply: Add driver for TWL4030/TPS65950 BCI charger From: Arun Murthy To: Grazvydas Ignotas Cc: Anton Vorontsov , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Felipe Balbi , Madhusudhan Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2010 at 4:24 PM, Grazvydas Ignotas wrote: > On Mon, Sep 27, 2010 at 10:21 AM, Arun Murthy wrote: >> On Mon, Sep 27, 2010 at 1:05 AM, Grazvydas Ignotas >> wrote: >>> --- >> Only AC and USB monitoring is achieved by registering with power supply >> class. >> How is battery monitored? >> An instance of battery is to be registered with power supply class in order >> to monitor battery. > > The problem is that BCI is only active while charging, when it is not > charging most (all?) monitoring registers freeze and no monitoring > happens (BCI registers read frozen values from last charge). So I > don't register battery as it has no useful data to report. I heard it > is possible to use MADC to perform monitoring while not charging, so > battery can be added when MADC driver is merged and corresponding code > is written for this driver. > How do I check the battery voltage? I need to check the battery voltage/current/temp and, if I am not wrong these are obtained from MADC. MADC driver has to be added first and then the battery. With being able to read the basic parameter battery voltage, this driver becomes incomplete. How do I get notified if battery voltage is low and needs charging from user space? Thanks and Regards, Arun R Murthy ---------------------