Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1577076pxa; Thu, 13 Aug 2020 11:35:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6uLJcaOUXOo6xK55FbDDfoEXg6QOpUGjYS+ge97cyjo8cL+wktJVmcbYINFH1Sz+8C3I9 X-Received: by 2002:a17:906:248f:: with SMTP id e15mr5763984ejb.296.1597343738196; Thu, 13 Aug 2020 11:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597343738; cv=none; d=google.com; s=arc-20160816; b=mz9YRQL7blH3RUz6M+UhNugyLltPoOIbIrQhISzDlmYp6mhvEj7Gfsy5oFoMPNwDuT lWAQG1h4sQVoEN8czDKSDwqT29sv2N5+IlrvXU6A/PLoGuEiH4mJf2ybD02O8F/ya+xF fxz4p5OjLpOEKg9yJcL+VOgv8mlkS6omhLeLQTQc3Bjz7qFR+yB65mkFVN3/anmzI3Wo IyUzJLWjcnSJgc3zkT+5xsBYRpcfe29A5OAVGfXMrCr0RHyud9oHma+i+60Nak+C844p kQLZNpVuOF4xyaiulqQVd5S7rJwH28rnD+prIrcfOBrxwjsLMc4i5RjOtwEXZ2XNax3E aGAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=IPviYV2AnoRKU160al8FLZfwb3IgfWoC9gJK+BxCpsM=; b=mdVB+wAc+S64K73lXNa9RB9OT5JnL1gJzEBktpLDVBuWub6M8OzDduJ2P9TtrnOvNL MU+Luo80iRsbL7lo0r/XeTl1l91PWRJLbA39XOSlnIWZ9jWSImKvN7wfp9BiwPr4eIuL mHAYVTLoymiUgTu2YTYa20rZKpTtMa3BSYi45FvrRsZmQCqH+tT7O7NBrWKyuaKfJkhB Ylz34W7sLZJ/LlmPixy8cxWq7/TvWdG+083ODdI5LWzDPXsm0A48xm0OvwGKZz0Vr2Ut CEz52oeXTGZmt0K/QAGXhnx2K1uR/wem6YkES5/uS7H+/IRQNi+RW4zVbV2r6A0Z1V+X svqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si3668056edy.259.2020.08.13.11.35.15; Thu, 13 Aug 2020 11:35:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726606AbgHMSeL (ORCPT + 99 others); Thu, 13 Aug 2020 14:34:11 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:20511 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbgHMSeL (ORCPT ); Thu, 13 Aug 2020 14:34:11 -0400 Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 13 Aug 2020 11:34:10 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg04-sd.qualcomm.com with ESMTP; 13 Aug 2020 11:34:10 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 025401813; Thu, 13 Aug 2020 11:34:09 -0700 (PDT) From: Guru Das Srinagesh To: Sebastian Reichel , linux-pm@vger.kernel.org Cc: Subbaraman Narayanamurthy , David Collins , linux-kernel@vger.kernel.org, Guru Das Srinagesh Subject: [PATCH v1 1/1] power: supply: add wireless power_supply_type Date: Thu, 13 Aug 2020 11:34:08 -0700 Message-Id: <1597343648-11136-1-git-send-email-gurus@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Subbaraman Narayanamurthy Currently, power_supply framework supports only Battery, UPS, Mains and USB power_supply_type. Add wireless power_supply_type so that the drivers which supports wireless can register a power supply class device with POWER_SUPPLY_TYPE_WIRELESS. Signed-off-by: Subbaraman Narayanamurthy Signed-off-by: Guru Das Srinagesh --- Documentation/ABI/testing/sysfs-class-power | 2 +- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power index 40213c7..651599f 100644 --- a/Documentation/ABI/testing/sysfs-class-power +++ b/Documentation/ABI/testing/sysfs-class-power @@ -34,7 +34,7 @@ Description: Describes the main type of the supply. Access: Read - Valid values: "Battery", "UPS", "Mains", "USB" + Valid values: "Battery", "UPS", "Mains", "USB", "Wireless" ===== Battery Properties ===== diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index 3d38308..a616b9d 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -56,6 +56,7 @@ static const char * const POWER_SUPPLY_TYPE_TEXT[] = { [POWER_SUPPLY_TYPE_USB_PD] = "USB_PD", [POWER_SUPPLY_TYPE_USB_PD_DRP] = "USB_PD_DRP", [POWER_SUPPLY_TYPE_APPLE_BRICK_ID] = "BrickID", + [POWER_SUPPLY_TYPE_WIRELESS] = "Wireless", }; static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = { diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 97cc4b8..ef03299 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -186,6 +186,7 @@ enum power_supply_type { POWER_SUPPLY_TYPE_USB_PD, /* Power Delivery Port */ POWER_SUPPLY_TYPE_USB_PD_DRP, /* PD Dual Role Port */ POWER_SUPPLY_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */ + POWER_SUPPLY_TYPE_WIRELESS, /* Wireless */ }; enum power_supply_usb_type { -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project