From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F8DDC7619A for ; Wed, 5 Apr 2023 15:12:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238761AbjDEPMV (ORCPT ); Wed, 5 Apr 2023 11:12:21 -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> Precedence: bulk List-ID: X-Mailing-List: devicetree@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 [李琼斯]