Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2983227rwb; Mon, 7 Nov 2022 22:03:42 -0800 (PST) X-Google-Smtp-Source: AMsMyM7D+JhWj/OIJkDj5n/TUsnhk0wggQuNd+ZAiD5xeCfhOw3dLH7X5z+Djym5n9mRAkhJORVc X-Received: by 2002:a17:906:fd85:b0:77b:b538:6472 with SMTP id xa5-20020a170906fd8500b0077bb5386472mr51237169ejb.48.1667887422046; Mon, 07 Nov 2022 22:03:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667887422; cv=none; d=google.com; s=arc-20160816; b=BPe0XodSrOGBK9QElXQvIN3giYHZkQtK8XAHvIH0+XjKcgwrjpS2AFywURl0SJYHGp U5Iezo5/Wu/EZ/gqfPMNiWZFT2MWjQEC4S7WTZ3/i2uL51wZX9uyXWVLb913U575qT4/ w8/V0askjPTVQmQefkRrbXCd+3fRZ5cPgL9Y5WrcPrP7Et13hkSpqkdunviNTTohiAlE OulUeQPji3aOEyE0ELoaSM6wTChqa/19mGB3Q8JEr9O8eZq8+Hjsln7qV/ubfODYytN2 gNy0ioKVlG2WuFnR90jMDdSZzP/2LiKniY+MxcoLRhujaTcHxul20zhayNy847zwxJG0 8+0A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=H3KQf7TxXqsfJQzf4Azgdjk/AZBsBCgazSy7YY7DQbs=; b=mr1MgROhvkyKaofezOmPH7lSd8b9Xvt4667wPHICmcsnoQYH7G4BgBQDs3SKzo6bof ZKvuxhQT3QD9ysN5L/jftxpLG8WiZTLSM27akJnyNBAaMytnV0qSZC+CklYU2wpIMVzU sffAnVzAQzI9whY9xR47J+gWPhWq3XgJnHUHxlL5oVhxvEpTdHAKplMdZ5iJnlMXKPQi ReofYxeCNBiG2V7TuY8SpGhaPQnxP4/C45bopm4bIJYpIthCGcFcGtZT91sRP7uQ4/4v JqXLXvQ2NhXSoR+xj0DGzgHHPCFrm479Qs0QN5dEQG/kFe7U7+z58Pd/95twTcIAStGU tIdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ij9WmqAk; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a056402350b00b0045d53f8ea52si1807389edd.1.2022.11.07.22.03.18; Mon, 07 Nov 2022 22:03:42 -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=@gmail.com header.s=20210112 header.b=ij9WmqAk; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232367AbiKHFtN (ORCPT + 92 others); Tue, 8 Nov 2022 00:49:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbiKHFtI (ORCPT ); Tue, 8 Nov 2022 00:49:08 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27C892CDD0; Mon, 7 Nov 2022 21:49:08 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id b11so12804977pjp.2; Mon, 07 Nov 2022 21:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=H3KQf7TxXqsfJQzf4Azgdjk/AZBsBCgazSy7YY7DQbs=; b=ij9WmqAk3cdoqxFVsF4y4GP66li66hUxgCgrsvFiZ3++j45KENqe5gHNEmHbIORBod YWVZMXl1bFhqBP1B6+wXmRvhTzkTJw9eXZ+DM2YC9PaNsLKF245ZpEe/3cguVS/8r75p 9NfRN3C2ZxkTrGIJjMhJE6AjyzGKJh0ao7RGO8LqDiygVivrVfQ7lsw4Toc5sIXjBDR/ L4qxBKH0e16r8nOSjWC/41yXSbUimYFVo0YIVVkCsz65jSV/fvBKn4mHLxztCdyn9oyg KZaC+Y+Ngki0/J0PNCvxbNNsDzwd+NBD9espdPxA3ayMfwH98ylzVsU/QMHOZBv9h0g/ aegg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=H3KQf7TxXqsfJQzf4Azgdjk/AZBsBCgazSy7YY7DQbs=; b=Li7FCgYQCXfF2e7nri9juPgH/CGTppnSrj45SNsSbgLjoKbnvik55M4yPvDnIeXTaM 7m7oxerR8OiZ0p4B99EoeeJDJgVnw55Z7WoO4GtYYKByyBerY0wwsFDycKT6fAkWAQSL WJ/QV5SprV/q3ru57en4hQhamwlop9yzGJBgwFQCf7WCdHmRIb+jSNknXtKGbihkh6gO jtjTt2omyRSrKyMam71f11/VgyiTkSXgeVkHnN36EJZzhMjJHRYk7KAXHn5wp/ipCwVh 9ads9aZH0X6Y0jk7HskajD4JnVpHSYPlbuaUoQXQ4tNrFC02HgNg9572v7az8trI7YFq USYQ== X-Gm-Message-State: ACrzQf3avAqm/3R5JVtWDJ8xMB7OjeflX69C1CmwEMBJdMUHtRtFYGfA DGoRi6+2exLLbT6DbtPLw0MwNh6KuiC4Kw== X-Received: by 2002:a17:902:8e85:b0:186:6ef8:181e with SMTP id bg5-20020a1709028e8500b001866ef8181emr953488plb.43.1667886545512; Mon, 07 Nov 2022 21:49:05 -0800 (PST) Received: from RD-3580-24288.rt.l (42-72-183-173.emome-ip.hinet.net. [42.72.183.173]) by smtp.gmail.com with ESMTPSA id q10-20020aa7982a000000b005618189b0ffsm5482163pfl.104.2022.11.07.21.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 21:49:05 -0800 (PST) From: ChiaEn Wu To: sre@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: chiaen_wu@richtek.com, cy_huang@richtek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v3 RESEND 0/3] Add Richtek RT9467 5A Battery Charger support Date: Tue, 8 Nov 2022 13:48:50 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 From: ChiaEn Wu This patch set is to add Richtek RT9467 5A Battery Charger support. RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for portable applications. It integrates a synchronous PWM controller, power MOSFETs, input current sensing and regulation, high-accuracy voltage regulation, and charge termination. The charge current is regulated through integrated sensing resistors. The RT9467 also features USB On-The-Go (OTG) support. It also integrates D+/D- pin for USB host/charging port detection. Thank you, ChiaEn Wu --- Change in v3: - In Patch 1/3 (dt-bindings: RT9467 Charger DTS) - Add 'Reviewed-By' tag Change in v2: - In Patch 1/3 (dt-bindings: RT9467 Charger DTS) - Revise the definition of 'enable-gpios' - Revise the node name to generic name in the example ('rt9467@5b' --> 'charger@5b') - Revise the example usage of 'charge-enable-gpios' with GPIO flags - In Patch 2/3 (power: supply: RT9467 Charger Driver) - Add missing header file - Add new header files and for adding 'sysoff' sysfs feature - Add assign 'rt9467_sysfs_groups' to '.attr_grp' of psy config - Remove unused varible 'rt9467_port_stat_names[]' - In Patch 3/3 (ABI Documentation for RT9467 sysfs attribute) - New file since v2 patch ChiaEn Wu (3): dt-bindings: power: supply: Add Richtek RT9467 battery charger power: supply: rt9467: Add Richtek RT9467 charger driver Documentation: power: rt9467: Document exported sysfs entries .../ABI/testing/sysfs-class-power-rt9467 | 19 + .../power/supply/richtek,rt9467-charger.yaml | 82 ++ drivers/power/supply/Kconfig | 19 + drivers/power/supply/Makefile | 1 + drivers/power/supply/rt9467-charger.c | 1282 +++++++++++++++++ 5 files changed, 1403 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-power-rt9467 create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt9467-charger.yaml create mode 100644 drivers/power/supply/rt9467-charger.c -- 2.25.1