From patchwork Sun Sep 25 21:10:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Wiedmeyer X-Patchwork-Id: 9349945 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 85EE06086A for ; Sun, 25 Sep 2016 21:17:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7297328C07 for ; Sun, 25 Sep 2016 21:17:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6535C28C81; Sun, 25 Sep 2016 21:17:57 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 134E928C07 for ; Sun, 25 Sep 2016 21:17:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034624AbcIYVR4 (ORCPT ); Sun, 25 Sep 2016 17:17:56 -0400 Received: from wiedmeyer.de ([85.116.192.112]:39492 "EHLO wiedmeyer.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034632AbcIYVRy (ORCPT ); Sun, 25 Sep 2016 17:17:54 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by wiedmeyer.localdomain (Postfix) with ESMTP id E95BA8E91AF for ; Sun, 25 Sep 2016 23:11:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wiedmeyer.de; s=dkim; t=1474837870; bh=rroAQiWmRhgGOb0qfL1hyLhQny7VPCojBeDdeHwP1GM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NnDSpjP0IYFwqIhUx8JTHw7zjRjMwMGhT5gje08KqPXmY320EaioWs3TTvxW682SC cs3/AXq7ait3HbcSp3Np0eyKRtXR5iyAM81jEvEv3arbFALAWetPpGojDTScCgyK2+ CGylP0+KBjbzjSJrUIk8ZfhjML8N8Girkyq3q9WgLGmIYdfZtmiEjOQmWf2Y9vKlLC R8Vg5gMd1hIBpX+rQ4p1aaLlprQy00uJ3kiwGdG1VromZ8uEaDZvOBIvEQGyhSLlJU /3+eFmXY5xR78vLwH0W+MC9FzTT3nkAvQrddZxv6k7VGIwxEWf7siVNJiH1nMTcTNf w9GElQeIPJQlQ== X-Virus-Scanned: Debian amavisd-new at wiedmeyer.de Received: from wiedmeyer.de ([127.0.0.1]) by localhost (wiedmeyer.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VWbZRLP_T98J for ; Sun, 25 Sep 2016 23:11:08 +0200 (CEST) Received: from machinist.lan (OpenWrt.lan [192.168.1.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by wiedmeyer.localdomain (Postfix) with ESMTPSA id EEF538E91AC; Sun, 25 Sep 2016 23:10:58 +0200 (CEST) From: Wolfgang Wiedmeyer To: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Wolfgang Wiedmeyer Subject: [PATCH 2/2] power: supply: max17042_battery: add technology property support Date: Sun, 25 Sep 2016 23:10:11 +0200 Message-Id: <1474837811-9413-3-git-send-email-wolfgit@wiedmeyer.de> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1474837811-9413-1-git-send-email-wolfgit@wiedmeyer.de> References: <1474837811-9413-1-git-send-email-wolfgit@wiedmeyer.de> 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 This patch reports the battery technology as Li-ion. Signed-off-by: Wolfgang Wiedmeyer --- drivers/power/max17042_battery.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index 20cb1fd..43cb5df 100644 --- a/drivers/power/max17042_battery.c +++ b/drivers/power/max17042_battery.c @@ -92,6 +92,7 @@ static enum power_supply_property max17042_battery_props[] = { POWER_SUPPLY_PROP_TEMP_MIN, POWER_SUPPLY_PROP_TEMP_MAX, POWER_SUPPLY_PROP_HEALTH, + POWER_SUPPLY_PROP_TECHNOLOGY, POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_CURRENT_AVG, }; @@ -296,6 +297,9 @@ static int max17042_get_property(struct power_supply *psy, if (ret < 0) return ret; break; + case POWER_SUPPLY_PROP_TECHNOLOGY: + val->intval = POWER_SUPPLY_TECHNOLOGY_LION; + break; case POWER_SUPPLY_PROP_CURRENT_NOW: if (chip->pdata->enable_current_sense) { ret = regmap_read(map, MAX17042_Current, &data);