Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2615488rwd; Mon, 15 May 2023 14:23:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5A7j/YqFmX9qQZyrHkkK6PiKm6Ul3w7b2+NoIQt/848lsUcgNBJP7BaB89RJvsTWBPX7AV X-Received: by 2002:a05:6a20:3d82:b0:104:2200:8949 with SMTP id s2-20020a056a203d8200b0010422008949mr19476722pzi.56.1684185794889; Mon, 15 May 2023 14:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684185794; cv=none; d=google.com; s=arc-20160816; b=zy7WyDkw6AVYEf+EfJFfUj/gWOKF/gESPuaWSig8BeneteaD1gUEmO9SBupJVdR+mb AJeCn/DwA/uVnrGV+gsPuKWWYLDtZ9UcNBrze1WMWJVg/W+t0WNGoeI+520mZ9pRl+gU nZK7/w8FBcgV27Hh6DafbSHaL5AJKlRb0SByVtPRLB2WSbvK7xWeD3kaxxjphqw7VtXo 7SPYTwvvvIe6+f3V1GOSH1zYnO1y8W+L4m8z/Gl7C1DaszkmTvdrHCviK7Nol9xcJQwr NbkJdUQwwpsWyu0/BtVzu77Ky0fWy2KfDorPwplIR28AS0lqLesjA2V7DK1gytzv+bzx hneA== 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=PTnWKOVwScKl+WCgTZ/8M6vIAo8mTXk5S55Q7MA7xKE=; b=JeeGD7aKYZ/yHYnPovohHJKCUJ7OEvliqa054I1IzpOxjM7TOdKoYZtx/7vtQEdziV ibddIJMP0jhlnmPFLoB1V8uw/ajcpX7JIXwwYHoEXY5ungJLAd7ymlSzvGwcnU5acDz0 Dtvt0mNxuI8dsBnedMecfULrHCzpUHuMmjxcn5RVPV8L+RJjbcEKKaWERJiTS/JckQAm +k7k4IwKP21H796wNP8FnFKPB933jpehDYn4yJJcLURDtWG9rx4V8aQHfm+TsECgylyG 9vS62neQ5mycNvkqc9ehFwgn9yf4nFFMrGmfqAj++Jfmrs5rGWjsbcbP38vUpDjd1lRJ UTOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rocketmail.com header.s=s2048 header.b=kKGzwWqR; 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 v10-20020a63f20a000000b0052c575f1d8dsi8443423pgh.260.2023.05.15.14.23.02; Mon, 15 May 2023 14:23:14 -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=kKGzwWqR; 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 S245425AbjEOU5i (ORCPT + 99 others); Mon, 15 May 2023 16:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245274AbjEOU5g (ORCPT ); Mon, 15 May 2023 16:57:36 -0400 Received: from sonic314-20.consmr.mail.ir2.yahoo.com (sonic314-20.consmr.mail.ir2.yahoo.com [77.238.177.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E44B449C2 for ; Mon, 15 May 2023 13:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1684184253; bh=PTnWKOVwScKl+WCgTZ/8M6vIAo8mTXk5S55Q7MA7xKE=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=kKGzwWqRKpguxDZ6mAEHK2jo/7plMV2/QW2A7dQlCtYSmvTM/2vL8q3Y3hOawWM5H8OGFZRORiprs4SnyuKlXVmIa9hv95qE8qNlQoIdZwLC81q9dHnp+ITqGLfVqO9ew3oTrXAXI7wDPmpRnNdSPMCIEgRhRXc8ty7daGA42F4Dkz1iy4qfin9F9AEfDBJWORHqOFGRhqzkOGw9gahL6VzlUynzeDfwqZi8pB3KUKPBx67wnTs/OHe9AaqJy1WS/ywL/ALRGLx/yZ2l4kUX5rcXUuvef1lxI3AYJqq0aRsHaPf6c/ObCooNSl/REmKw8dugFSAr5TKYx0dgYduw+A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684184253; bh=3UZj6+IUbu1dpgrCiSSAmArtJ3E03R0SU/FNwslWfcm=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ahJwCd9pPmQr2Gh74FjyXDln3OQKdA3BJQlJ0uZCfmPTBhMt7ghD/ztn1Fk0S+irsiFUY2fGihEdLTTQtOPS9YIIkJkHy8Ha6Z/Yt/CSVryK1RguTTFSPfKNSumQMwZ3dUt5iHUDJJgm/6in4wmPCLXiu7vT8Z/5ZKLGt35nB+4TEqqrcX/NId2L0d/YdcY/ipmjebzjx57wuK20mUGR/BHh2jjXJf8N6wQFwxBYe+rCRPixoTtBA81Gced3syLStoarohEO7tx9iOdj7GdEy4ebfzvALhbITBS6v8VVYs56vbF+ppIgwYo42BVu3CFRmux8muSfwQ7kM/y+PL5vDQ== X-YMail-OSG: ZgSqx44VM1l6pv4qLXh6meoNUTjgGmGzVKAe_XDFLeE1Rt5yBwuVtHORvMBaVLV BFb8Qutd2s6mH3S8VSpDoPSMW_K9x6KiU4VSCU39G93BwwBy8URVzddnW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AZFU 9G_XpMh3xeWTuZtovVty8M4qppJOt4yU5QObJuRdxveOopNcoQawrnGRcar1BZqWOHcbJ2GtJEWW bnXyTv8ZoxxNLjyD.xQ-- X-Sonic-MF: X-Sonic-ID: 71a0360b-f41b-4c59-ae84-6f36526fd548 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Mon, 15 May 2023 20:57:33 +0000 Received: by hermes--production-ir2-7867f454fc-mmctx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9295bf04d78301a0059f933a0cc30ae0; Mon, 15 May 2023 20:57:29 +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 RESEND] Add RT5033 charger device driver Date: Mon, 15 May 2023 22:57:09 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: 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,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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. RESEND: Sorry for spamming. The first try of sending v6 got interrupted and was split into two threads on the lore list. Therefore sending it again. 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