From patchwork Wed Dec 30 14:02:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Philipp Klemm X-Patchwork-Id: 355397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C5FAC43381 for ; Wed, 30 Dec 2020 14:03:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 095F12078D for ; Wed, 30 Dec 2020 14:03:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbgL3ODI (ORCPT ); Wed, 30 Dec 2020 09:03:08 -0500 Received: from sender11-of-o51.zoho.eu ([31.186.226.237]:21163 "EHLO sender11-of-o51.zoho.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbgL3ODI (ORCPT ); Wed, 30 Dec 2020 09:03:08 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1609336940; cv=none; d=zohomail.eu; s=zohoarc; b=OgczmwYz5+sFODZ8uYN5kgltBruYmY++4VFRqWnnre6RdS1fWiOuB/CqttB8rZIGTDhBcK3PsFkkoWJdpsJaC/acOrv3iewGuW16K3S6/OaSgIa/7fZ9SM6dr9gZOM9FYG/d4uy3DgB7se4cRFPoAdXbDxeTBrojqXbj8gX2UmA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1609336940; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=+ydaJTyg6DHxZQ2Lq3t4BZtfVtdYPAZqmqx44PFdmp8=; b=Vxhx3yLdZ4JqLZuCQuC1KqcYbf73wzWjNPr+67E6f+V2bc5VgMTArUAQ+XCFpimBqaAT39o02Dly/fWsoFSFoAXGSKU7p7WYtf49a+xsEtPTy2/XmX/etIlKDtXxykoPMiD+7WIlyZb15UbjZ/VzH0KoigmkErCJItWHKqISFgg= ARC-Authentication-Results: i=1; mx.zohomail.eu; spf=pass smtp.mailfrom=philipp@uvos.xyz; dmarc=pass header.from= header.from= Received: from localhost.localdomain (ip-95-222-213-179.hsi15.unitymediagroup.de [95.222.213.179]) by mx.zoho.eu with SMTPS id 1609336939080877.8956579314939; Wed, 30 Dec 2020 15:02:19 +0100 (CET) Date: Wed, 30 Dec 2020 15:02:18 +0100 From: Carl Philipp Klemm To: tony@atomide.com, sre@kernel.org Cc: linux-omap@vger.kernel.org Subject: [PATCH v2 1/1] power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce Message-Id: <20201230150218.d5ae76983e6dde68dcebff09@uvos.xyz> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-unknown-linux-gnu) Mime-Version: 1.0 X-ZohoMailClient: External Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Adds 40000 ms sleep before cpcap_charger_enable to hopfully avoid the bounce on plug in Signed-off-by: Carl Philipp Klemm --- drivers/power/supply/cpcap-charger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c index c0d452e3dc8b..130c61a9f267 100644 --- a/drivers/power/supply/cpcap-charger.c +++ b/drivers/power/supply/cpcap-charger.c @@ -631,6 +631,8 @@ static void cpcap_usb_detect(struct work_struct *work) return; } + usleep_range(40000, 60000); + /* Throttle chrgcurr2 interrupt for charger done and retry */ switch (ddata->state) { case CPCAP_CHARGER_CHARGING: