Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6654800rwi; Mon, 24 Oct 2022 04:33:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4JKUBoQm7WOzVy4XM9YXWIPoqCQbmFBUg3g45wG5wd0zCz3g5/u6ZVV5ZVh2wRYw9GzRML X-Received: by 2002:a63:fd4f:0:b0:45f:d7ef:9f94 with SMTP id m15-20020a63fd4f000000b0045fd7ef9f94mr28753916pgj.137.1666611220771; Mon, 24 Oct 2022 04:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666611220; cv=none; d=google.com; s=arc-20160816; b=g6kYKnG3vyOsXDtFPEK9Qwf6O4qZj1uKiMGlNuMsTSEQHoEc5wGBHAFQuY8Tl4wyh5 vNlX/rPHhGlaiRTTzFeb903KaiTKmNa7YyYh2SZAj84wevC0bqylVB31y2vYRJEMcuJM nW2pK7Fg77yn5+7UQX7CWhRnl3RZYNYKnD3tzPBeCBI8W+pWMCoNJr0M7ykU+5Xvkhiw XnD0p2CvfdIefG+tUNvIoMv94l/LOLnURalFLYTIkWVy5N38PDkYFssD4KRLHzzzLwlz LoZfpYFUrlbjn4unPTiqJtvXy3a+7+NUJBQ5n+C8B7GiOL9Xg+M4h2zVZPcoWaL7AfoO rynA== 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=UikcnIir68Gg7jAGa1ZQ2RsVDg3ZFdrs8Hn3MmBqfQE=; b=QCdO+RezRcGg+bsYD7UXCGpjfbzQf+BN0maLGGlbCZmKgvnTCzCHFGTaiYTzUUgrwT eh8VO8W8NfoR9pGU0M/e5wHm4qXqHhOV+RgLVfactPRYNdTPSiB2AZ21NiWlUDzm25vq 2g396f1d0q4nEWb7+onETKbzCejzxav/xjEWu3twNzYauN07sMtpx3oqA84++9/3sx7U o4hz9mi1MkwRjIgtloyPHAa5QrAkUIoMMjC3lVqORBjS5WEeoQs64mFipS5lYdkB0pqO uEk3eh/5FRZ3kuHXehTuHa0dNHYFW2ruACMls1Q2WBtGhbwZU4U+RZ6wOTbCRlzWSuT8 xPfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oI9D3OTI; 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 k18-20020a170902ce1200b0017cca111726si35769024plg.432.2022.10.24.04.33.29; Mon, 24 Oct 2022 04:33:40 -0700 (PDT) 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=oI9D3OTI; 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 S229727AbiJXK5l (ORCPT + 99 others); Mon, 24 Oct 2022 06:57:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbiJXK5Y (ORCPT ); Mon, 24 Oct 2022 06:57:24 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A109017431; Mon, 24 Oct 2022 03:57:01 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id 192so1491731pfx.5; Mon, 24 Oct 2022 03:57:01 -0700 (PDT) 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=UikcnIir68Gg7jAGa1ZQ2RsVDg3ZFdrs8Hn3MmBqfQE=; b=oI9D3OTI21D7mTjKfwDvNngd5mssglBIeHiyZiN1iHD3ZeyIwr6kTqsE37bjRpH/RX uI7GI/+k548eIbpTFhPno1BRvmr1aVLMA+BC9e3wlJT3Mc+0kMywhlDrZqXVrlG+wbS6 8R8l+itlqz2Xd1sf7/4KTeSF41rWjHxsDWND23CDQ3wb6RuoUluyYT5mwRBtk/aZ+rwm lAxb4xwUoqc4Xa/kDnenA4CBpwy4igzSkUWkGSjE2YIKun6RPw2G1+TZoLXnYp5pLldB OIoJjjydtrVAvtpI6LmORI/Cq4sV0u752r40zQlvSeiPhsQb82aR+0jwF7F+eZWZ3C1Z Mctw== 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=UikcnIir68Gg7jAGa1ZQ2RsVDg3ZFdrs8Hn3MmBqfQE=; b=M72rDuLZUtMJU7DTajKYfXZobKa/ISELpptzFgqrehxTOwaTqdnL/Yi6tNssvbE1x0 4K3AH7pQ05RHRNP154JCt7bwNWeY6mh8sm/gUaCrCQgCcH/lakzb3oapPzzwKhjvNuJc fenuBphmcmJZ8s4GnbBmVT7o4WCHSyp3tgtOO0DDIfLIJgVY6QW64tF1eWwIppJwVChi pXKwTIeeRyD4GR99thdSM8MbWjfrrQoJz1M51S6TQLrDpHmI7ftIPBgwNnQilBaNGcBl z5lQ0oBzkLiirNpJqUe3Ir3Mu6vA+Z35cw77psFUuI7iSnUMnVVBlu7QZET6EzHaNhzV 4P6A== X-Gm-Message-State: ACrzQf0IUtwoXyNfd6NoOYapKCYvn+4+EBIaPh/jMmmRXiD5yvzxPPsF wHB1IHVL9U9YwbpLks/TAFg= X-Received: by 2002:a05:6a00:8d0:b0:53b:2cbd:fab6 with SMTP id s16-20020a056a0008d000b0053b2cbdfab6mr32834633pfu.3.1666609011328; Mon, 24 Oct 2022 03:56:51 -0700 (PDT) Received: from RD-3580-24288.rt.l (111-82-141-7.emome-ip.hinet.net. [111.82.141.7]) by smtp.gmail.com with ESMTPSA id a15-20020a631a4f000000b0045751ef6423sm1366696pgm.87.2022.10.24.03.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:56:51 -0700 (PDT) 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 0/3] Add Richtek RT9467 5A Battery Charger support Date: Mon, 24 Oct 2022 18:55:45 +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 Documentation/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.7.4