Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp767547rwr; Fri, 5 May 2023 04:57:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6TZ+nXcXARyb1QwAd8zUF1trglDc1lcq8o09eex9OezQ0Ra3eB2TaTQ73+k2HLQRclTk8E X-Received: by 2002:a05:6a20:1447:b0:f3:532a:7150 with SMTP id a7-20020a056a20144700b000f3532a7150mr1822619pzi.0.1683287854132; Fri, 05 May 2023 04:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683287854; cv=none; d=google.com; s=arc-20160816; b=QePXGFoAjPtKPKTHfHt29cJWJ7o8d6pZRm49qR4nZtH7aow+B4EhACNUFgjQyiKDsg 3Vap1RJt0VyC0FA/m0DAKhMHC8+Csn1d6svBx1DaGOS7qFCVp4EMHIqZ2E96tBgYPtm/ uV8IixjAnbhMX/guyXSpyNE+RXkpsaFbyVV71HptngnfExLW63Nr0vlGuUpWHyCwJ5DQ skqh/nf4P9IOHxTyc+7g/8PLSTvh0k1FuwJs2MI+mu1NA6VGp18ai3bhH/n8L2kva70d zIfUPVR1UBFY4bScIGUxlJ8IB1IjqckpHB1KQjudjyT9O6AWkQfo9PrPB3th6cmoRwoq eMbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=K+erYGuzVel6Wt0GXIzw1tiExd3TT8UKse0/nxpknnw=; b=dnAYpQg6fW7oQyhogYWkcnqXBfXin+zhZDMbVAD83lhQ7uyxyGzmPlfuqAoZj1UioN baT977S+dqj5ehDCQI4bwc+bCUun5+i5Ec3wRTFk7gGLU5QGaqlbA6VKSgEG2JGeSey0 Fc9NYbzzYJcMTmpwELqj5aWO8YlyFl7lMQVNY2IMjOCETFqe4MqqzRsSoBWs1K22Kyvb KdSfTqcTkDWVWNDtTkDfQY5RwKFwcH9aVGMTtI6lWG79p2+NAaYk3laIrSDN6AcNrUoK 8oUh/PxES28DIcsbxtlNfHeE4yJ77re7CgeMBZcBxbs2SHAn7g1vEJUGta94QtBXTES7 JXSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EekaU10y; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u66-20020a637945000000b0051b2ba5cb37si1695374pgc.437.2023.05.05.04.57.19; Fri, 05 May 2023 04:57:34 -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=@linaro.org header.s=google header.b=EekaU10y; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231393AbjEELvt (ORCPT + 99 others); Fri, 5 May 2023 07:51:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231549AbjEELvs (ORCPT ); Fri, 5 May 2023 07:51:48 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5305140E7 for ; Fri, 5 May 2023 04:51:46 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-559e53d1195so23489587b3.2 for ; Fri, 05 May 2023 04:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683287505; x=1685879505; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=K+erYGuzVel6Wt0GXIzw1tiExd3TT8UKse0/nxpknnw=; b=EekaU10y4mPaDuwkIsS+ze7K2LN+h46tvg0V5OHhGTeO7KmtTDKMkkCdIH1ptIrMhk Vadr1560duuxogcdD7Y5Xvm2CUAY1fFRMaFx/Sv0/4kcSLG/cYNoC1hMEjhqo40f4SPe PjjO8F2PcunZER2BHewKHIsWmdtJJHvQ7BlgLlfKRHKd4JclX0IfkfT8DYV6BHXxOvfq XJEIhLbQ0189I4pRlf3WohiZoYxYx+zlWr5oVYw6Zhl2EQzTFhsiEqLE6adAXD69UJ6T Mzity5p4MbDJh26qyVQNAoyb252ewbu9/UP7xC9J/gdwlpAA1ivddTk3iaoHLSOep3jA 0oRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683287505; x=1685879505; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K+erYGuzVel6Wt0GXIzw1tiExd3TT8UKse0/nxpknnw=; b=kLkQ6v6ZOPXpzG1zFRsfyNd96O4BUaYPXWd6ObXR1yT4NFjWd/lXbC0ufgAqfOND3D rWxam/IOcoP88bNvZqlhjQFuWISOfcAqnRQJR/tOvKcW5sTkZSyQYj3N1oiqfRPc2kGQ WP1bEl0vuzDKCi8D6pRIs1O7h4+qcmdbnz1z4w113LgaGBPUggreM9gMGoUExAyyuKzR ZkmXv6McebtI7rBCctCVM9o92EyO5CAU7nhgdMOw1fkFaYHtkO+0deuGxQtIXv9Xi01f qZ6tuqRy1EukJQqRnd3bmHR778W5NAZBWv2VaQO0Lq9IVjrce6PmbYca2GfaOj73maRv mBOg== X-Gm-Message-State: AC+VfDw6bXdzRYZLro2wn4waHbJWXbO7n3jpBQ/G/0NKA84JQOiRQ2xs ylNeLNgLyKPx0DltwpDfTCqWSLrsjpr8lL9gUR64LQ== X-Received: by 2002:a81:5456:0:b0:55a:5ce4:aff2 with SMTP id i83-20020a815456000000b0055a5ce4aff2mr1302691ywb.39.1683287505527; Fri, 05 May 2023 04:51:45 -0700 (PDT) MIME-Version: 1.0 References: <0070da504581081906a30d1095b104c4c2930e86.1682636929.git.jahau@rocketmail.com> In-Reply-To: <0070da504581081906a30d1095b104c4c2930e86.1682636929.git.jahau@rocketmail.com> From: Linus Walleij Date: Fri, 5 May 2023 13:51:34 +0200 Message-ID: Subject: Re: [PATCH v3 5/8] power: supply: rt5033_charger: Add RT5033 charger device driver To: Jakob Hauser Cc: Sebastian Reichel , Lee Jones , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Beomho Seo , Chanwoo Choi , Stephan Gerhold , Raymond Hackley , Pavel Machek , Axel Lin , ChiYuan Huang , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Fri, Apr 28, 2023 at 1:30=E2=80=AFAM Jakob Hauser = wrote: > This patch adds device driver of Richtek RT5033 PMIC. The driver supports > switching charger. rt5033 charger provides three charging modes. The char= ging > modes are pre-charge mode, fast charge mode and constant voltage mode. Th= ey > vary in charge rate, the charge parameters can be controlled by i2c inter= face. > > Cc: Beomho Seo > Cc: Chanwoo Choi > Tested-by: Raymond Hackley > Signed-off-by: Jakob Hauser Reviewed-by: Linus Walleij > + ret =3D power_supply_get_battery_info(charger->psy, &info); > + if (ret) { > + dev_err(charger->dev, "failed to get battery info\n"); > + return ERR_PTR(-EINVAL); > + } > + > + /* Assign data. Validity will be checked in the init functions. *= / > + chg->pre_uamp =3D info->precharge_current_ua; > + chg->fast_uamp =3D info->constant_charge_current_max_ua; > + chg->eoc_uamp =3D info->charge_term_current_ua; > + chg->pre_uvolt =3D info->precharge_voltage_max_uv; > + chg->const_uvolt =3D info->constant_charge_voltage_max_uv; Code reuse, exactly how it should be! :) Yours, Linus Walleij