From patchwork Thu Oct 29 17:01:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 7520001 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DBF9C9F37F for ; Thu, 29 Oct 2015 17:01:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18C672066D for ; Thu, 29 Oct 2015 17:01:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4BC7920856 for ; Thu, 29 Oct 2015 17:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757357AbbJ2RBj (ORCPT ); Thu, 29 Oct 2015 13:01:39 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.162]:15039 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757048AbbJ2RBi (ORCPT ); Thu, 29 Oct 2015 13:01:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1446138097; l=1034; s=domk; d=goldelico.com; h=References:In-Reply-To:References:In-Reply-To:Date:Subject:Cc:To: From; bh=6qcd+yWfaqh577/AaTApmVFGz7VAu/9rNx3oBIa3RcA=; b=heOi3mjDvsyFW0t5TwZMWdeuZq6xsphp6QP2+xSQsx7/KmyRQOa46lBB64wyoe5szeI r12h3zYUPh8MWd50HSY2sMZ1Lgru4VvACk8sCwU4qRmQHkv6i4Z6PgtCYOgggm+vbMFYT aMfUdOLqXbVeikeQlb7UdVWEC68sHp7Vo9Y= X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcecEarQROEYabkiUo6mSAGQ+qKIDsoIyHJuw== X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain (p57AE058A.dip0.t-ipconnect.de [87.174.5.138]) by smtp.strato.de (RZmta 37.14 DYNA|AUTH) with ESMTPA id Z02f7fr9TH1UYEK; Thu, 29 Oct 2015 18:01:30 +0100 (CET) From: "H. Nikolaus Schaller" To: =?UTF-8?q?Gra=C5=BEvydas=20Ignotas?= , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse Cc: linux-pm@vger.kernel.org, gta04-owner@goldelico.com, "H. Nikolaus Schaller" Subject: [PATCH 2/2] drivers:power:twl4030-charger: don't check if battery is present Date: Thu, 29 Oct 2015 18:01:28 +0100 Message-Id: <72eab67d8ae1e25803a78a4636c8da78b7a0d32f.1446138086.git.hns@goldelico.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We can't assume that the battery is present after probing (it can usually be removed while device is operated through external AC or USB power). So it makes no sense to check for it during probe. Signed-off-by: H. Nikolaus Schaller --- drivers/power/twl4030_charger.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c index 859991f..e232453 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -1008,13 +1008,6 @@ static int twl4030_bci_probe(struct platform_device *pdev) bci->irq_chg = platform_get_irq(pdev, 0); bci->irq_bci = platform_get_irq(pdev, 1); - /* Only proceed further *IF* battery is physically present */ - ret = twl4030_is_battery_present(bci); - if (ret) { - dev_crit(&pdev->dev, "Battery was not detected:%d\n", ret); - return ret; - } - platform_set_drvdata(pdev, bci); bci->ac = devm_power_supply_register(&pdev->dev, &twl4030_bci_ac_desc,