Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2541904rwd; Mon, 15 May 2023 13:12:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57iTOlPUssPDb5nlETY0JqJZuzfZiFnlkjAiTfibt1RiK/f1qm82GB+0huhryWDLHHH4en X-Received: by 2002:a05:6a00:4305:b0:64a:e8a2:bb26 with SMTP id cb5-20020a056a00430500b0064ae8a2bb26mr13753182pfb.0.1684181521192; Mon, 15 May 2023 13:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684181521; cv=none; d=google.com; s=arc-20160816; b=hvKbRjbLcLHQnhp9Xauc1BvdQY5Zgi37kZyF2/dS8DUZuZV0cxvhWOLsBkD7fQBV6y 554CL8qonvEOuilp7uN5fZdWEYPZhXlFRZCQgE271+rrghB1hlNDcekvEqVXkf0BwMiC ossQTGhhHt2lOOaEtF8DKFo5DbIfH9HvTZBp4hrRlMHQrlsBl0IqDrHEMr415fRBrpXU f4yLd1C7S7PKs8Ka00Uewa21+S/zp2zfy2yV9iGjMN35lvFNPlUrOYLuz5wEq6Rg5XMR xpBE2qV9JoaP4rw00UeeLIb0ImGERJcTIVLpOkWOV4v24vZcOp79xjCfMVCZNPttv1U2 hiSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=WJLRyMpR9Zs1Mo1BzHlS7P1TlsFQADra8VgIsrbooio=; b=P9xte2Sio2YAfrhrcCNz14irrb8BovOr16nFtQoxbPm1KpJVU0G/b5uFwC9/B9S9Av 5msv03/i30ZKz5mQUHAv+9aBij6yx6HS8LRscmYP4NHC/PsZSucsCqa+ul1xo9TFUemM Dutx7FdkzfFKy8SCl1eC6oRr7PKXUR13ObgQDWb5O70uMXBb+P1l0r2iA3lKg2denJ1m D3LhdVgJ6kjoRH51S/BFNTapSGYNi/LRW/o/9KmHOS+jw/OE5hB7h/nOYW7gdmX296X3 YYjEem8GILFOZ0qZzVCPjYJY8vu6FTpe/MRjY4Zetm2tw75aHEIjGp3nWRQEK3l+MP6h +MCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rocketmail.com header.s=s2048 header.b=ch2BMQ1V; 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=REJECT sp=REJECT dis=NONE) header.from=rocketmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020aa79f08000000b00645edbb3916si18139948pfr.37.2023.05.15.13.11.46; Mon, 15 May 2023 13:12:01 -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=@rocketmail.com header.s=s2048 header.b=ch2BMQ1V; 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=REJECT sp=REJECT dis=NONE) header.from=rocketmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244742AbjEOUK3 (ORCPT + 99 others); Mon, 15 May 2023 16:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231876AbjEOUK1 (ORCPT ); Mon, 15 May 2023 16:10:27 -0400 Received: from sonic305-21.consmr.mail.ir2.yahoo.com (sonic305-21.consmr.mail.ir2.yahoo.com [77.238.177.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51AA510E53 for ; Mon, 15 May 2023 13:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1684181424; bh=WJLRyMpR9Zs1Mo1BzHlS7P1TlsFQADra8VgIsrbooio=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=ch2BMQ1V3uCl48wXN0HOAwkLTL586giooeA0Po/N54aUpW3MhnFdFTbBlmngLdhBO8t3V2RiqUnqHwtkYku3mWE/8TpbvRgcn7TzxgAh2fPlaR4MKgHSxBatBI3k87wBypyKDwbxT/EYOQTA/arviuOitAsej/enJTepHejweJgs5EUEg21i9j0WmoFan6cGcIMC00LBiQ8zsa3lxt+zBJIeMpTG5exao9sOgy35EJxhpwYyrSMMCYgl1t39mXVDmlTqgdJn4tGvxjJrswv0wtEtUWcbZuIRA8Duz0N1SE8EkMGz4nwCqY5m5bj7H0P886Mhv7xt5KAUY2x/wr3thw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684181424; bh=RSXmtpPAyShuCSoGphsWw7WxrgudOXz6AWlodofl/eC=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=j73I1VmrqBv+mCWVqfV1sYxT//xT9M0H8WHP5wNi2NUQPHct60mf15n3+AkSTZ95ymrE08LA5mMYtxXASzLKtrgbSr/Xptb9HHdiNT0p7wDWulRrUH4QIyGSwG82SYSuF/RFFFN4F5ATynVKf++Ikcxsn94GDMD0L6TML+pQ0rwf7Ub+GXdnXamEBr5Mrsc9TcY8u0ED/L1Ajnw/PAb00iKXRhuAO/fm3lYSdBQIRu/axUxKFp+FUFivt+jSkGYBWpPZMzAdnhQl7WayVpTBknnlI2azv8skMBje3ZMRzJPK7asTpa4/jhyy9R3/sS7O6jjAc405DG/6+z3svXZ9HQ== X-YMail-OSG: bHI2BcIVM1lJ1l8qDhdtIfAIQj1C3u.Ve6BLiDYp0QVl7eswburp0Itxysx9rCS p2ZM0bMoeeytmjCPQqSsKyf5iownGKhLFwUghaerB000.0z67O8x6ZY8l60VaN3jnRvghI1OicL8 o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y6C7ffIPRX7NmDcD5R2lplV7Y9fs5tKt4shVrY4 .1UiIPXrNn4kTNy0y7XoU X-Sonic-MF: X-Sonic-ID: 8a8a3ca2-8e9a-469f-bb3c-619cd0f5a80e Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ir2.yahoo.com with HTTP; Mon, 15 May 2023 20:10:24 +0000 Received: by hermes--production-ir2-7867f454fc-nvr6n (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a7905ff065b8716c1e39bbada6be8236; Mon, 15 May 2023 20:10:22 +0000 (UTC) From: Jakob Hauser To: Sebastian Reichel , Lee Jones , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Beomho Seo , Chanwoo Choi , Stephan Gerhold , Raymond Hackley , Pavel Machek , Axel Lin , ChiYuan Huang , Linus Walleij , Henrik Grimler , Christophe Jaillet , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH v6 00/10] Add RT5033 charger device driver Date: Mon, 15 May 2023 22:09:52 +0200 Message-Id: <20230515201002.29599-1-jahau@rocketmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: <20230515201002.29599-1-jahau.ref@rocketmail.com> 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_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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 This patchset adds the charger driver "rt5033-charger". It is part of the multifunction device rt5033. The patchset is based on an older version by Beomho Seo of March 2015. For more information on the history and setup of the patchset see the cover sheet of version v1, there is a link further down below the changelog. Changes in v6: - Patch 5: In function rt5033_charger_probe() after calling rt5033_charger_dt_init() replaced the return value from "-ENODEV" to "PTR_ERR(charger->chg)", as suggested by Christophe. - Patch 9: Changed the patch from adding "power-supplies: true" to replacing "additionalProperties: false" by "unevaluatedProperties: false", as suggested by Krzysztof. v1: https://lore.kernel.org/linux-pm/cover.1677620677.git.jahau@rocketmail.com/T/#t v2: https://lore.kernel.org/linux-pm/cover.1681646904.git.jahau@rocketmail.com/T/#t v3: https://lore.kernel.org/linux-pm/cover.1682636929.git.jahau@rocketmail.com/T/#t v4: https://lore.kernel.org/linux-pm/20230506155435.3005-1-jahau@rocketmail.com/T/#t v5: https://lore.kernel.org/linux-pm/20230514123130.41172-1-jahau@rocketmail.com/T/#t The result of the patchset v6 can be seen at: https://github.com/Jakko3/linux/blob/rt5033-charger_v6/drivers/power/supply/rt5033_charger.c Jakob Hauser (9): mfd: rt5033: Fix chip revision readout mfd: rt5033: Fix STAT_MASK, HZ_MASK and AICR defines mfd: rt5033: Apply preparatory changes before adding rt5033-charger driver power: supply: rt5033_charger: Add RT5033 charger device driver power: supply: rt5033_charger: Add cable detection and USB OTG supply power: supply: rt5033_battery: Move struct rt5033_battery to battery driver power: supply: rt5033_battery: Adopt status property from charger dt-bindings: power: supply: rt5033-battery: Apply unevaluatedProperties dt-bindings: Add rt5033 mfd, regulator and charger Stephan Gerhold (1): mfd: rt5033: Drop rt5033-battery sub-device .../bindings/mfd/richtek,rt5033.yaml | 138 ++++ .../power/supply/richtek,rt5033-battery.yaml | 2 +- .../power/supply/richtek,rt5033-charger.yaml | 65 ++ drivers/mfd/rt5033.c | 8 +- drivers/power/supply/Kconfig | 8 + drivers/power/supply/Makefile | 1 + drivers/power/supply/rt5033_battery.c | 38 +- drivers/power/supply/rt5033_charger.c | 744 ++++++++++++++++++ include/linux/mfd/rt5033-private.h | 64 +- include/linux/mfd/rt5033.h | 24 - 10 files changed, 1034 insertions(+), 58 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/richtek,rt5033.yaml create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt5033-charger.yaml create mode 100644 drivers/power/supply/rt5033_charger.c -- 2.39.2