From patchwork Wed May 10 11:50:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 9142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3558888vqo; Wed, 10 May 2023 04:53:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4C/aKFa9PdKrPbepKOdKs91+PSVZcC2fkRWBBYlR+qLMZW+CncouY7tvcVpC9VIURhceOj X-Received: by 2002:a17:90a:8807:b0:249:842d:312f with SMTP id s7-20020a17090a880700b00249842d312fmr17440828pjn.4.1683719602058; Wed, 10 May 2023 04:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683719602; cv=none; d=google.com; s=arc-20160816; b=uO4wiiYa+xqzBjOeXT2F657+8w+GuOsZqG+FRUNQif1TxLLVeiCp1LSdmdzMzGedgJ PiM4NjrrUSBSM4BwXfH9T1sFK3HOLurHr0p+5f7llb4nmIKfK1JrWMRVFqCvlB2fxJAC ZrOn7OdmSzn/TOh71DP+dmfY5vx7PWxKQ0NJ7GuewkopdJgm6n+mUmoGxRXXaLSjR+im iTG9/IEMNRd7UDSZubj7d521WLLLu+ur16UHrb6rLWDXU4BW9z8IzWz6D00YtUPegWvu rpWGnYyty0y/Y26C4CdiFBMVUs5gpbv2yZo8+BX5AQEfMZwFF0nAlHJgUKJe5BRCTjRp j0LA== 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=51hEK7YXkoSd1g6Hzk5qdU9VHHvC+FGDBMAdzDyQ404=; b=keljMiVO7W4PaRE8GwtjL3cmkT4e/AXd4X2KsQUQrCAAYb9Zpa7TBTjaTKgZM6gQs6 hUY3Y3V7HH9KWuoT2adMAFvLuvoTlPHDppZw3ZwsorZGBNJZolZIiP9o+HLz+2Mvb2jz R5rUHEindSrzwp3Md0Sso1Zec0Up6+J8/AtNOdyu7304ryjG3OGaYnonrtsjWOUiPYPo Qw6Ola7DrNtNOidwz0Bb1xk9MxGci9z+i0Fi/G0HsgomMtoZFsoeE2vkauEFtyPLvk4i uoZLPibZBSXDO8xaqdozTVLw6tKl7peIOb+YkkO8bM6iGBiw0Yr1fPfLICZ9ZpFOxzgL FgAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=k5aBVriX; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a633c4c000000b0051b5256a3fdsi4058226pgn.305.2023.05.10.04.53.09; Wed, 10 May 2023 04:53:22 -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=20221208 header.b=k5aBVriX; 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 S236996AbjEJLvt (ORCPT + 99 others); Wed, 10 May 2023 07:51:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236724AbjEJLvq (ORCPT ); Wed, 10 May 2023 07:51:46 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED85C30FA; Wed, 10 May 2023 04:51:44 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f4ad71b00eso3278935e9.2; Wed, 10 May 2023 04:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683719503; x=1686311503; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=51hEK7YXkoSd1g6Hzk5qdU9VHHvC+FGDBMAdzDyQ404=; b=k5aBVriXyqdLa3IZkNKX69lcaW9Rqp0/vMjf590zERAZUjy8WgYBGhmazxCssHrkSY uQ59dMQ4HXg2rLjhIz7N5OKyIvXpslN39xFdZDlrw8Fe34yDkeLK0j7pYpK9TYkRbj7y cOxl1zEWUCUO1YMLwPO8qvlUld8Fy56oDH5PpShXfeLEJdbA7LbZcfzprH64NIPH1JBo DMaRcldozJGZ7YLSu7IDQFUgFCTa4hNBkLI+QzStUyk7BktfPndC8LENa7dg2p9h1Cm/ Qyu49tPr428d508jhulgTgywFuYXtdy+VbnJWqttkAiMUgI1danfR2tdEWw6JsertGlZ 928g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683719503; x=1686311503; 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=51hEK7YXkoSd1g6Hzk5qdU9VHHvC+FGDBMAdzDyQ404=; b=eZxmjku2UycjzSf3q+ruD9d+xetPGozD66Mh2HcqqOcxpZUcaY3+yH7MUOp6CI3GCx lenzXKm0MC5W4oWt+cjbrG66SfuexmAgu5pg8GG+Wh/FrB2Ak0JH1cgBQ/88wbz33zWK ZHg3JoQ+2FMKflxekeIea3EI3PgdM3Mp4lFPx6XfW6eTIvyzNqR4w4dImHn4/8r3i+qo siq9zM8M6jjd3eBCGMGljz0cdp8fEn9bXpIvoDQPeU5wFIerKVLjkDOle0ozedb6eLUl 7NU/JicV+z7XqlKnrtc+4shlu3HgSI57LoD2Ii1MJBBu68f/iGBxUXg8SmaAR2SH+eDX VzUg== X-Gm-Message-State: AC+VfDxYTO5g7nLTDWvp/X/LaIXswzszFdS9aqhI2gIbhVj0ft4h5/lW 9slVgBtngB7Qxcj9eOUbyoM= X-Received: by 2002:a1c:4c0b:0:b0:3f4:23e5:5baf with SMTP id z11-20020a1c4c0b000000b003f423e55bafmr7507500wmf.7.1683719503334; Wed, 10 May 2023 04:51:43 -0700 (PDT) Received: from localhost ([167.98.27.226]) by smtp.gmail.com with ESMTPSA id k9-20020a05600c1c8900b003f4283f5c1bsm7977393wms.2.2023.05.10.04.51.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 04:51:42 -0700 (PDT) From: Aidan MacDonald To: sre@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, wens@csie.org Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 0/7] axp20x_usb_power: Add support for AXP192 Date: Wed, 10 May 2023 12:50:39 +0100 Message-Id: <20230510115046.963432-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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?1765507965546028454?= X-GMAIL-MSGID: =?utf-8?q?1765507965546028454?= This adds support for the AXP192's USB power supply. Most of this series (patches 1-5) consists of refactoring the driver to avoid explicit checks based on the variant ID. Doing that makes it very easy to add support for the AXP192 in patches 6-7, and as a nice side benefit, should make the driver more maintainable. Patches 1-5 are unchanged from their previous submission[1]. [1] https://lore.kernel.org/all/20230218204946.106316-1-aidanmacdonald.0x0@gmail.com/ Aidan MacDonald (7): power: supply: axp20x_usb_power: Simplify USB current limit handling power: supply: axp20x_usb_power: Use regmap fields for VBUS monitor feature power: supply: axp20x_usb_power: Use regmap fields for USB BC feature power: supply: axp20x_usb_power: Use regmap field for VBUS disabling power: supply: axp20x_usb_power: Remove variant IDs from VBUS polling check power: supply: axp20x_usb_power: Add support for AXP192 dt-bindings: power: supply: axp20x: Add AXP192 compatible .../x-powers,axp20x-usb-power-supply.yaml | 1 + drivers/power/supply/axp20x_usb_power.c | 307 +++++++++--------- 2 files changed, 153 insertions(+), 155 deletions(-)