Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp482354rwb; Thu, 12 Jan 2023 23:41:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXuNsU/2AuDBh3OALxX48VelYU1IKR26YhejilffOjYabDsr6w3tO8jrdJfu8Pb5g/u0U7n4 X-Received: by 2002:a05:6402:3608:b0:495:b002:4ba2 with SMTP id el8-20020a056402360800b00495b0024ba2mr26431911edb.3.1673595708478; Thu, 12 Jan 2023 23:41:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673595708; cv=none; d=google.com; s=arc-20160816; b=viFZO+IZzOBQVFq0wv1OYQ4Td3RrYMNinxfedq3xXK7n4PRMMPTKppy+CgDgL2uhUK L6F9B2e3TRWnomlGf0OVpxBR54nfcgkmpNII5AVIyZme/nE2ki+Ac4jubYxWvU6bZ+wh nPo2SLfWx5AeD/cWfsmS6OHplJen7YwJU+CWOUyrPfeDdBgxunqAiF/bKfzTou+ZfH5n GHRXcPzdKoXRnNwiNEYjxj8LyaCYY/xiXrBvaghFKOROLAu7BkxCPahxuVx4y6v1bahO A1Y3kTN/JG6Y1tFAe36C3h7K4pdE17VKLnfa+p3lA6yeq6zFUiId0ASXVRSQEwY8ppRC aE1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=X6fGy4hcZaM4AVZur13EPDN9Tq5BheZdR247i/8BoLA=; b=G0GHEbXiE36oaHMZYNhdkAxi08ickY5JAX0WzioSb9ZvGawW3JJCZCxK1kehOeTSWC 1cHlbCBol4ZmV8fDw6jUbJQ1Fbyzzb9tNVuoK3clV1NgXLgMI7t5jKxyddS3zL++UX01 i/uxE57Mp0S3AY5vjV6AqnYv2kIpP13gSvsmVFO+4l/Nq4HzKNfUaV6Tx/SIYf18FETf O5ew1Yg/MTyyBuA6ET8C945ABVE1J6nxo2PrYEnQoYYlvq20IOvNCn44vOCMq0ye6Unz 65tfG9JAbzzUOE0mw4PHrstJQe4hSM5yTSvx2VPOh2Il/sMfde/PGMB++Wqnnp0X8Smh W+qw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q26-20020a50cc9a000000b0046b3638938bsi18267262edi.536.2023.01.12.23.41.36; Thu, 12 Jan 2023 23:41:48 -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 S240922AbjAMG7Q (ORCPT + 50 others); Fri, 13 Jan 2023 01:59:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240795AbjAMG5E (ORCPT ); Fri, 13 Jan 2023 01:57:04 -0500 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F27C81C2E; 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(2729: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(16494:0:AUTH_RELAY) (envelope-from ); Fri, 13 Jan 2023 14:17:47 +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 0/3] Add Richtek RT9471 3A battery charger support Date: Fri, 13 Jan 2023 14:17:43 +0800 Message-ID: <1673590666-24618-1-git-send-email-cy_huang@richtek.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain 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 From: ChiYuan Huang This patch set is to add Richtek RT9471 charger support. The RT9471/D is a highly-integrated 3A switch mode battery charge management and system power path management device for single cell Li-Ion and Li-polymer battery. The low impedance power path optimizes switch-mode operation efficiency, reduces battery charging time and extends battery life during discharging phase. Since v8: - revert v7 for adding irq wakeup capable, i2c core already did it. Since v7: - Add irq wakeup capable. - Add missing header 'module.h' for MODULE_DEVICE_TABLE. Since v6: - Use 'ATTRIBUTE_GROUPS' macro to simplify the attribute coding. - Explain more details for sysoff_enable attribute. Since v5: - Remove one line wrapper. - Merge header content into source file, remove header file. - Remove 'charge_term_enable' sysfs entry and merge it into 'charge_term_current' property control. - Change MODULE_LICENSE from 'GPL v2' to 'GPL'. Following by the below discussion https://lore.kernel.org/all/YxAVAt2eWB3NFlrk@google.com/ - 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. Since v4: - Remove the line for the owner field in driver. - Add the documentation for sysfs entries. Since v3: - Move unevaluatedProperties line after $ref for binding patch. - Add Reviewed-by tag for binding patch. Since v2: - Remove the properties for interrupt controller things in the binding documentation. - Fix dtc error for typo, it's 'regulator-name', not 'regulator-compatible'. - Add regulator min/max microamp to allow otg vbus current adjustable in example. - Specify the active-level for charge-enable-gpios in binding example. - Fix checkpatch error about 'foo * bar' to 'foo *bar' in psy_device_to_chip function. - Specify the member name directly for the use of linear range. ChiYuan Huang (3): dt-bindings: power: supply: Add Richtek RT9471 battery charger power: supply: rt9471: Add Richtek RT9471 charger driver Documentation: power: rt9471: Document exported sysfs entries Documentation/ABI/testing/sysfs-class-power-rt9471 | 32 + .../bindings/power/supply/richtek,rt9471.yaml | 73 ++ drivers/power/supply/Kconfig | 16 + drivers/power/supply/Makefile | 1 + drivers/power/supply/rt9471.c | 931 +++++++++++++++++++++ 5 files changed, 1053 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-power-rt9471 create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt9471.yaml create mode 100644 drivers/power/supply/rt9471.c -- 2.7.4