Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3138045pxb; Thu, 10 Feb 2022 13:15:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiIt90YSpsQD4sxfurQycta9Z+3R8AB24krz/qxeavB0fqdV4RRCxk01vql5PdzU3EKomM X-Received: by 2002:a17:907:216d:: with SMTP id rl13mr8287046ejb.193.1644527704992; Thu, 10 Feb 2022 13:15:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644527704; cv=none; d=google.com; s=arc-20160816; b=CcwhP0NKHua6biJiW36Z6I9T3vcEjgKCUHbBFmCixGmU5eMr/ZIr/nRz2VvF9jbJfv JswODQcqn8ZtUS31y+bmpV9cBdnAjSeWa4ggYWvUAam05+CsFt5h00gUcqS8ATuepYXN x5+LdX8DgG+oKWcwC3hIWjRe2rCbzEv17Kb+t9sYNGPpgbKyjcftQnWPuXt6p1716n1+ CzhQ3tavbNkh3i7bOoN0U+Kh5v/XlolmkdUI9btCromcvM770j6hN42RNvkmiFCAQ+CJ 0gx7yvlwNHO27jOxUMWEMeLPchzm0MsBDGEJRCO3uiQUAe2V5C2yHr2OsTQkqNxx4SOe UA2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZcE6+fIEhouQflq6SsdYNwRtkbBAzXLAZhmoezOqjSU=; b=cxoxkAflfkIT94Lj0dZiv/igvHO+ewqgk80dZ8PlnQfl5oR7k/VHjBTB/8JxPpTcT+ VxXeYj+A/AqjV8dWrbUAkK7g6f5bvn7wYc3qXP+4gJDu20CBRepb9Nj2eWxVKRNd7ggt VMao+cMZo0pWtvJZhfkhGdjgjuai5lEcQrJFucRS2VLw8b7y4EnIooYC/9mNMswHByR7 fna2tY0ejoxqXzLn4fsHksVoqfp8XA81NK6uEPIyZug8+oEaYDD8PADeL/DXDQhLeTgb wdfcMd59OdAGrHm5pWO3alRJdaT8tMABRIa4uKv87jR6Q8P/RYBHcJeOtP4kbDVRcCTc l3Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=IlCoODTB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn37si17775071ejc.852.2022.02.10.13.14.40; Thu, 10 Feb 2022 13:15:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=IlCoODTB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244055AbiBJQML (ORCPT + 99 others); Thu, 10 Feb 2022 11:12:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:34544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243839AbiBJQMK (ORCPT ); Thu, 10 Feb 2022 11:12:10 -0500 X-Greylist: delayed 1842 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 10 Feb 2022 08:12:11 PST Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF340EB; Thu, 10 Feb 2022 08:12:11 -0800 (PST) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21AEBMiK025584; Thu, 10 Feb 2022 09:41:21 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=ZcE6+fIEhouQflq6SsdYNwRtkbBAzXLAZhmoezOqjSU=; b=IlCoODTBMzey/Sj5wVEjA1csXujawVmllHw9glGsfo0i7WUSqNldfupDrQYKEg3hCof0 x8II4XGesbT+TGgJyIZzDhZ/LAbT4tqP7MmQXpiQNRVCasWZfQgsgHUr5LdyF8v8p80X AzStJzdSoaC6LM43HAqU4pmIP88gFMKXHZLduYqanhBocWaS+An7+/uJs7lmVUMygdpl GZfWjU+mbOyMVA+0X2693baBJNdObpjiLqSt4QUmnBC5t+euWsxIq48WUP7yvR7u0Uad to7xjxb1Jg1Q2cnhWGV58qShodp+hXo+5j/QoGyiDVA3pjU3y47FiflMttroAqpadRVW IQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3e4detskyx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 10 Feb 2022 09:41:21 -0600 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Thu, 10 Feb 2022 15:41:19 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.18 via Frontend Transport; Thu, 10 Feb 2022 15:41:19 +0000 Received: from ricardo-lws.crystal.cirrus.com (ricardo-lws.ad.cirrus.com [141.131.206.19]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id E66312A1; Thu, 10 Feb 2022 15:41:18 +0000 (UTC) From: Ricardo Rivera-Matos To: , , , CC: Ricardo Rivera-Matos Subject: [RESEND v2 1/2] power: supply: Introduces bypass charging property Date: Thu, 10 Feb 2022 09:41:07 -0600 Message-ID: <20220210154108.641369-2-rriveram@opensource.cirrus.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220210154108.641369-1-rriveram@opensource.cirrus.com> References: <20220210154108.641369-1-rriveram@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: EHQHKr75_rbswWjslGMUEHJFsMAt3tYY X-Proofpoint-ORIG-GUID: EHQHKr75_rbswWjslGMUEHJFsMAt3tYY X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adds a POWER_SUPPLY_CHARGE_TYPE_BYPASS option to the POWER_SUPPLY_PROP_CHARGE_TYPE property to facilitate bypass charging operation. In bypass charging operation, the charger bypasses the charging path around the integrated converter allowing for a "smart" wall adaptor to perform the power conversion externally. This operational mode is critical for the USB PPS standard of power adaptors and is becoming a common feature in modern charging ICs such as: - BQ25980 - BQ25975 - BQ25960 - LN8000 - LN8410 Signed-off-by: Ricardo Rivera-Matos --- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index 6ac88fbee3cb..52c909bae457 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -89,6 +89,7 @@ static const char * const POWER_SUPPLY_CHARGE_TYPE_TEXT[] = { [POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE] = "Adaptive", [POWER_SUPPLY_CHARGE_TYPE_CUSTOM] = "Custom", [POWER_SUPPLY_CHARGE_TYPE_LONGLIFE] = "Long Life", + [POWER_SUPPLY_CHARGE_TYPE_BYPASS] = "Bypass", }; static const char * const POWER_SUPPLY_HEALTH_TEXT[] = { diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 86b4d5c4dab9..164779bc7e8f 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -49,6 +49,7 @@ enum { POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE, /* dynamically adjusted speed */ POWER_SUPPLY_CHARGE_TYPE_CUSTOM, /* use CHARGE_CONTROL_* props */ POWER_SUPPLY_CHARGE_TYPE_LONGLIFE, /* slow speed, longer life */ + POWER_SUPPLY_CHARGE_TYPE_BYPASS, /* bypassing the charger */ }; enum { -- 2.25.1