Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp696771ybh; Sun, 12 Jul 2020 21:08:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzOP75BqPKuL/2fuIqjQhw7CE7OaQq4sggnbEKpiEjLLvJPZsiatMQ7Wtjai7280VMr73+ X-Received: by 2002:aa7:da56:: with SMTP id w22mr92102968eds.124.1594613283005; Sun, 12 Jul 2020 21:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594613282; cv=none; d=google.com; s=arc-20160816; b=BNmqi6J1HxjgtWxs+DYjYTBs77+zc/3vFL+uzAMhfZjTRucs+cjq0Hne8KQpFroWaG Kv48EMql1MmxGSDP2hjKy2WdG76BxLNZZcf7zewLbP92g1U/iTm893Bor2Bz7MwdGtqR fYRm2Z034poQjSguLwvdXhvDf17O14xDOkDYEgydKZMJau8xUgymVAwgMdYUQNa0nFoa GAPRoemfeqn7nyZgC64DZQs2WVvz9o3tp+gCLxUysUr5mE+k5N96ajJ9iHmRgUFFh6ch wW4k/B/our1BR05Q0ySsGtipKIy5b50Odg5RtnBW8v0HVZdkwlG2xIyf3dphPLmAbjsY HJzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IR3Q2ifTEIte01Ao7ilzSnaC7L5tdVO4iWlQq9Q0/S8=; b=cdLjy8RxHUu4UzjqzTgB8L+CYUjbZmhVVRe+eCrBIMbx9CeRFZfL2+okpefJlZCWwM xIcOhA9ZrDpWj2Z+gIwVyVlFo0FyNzZWiXUqe7WBpTNYgM6axbbRU3vXvE6wk7j4r3KV zzvLno0FAUXjYIqw7SNc+ZnLHCu7KeQZDBl2PMomor5X1BoxYmZywU4i2J/8jpdHHnuf 31XjWc3QMqmzeHzxvRyL3zAoq877PZ2jKJ8AbAV7LfXhbUKkKMfqFQDZJqlMrJwf4Bt5 huNWopK2ANsUBmTl1C+lAhSoAaVS1t051WDo/LAv16ysiyWr94o5Xf2YMUeKkOfeRqsN YhbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XR6Xp019; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ef10si8150215ejb.519.2020.07.12.21.07.40; Sun, 12 Jul 2020 21:08:02 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XR6Xp019; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728540AbgGMEGA (ORCPT + 99 others); Mon, 13 Jul 2020 00:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgGMEGA (ORCPT ); Mon, 13 Jul 2020 00:06:00 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E812C061794; Sun, 12 Jul 2020 21:06:00 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id t6so5481310pgq.1; Sun, 12 Jul 2020 21:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IR3Q2ifTEIte01Ao7ilzSnaC7L5tdVO4iWlQq9Q0/S8=; b=XR6Xp0196Dy2say8OvOlRMTRloGBNZ3H5SV4W/AW1Wyn3H4mtwZAHeBHUkdccnSY3e lSF+MjAdelZ5d0wCEW6GpHR3Tcd4Ap0RQgKkkGBiolCMmx2wXIJFm2DWH7sfZCOhcR97 E1jKIfUuRfyO4KD1AVOFtURk/25MzlJDSqkJSPIXZJSWUgd6y/I+R3ynBdkJJErUjpKD d2mWinXPg7jguDUpwRCnVU+Q6NG2yZhVxv1jAqsdjkA0RuSh2ykCexNKM5y9btR9UZ0x EmBzRdaydUPk83mgjrKHwP4Ly9wUqHcRPZ0sJIxQKQcDE3iRArHguIDHz7z4KKDJv7zz UMsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IR3Q2ifTEIte01Ao7ilzSnaC7L5tdVO4iWlQq9Q0/S8=; b=j37aujWmNkgzHWm2tdx+75vlSHHNrEzV/hiJfaMzcU6XCI7Vpb94Md27efCshOX8jE B5O2yzqrkaWXNzfCbHZG8aTSstzN6zXNx2a36gjuILYh2lGmFr6rvZgH3Hb1uEvWdJ1n HuKgar3agQ8AbYGF7l4U0HEwIYnwKKEBvxPuvfxV8xxkcup3m0ORlZHHjUTNdOifvKqg iOPtFOKTtEEGcWqnYnJgxhFXJJeaRGKDo6xPld7M0Z9TrU3OhLT57zbj5F5a0upgeH7B cHukTuRQ2lpiwHjU7IG67ToTOeSKZD98VZ70UpWbbDvCiZtzTuNK6+c2g63sznh/i/57 EnNQ== X-Gm-Message-State: AOAM530EKWielP0GlgoyB8jnb/YKNslmtAlt1HS5+OKX7qqk3NyhZN0j tLjodnyCltQ0AwNW99KiT4k= X-Received: by 2002:a63:7cf:: with SMTP id 198mr65861849pgh.309.1594613159656; Sun, 12 Jul 2020 21:05:59 -0700 (PDT) Received: from xiaomi.mioffice.cn ([209.9.72.214]) by smtp.gmail.com with ESMTPSA id j13sm12561570pjz.8.2020.07.12.21.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2020 21:05:59 -0700 (PDT) From: Qiwu Huang To: sre@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, jiangfei1@xiaomi.com, Qiwu Huang Subject: [PATCH v2 3/5] power: supply: core: add wireless signal strength property Date: Mon, 13 Jul 2020 12:03:38 +0800 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qiwu Huang reports wireless signal strength. The value show degree of coupling between tx and rx. Signed-off-by: Qiwu Huang --- Documentation/ABI/testing/sysfs-class-power | 11 +++++++++++ drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 3 files changed, 13 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power index cd07d3f4e8b1..f10780be2732 100644 --- a/Documentation/ABI/testing/sysfs-class-power +++ b/Documentation/ABI/testing/sysfs-class-power @@ -729,3 +729,14 @@ Description: Access: Read-Only Valid values: Reported as integer + +What: /sys/class/power_supply//signal_strength +Date: Jul 2020 +Contact: Fei Jiang +Description: + Reports wireless signal strength.The value show degree of coupling. + Unit is KHZ,the "value" means the working frequency of receiver + chip of wireless charging. + + Access: Read-Only + Valid values: Reported as integer diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index f2458e21d02b..e420a453095e 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -208,6 +208,7 @@ static struct power_supply_attr power_supply_attrs[] = { POWER_SUPPLY_ATTR(SERIAL_NUMBER), POWER_SUPPLY_ATTR(QUICK_CHARGE_TYPE), POWER_SUPPLY_ATTR(TX_ADAPTER), + POWER_SUPPLY_ATTR(SIGNAL_STRENGTH), }; static struct attribute * diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 2de9a4c93723..397fb8e96b03 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -169,6 +169,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_SERIAL_NUMBER, POWER_SUPPLY_PROP_QUICK_CHARGE_TYPE, POWER_SUPPLY_PROP_TX_ADAPTER, + POWER_SUPPLY_PROP_SIGNAL_STRENGTH, }; enum power_supply_type { -- 2.27.0