From patchwork Fri Jan 13 06:17:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiYuan Huang X-Patchwork-Id: 43028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp122696wrt; Thu, 12 Jan 2023 23:00:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvG6KBn7EnkDuiwffZQu1RqrYtf3bQJGlTkCRmCs9boUzueIdU6K0nvkMaeSh48tMHeST/ X-Received: by 2002:a05:6402:4150:b0:47e:1b4a:5491 with SMTP id x16-20020a056402415000b0047e1b4a5491mr68683431eda.20.1673593213107; Thu, 12 Jan 2023 23:00:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673593213; cv=none; d=google.com; s=arc-20160816; b=xhv+gSuGZ37B3Ukd2+gOZaDN6X7324M9nWeQZJgt02R911jTj9o9V5+RAeZ/7Yo285 OTntDFFn2hIil+skb9eqWmYEFYx6bncK1rXySb5RheveWkQEZPa5ftzMXX+Pw6jSME8N TeFV6zAZ0ySEw07v2tu6sNk8qdKoylmkSFn/hYf0bRb2zyakc3pnjFa0K1Q0yqQcws78 PPZhTxYTfEr1Tv1KQPhNXT3Ojo2/Fgj02JyT+8aiPsNST3tXcFT+UUm3X6gDo6m+aVjL mb+h2va4b6xNbxwBXxhLSd9lbvjX30QiTEs8GXg5OHz8YpBy90yDnNa6WlATRricdNtF AhPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=01csQ8DlrzSvMM7Az3qJeMprGZ73Hm/q0Ht2rfrJyG4=; b=GifG95jUW7153euKxHJewYf7qjj2uo+tefztiD8ez2BckTk9DeZBx3eQLfpUgBvowu GcEYHdsD2w8TUnzHWSj6oO6dkH8BPtnPr4LwSSv9FOwfnOytIEoVoJt6OoHRFFjMW2xN 70PUVd9CFmQM539cKr4FiwDUpOO12w/ilA1a3MQeRniCX+ZUyx6yRz4Ahdbzm7JNh4s8 GC6s2Q0Q9Wl/Yv+6+ZZ39TxYNnLhLE5LRZSKxUaIX5dMAfzcnH0u7WKyVSfdwxf5nJ5R ngU682Oxgbd9u3I3ktHJLEGfUsQN/RA24099Ngmqm2JGzQ2E1l9QezYWF09yw3F5k+gj 4o8A== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g17-20020a056402321100b0049c1e28a77dsi1748860eda.42.2023.01.12.22.59.48; Thu, 12 Jan 2023 23:00:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241045AbjAMG7B (ORCPT + 99 others); Fri, 13 Jan 2023 01:59:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbjAMG47 (ORCPT ); Fri, 13 Jan 2023 01:56:59 -0500 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A454F81C26; Thu, 12 Jan 2023 22:42:28 -0800 (PST) X-MailGates: (compute_score:DELIVER,40,3) Received: from 192.168.8.21 by mg.richtek.com with MailGates ESMTP Server V3.0(2734:0:AUTH_RELAY) (envelope-from ); Fri, 13 Jan 2023 14:23:39 +0800 (CST) X-MailGates: (compute_score:DELIVER,40,3) Received: from 192.168.10.46 by mg.richtek.com with MailGates ESMTP Server V5.0(16476:0:AUTH_RELAY) (envelope-from ); Fri, 13 Jan 2023 14:17:48 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex3.rt.l (192.168.10.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Fri, 13 Jan 2023 14:17:47 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1118.20 via Frontend Transport; Fri, 13 Jan 2023 14:17:47 +0800 From: To: , , CC: , , , , , Subject: [PATCH RESEND v8 3/3] Documentation: power: rt9471: Document exported sysfs entries Date: Fri, 13 Jan 2023 14:17:46 +0800 Message-ID: <1673590666-24618-4-git-send-email-cy_huang@richtek.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673590666-24618-1-git-send-email-cy_huang@richtek.com> References: <1673590666-24618-1-git-send-email-cy_huang@richtek.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754889677099503472?= X-GMAIL-MSGID: =?utf-8?q?1754889677099503472?= From: ChiYuan Huang Document the settings exported by rt9471 charger driver through sysfs entries: - sysoff_enable - port_detect_enable Signed-off-by: ChiYuan Huang --- Since v6: - Explain more details for sysoff_enable attribute. Since v5: - Recover all the change in sysfs-class-power. - New a sysfs-class-power-rt9471 file. - Remove 'charge_term_enable' sysfs entry, directly integrate it in 'charge_term_current' power supply property control. --- Documentation/ABI/testing/sysfs-class-power-rt9471 | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-power-rt9471 diff --git a/Documentation/ABI/testing/sysfs-class-power-rt9471 b/Documentation/ABI/testing/sysfs-class-power-rt9471 new file mode 100644 index 00000000..38227a8 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-power-rt9471 @@ -0,0 +1,32 @@ +What: /sys/class/power_supply/rt9471-*/sysoff_enable +Date: Oct 2022 +KernelVersion: 6.1 +Contact: ChiYuan Huang +Description: + This entry allows enabling the sysoff mode of rt9471 charger devices. + If enabled and the input is removed, the internal battery FET is turned + off to reduce the leakage from the BAT pin. See device datasheet for details. + It's commonly used when the product enter shipping stage. After entering + shipping mode, only 'VBUS' or 'Power key" pressed can make it leave this + mode. 'Disable' also can help to leave it, but it's more like to abort + the action before the device really enter shipping mode. + + Access: Read, Write + Valid values: + - 1: enabled + - 0: disabled + +What: /sys/class/power_supply/rt9471-*/port_detect_enable +Date: Oct 2022 +KernelVersion: 6.1 +Contact: ChiYuan Huang +Description: + This entry allows enabling the USB BC12 port detect function of rt9471 charger + devices. If enabled and VBUS is inserted, device will start to do the BC12 + port detect and report the usb port type when port detect is done. See + datasheet for details. Normally controlled when TypeC/USBPD port integrated. + + Access: Read, Write + Valid values: + - 1: enabled + - 0: disabled