Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp827734rwl; Wed, 5 Apr 2023 08:13:18 -0700 (PDT) X-Google-Smtp-Source: AKy350Z/sf0vMIJtMtzRtWd44mEsgwXcQWaAY0Zfcq8TigrkjOYDNbjsGgXE/UXOranosyTL5viu X-Received: by 2002:a17:90b:3c49:b0:23d:35d9:d03e with SMTP id pm9-20020a17090b3c4900b0023d35d9d03emr6403496pjb.48.1680707597963; Wed, 05 Apr 2023 08:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680707597; cv=none; d=google.com; s=arc-20160816; b=xb+m2zELSGTJ7ti3EsbFbQct0j4jhfpiY7xQiYh/TKhvYU2qnSUPzA4eyZbTGpdCOY MU/z/osr8IB19BG4dcjARpE0kRRv6bLTZShSmDmHXKWR0MWpB0BGDDTWmHACBq2ly3vZ eGUod7R8DozebtgeCr2kVgTlnJO8rpx63jSBuZTFzQjv0r4d0UaAkW75S3Cp9BBu75CS KvMIBOxq+bCNQX+hHLN39Y5ZJe6hGfBmdFgvkChSZJd4vgl7fJMOsTCIhwIGu67PoYNh vW2TuMG9XLR7tFUL1x8hTDcTzp1y0m5ZuArlp0We3bsIEAvEhnVJaY1FECYINypdqe5o zX7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=K+SAmsgB+tduQosn4CaHBDaZiplDkeAeVzgIMdPuV80=; b=NZo2zjYDDO967dBBT+mQUIEzJXSswONIDM07iZJIiB09h7gfb9l4HSLm0n6Nspkkib Hcx2onyI3VyXGmu/Xa2gbOv89QnQ5wNBvxtdjPmTJn+TQgKkjn7Zfy422fsIIqXPlTUv R/ksn+qWTa3VKqj1gpH1QrbPX19/Aa6Uhb9rd+2FLgo5iE5xBU0EKGqvdRKU+cwb00yh pBkjBjZyPDQQ/oufMgrXYLtrFGIEj+RReG0yVpI1P946LUqLGwkKss72gjblmpyii4y4 Bw8Z/w+IQz+boUqrsAPIegW69gWt/VYlMIofdMLg3fWe34hcaJSUTq7Y8vzOfPef/cUi IjrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BZFI+hPK; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a17090ac68500b0023a6ea894a0si1479549pjt.88.2023.04.05.08.12.59; Wed, 05 Apr 2023 08:13:17 -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=@kernel.org header.s=k20201202 header.b=BZFI+hPK; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238816AbjDEPMW (ORCPT + 99 others); Wed, 5 Apr 2023 11:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238769AbjDEPMH (ORCPT ); Wed, 5 Apr 2023 11:12:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE19B7681; Wed, 5 Apr 2023 08:10:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3F654625CB; Wed, 5 Apr 2023 15:09:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBFD4C433EF; Wed, 5 Apr 2023 15:09:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680707361; bh=FxEmb+M2evgHnsZfxS1UlIMfH2L1Tho1TVG1Xe+iAC4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BZFI+hPK7i84yEj5DRuNajp7u5CO+lLZbstdWLXSiIhmTyCEHJzqgSQK2mWWzVADj UVfAqMLBjzc+0/B8t1S1EtEyTmAX7O4vXGWETm4XB8slG/pY2Y+n1NW8jkYI/p3I4z 2bhDnE9nPiVv6o8QlPO9o7+kBiLijrMFOS+/IIUI8bqp0QD6qxBPStpUj71GDGL48l imc11RsRiFRYgVFkiWgn8l4v52ZOCg38SsHvEnnFHwWGhDHUsB2OAp3bnfv7mBQFv6 Xfz4sQWmsgF/hu6uuonIy3yuE7mSiqw84kUm55dL8OlqaGqnHtr04qlK4CHM4MzCbT 6srFOk0V9VyDQ== Date: Wed, 5 Apr 2023 16:09:15 +0100 From: Lee Jones To: Jakob Hauser Cc: Sebastian Reichel , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Beomho Seo , Chanwoo Choi , Stephan Gerhold , Raymond Hackley , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH 05/10] mfd: rt5033: Apply preparatory changes before adding rt5033-charger driver Message-ID: <20230405150915.GN8371@google.com> References: <4edfef7fdf129185355d4dd2d3928d63c04bac73.1677620677.git.jahau@rocketmail.com> <20230305105551.GJ2574592@google.com> <9ce4110c-eaff-3f8b-65da-8407e05af493@rocketmail.com> <64840676-b779-8ebb-3a7b-27d58e0e0346@rocketmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <64840676-b779-8ebb-3a7b-27d58e0e0346@rocketmail.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 On Sun, 02 Apr 2023, Jakob Hauser wrote: > Hi Lee, > > On 05.03.23 17:14, Jakob Hauser wrote: > > On 05.03.23 11:55, Lee Jones wrote: > > > On Tue, 28 Feb 2023, Jakob Hauser wrote: > > > > > > > Order the register blocks to have the masks in descending manner. > > > > > > > > Add new defines for constant voltage shift (RT5033_CHGCTRL2_CV_SHIFT), > > > > MIVR mask (RT5033_CHGCTRL4_MIVR_MASK), pre-charge current shift > > > > (RT5033_CHGCTRL4_IPREC_SHIFT), internal timer disable > > > > (RT5033_INT_TIMER_DISABLE), termination disable (RT5033_TE_DISABLE), > > > > CFO disable (RT5033_CFO_DISABLE), UUG disable > > > > (RT5033_CHARGER_UUG_DISABLE). > > > > > > > > The fast charge timer type needs to be written on mask 0x38 > > > > (RT5033_CHGCTRL3_TIMER_MASK). To avoid a bit shift on > > > > application, change the > > > > values of the timer types to fit the mask. Added the timout > > > > duration as a > > > > comment. And the timer between TIMER8 and TIMER12 is most likely > > > > TIMER10, see > > > > e.g. RT5036 [1] page 28 bottom. > > > > > > > > Add value options for MIVR (Minimum Input Voltage Regulation). > > > > > > > > Move RT5033_TE_ENABLE_MASK to the block "RT5033 CHGCTRL1 > > > > register", in order > > > > to have the masks of the register collected there. To fit the > > > > naming scheme, > > > > rename it to RT5033_CHGCTRL1_TE_EN_MASK. > > > > > > > > Move RT5033_CHG_MAX_CURRENT to the block "RT5033 charger > > > > fast-charge current". > > > > > > > > Add new defines RT5033_CV_MAX_VOLTAGE and > > > > RT5033_CHG_MAX_PRE_CURRENT to the > > > > blocks "RT5033 charger constant charge voltage" and "RT5033 > > > > charger pre-charge > > > > current limits". > > > > > > > > In include/linux/mfd/rt5033.h, turn power_supply "psy" into a > > > > pointer in order > > > > to use it in devm_power_supply_register(). > > > > > > Are there no present users to account for? > > > > At least none I'm aware of. Within the upstream kernel the > > rt5033_charger power_supply didn't exist so far, the patchset is about > > to implement it. > > Is there anything you want me to change or improve on this patch? If there were I would have said. :) Please fix up the other review comments in the set and submit the next revision. > > > > [1] https://media.digikey.com/pdf/Data%20Sheets/Richtek%20PDF/RT5036%20%20Preliminary.pdf > > > > > > > > Signed-off-by: Jakob Hauser > > > > --- > > > >   include/linux/mfd/rt5033-private.h | 53 ++++++++++++++++++++---------- > > > >   include/linux/mfd/rt5033.h         |  2 +- > > > >   2 files changed, 36 insertions(+),` 19 deletions(-) > > Kind regards, > Jakob -- Lee Jones [李琼斯]