Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp940713rwr; Wed, 19 Apr 2023 15:53:57 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFwMkD9z4lpPrm+a14QojxSAjmItq2dltRyoQdpj5aKlbe9lELXhjUCcHlg+c0LCTDHexX X-Received: by 2002:a05:6a20:3d91:b0:d9:6660:8746 with SMTP id s17-20020a056a203d9100b000d966608746mr181281pzi.18.1681944837120; Wed, 19 Apr 2023 15:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681944837; cv=none; d=google.com; s=arc-20160816; b=TRidlIgkmgv+QtwZHXPfHS4ApUcNuoFY0EHUoxSF5slDWBRk+63xShj79VqKIP5+nV nVh+v/6ywvzZ3BZNmi+lwCZahtw2HWeKAbGioP2mhUE03ENebF3qNoQEB2KIdiRVN5t2 WvOQoylW8uXxWS+Ey5LxiEry/LrJupMUZNytlNXpo5Lk2sWQ3m8p5U618TiK7BVWfKwK Bf0qPj1zW7BNi+fK+KB2LL40MbeAPwC5F3nPEYjsBoO5TTFig+oc8i5E5SzM/braPn2r IyNhHWMVMGQ3D7GkTxFojxAwUmaGGxas9zcUAVR2ctOk6Aohe5ASqTN8smRafPR0qf9O Ab8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DiXiE/1gerU+3DYKDimYWGfxbF+vuI55TlPqE/rlYqU=; b=c/2dV+952tkDShi4U0v5YrNugbNHQx8ggCAJuYjG5WeMsfefpZVkLDVdQt1snw4IoI egnXSczV7MXsNn0zckIaUIBz3I5xxhOm1XGxEPMxWCWTa9sKHundepJzfhZIBnvlhYZA 63AJ34+G3KpNhNQOD25ciwfnpAUNzBjxygrRXCPFxjLUelQe8oIu2FtkBzGNcyyS+iyG yptDTm1GMpJ+z5m8WaxQAh34ksMEpyijKY0Tb2k3fqZwTBeBQNqLrAOvxkdDRbhYMgRN ZIyji4OqgjBrIpWjZcaAXaQMZTRDImtBvkZ7G9RuWdBqT0z8o52Yqet1WtAr57GUNUOU ko2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rocketmail.com header.s=s2048 header.b=SpzDdu0U; 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 w26-20020a63475a000000b005139d2b9306si16196588pgk.514.2023.04.19.15.53.43; Wed, 19 Apr 2023 15:53:57 -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=SpzDdu0U; 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 S232426AbjDSWne (ORCPT + 99 others); Wed, 19 Apr 2023 18:43:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231712AbjDSWna (ORCPT ); Wed, 19 Apr 2023 18:43:30 -0400 Received: from sonic310-12.consmr.mail.ir2.yahoo.com (sonic310-12.consmr.mail.ir2.yahoo.com [77.238.177.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D0259C0 for ; Wed, 19 Apr 2023 15:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1681944121; bh=DiXiE/1gerU+3DYKDimYWGfxbF+vuI55TlPqE/rlYqU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=SpzDdu0UZ/fGMv4/o4nLhY81fqstVeN+cyaiHe1Kz0AOYFuex8a7SPhZ4OTq2bhihEpDiEp2jdE3qOW0IQRZ8hXsfpyKqXUNdrcU5gQl5TCYSMGCpJWGFcaJixwWrWxySKS6zQONuqUCeuW6xnPSFVbuyh6bmgq2SI9MA7EtThCZWrhBPlGraDLr6/YFi1+G9hYVwmkG3XQvAQxwffF0EXyVv9HPTLgSWnBSXtt+6Wn4BkzZ4AxYHAtulQZS0shP5XMNsXOGrQogFuPV7qsja5O4JJNzD8izKqGtKBx2E9yG2nDe8dCgDR+QzQSYc1plavKNbO7QxXM1wMOJBhqTEg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1681944121; bh=ev/rs8vyiV8vNxalCiSkN1YU4QbzUCepxWOTZOTl8q8=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=W+LZEFMA0tYPRbt/JA6w2EgbpO3y8VGSj6p56dDNGhY0PH6uYB0bbcMAz/yK6pTRd3vc4XiOW0N2If9boBCJ5NWYgFHCoaZof/nYqU41QcmBgX16ZxIpgxEBDJQ/qN2OB0Z6YU/K8NOmLlKo/ENd6Wc73RHSRhMSdBnLebeZKrlqjbkCubO1TQA96OrsS8gEvKR1coqagLbHmxgqNH44NVPZq7A93TLUpbE3JoWvUof0DpJ8HvaJ2TajJwPbQnCg4SOuWpRiv6A/POLUYmaXfjoJqlk+OFvkBlR8o+yLiT8wJMz9d300tAV6Tl+sFKabX7oZc61HzxWLnOlMkHUgmw== X-YMail-OSG: fyVOcfEVM1m96XlvCFfN_FXkulnUCMmxIH0jD.3iNQ7unHvweOujjzZIy6mThZo xSY0_BzsNNE9c12d0cyVB0A.DdyQ.ZF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EVFtQLGwuq5Avv0dgJp52uclOP8sPXxB ZrBpAoRJy_PxBxdoXV5MGmQvmpJzRs.99jMgQcxnLqnCalqZekT_D4d4g7GvtlOu_Jmvb7nPSEa0 e8aID.YQTayNoBB7OHUyrhC2U8ISuUSs- X-Sonic-MF: X-Sonic-ID: 1a39f33d-85a9-4766-b6a1-28c18b0e86e4 Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Wed, 19 Apr 2023 22:42:01 +0000 Received: by hermes--production-ir2-74cd8fc864-qfvhg (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1848f5b565d7088490b56d0999a0e274; Wed, 19 Apr 2023 22:41:59 +0000 (UTC) Message-ID: <457244a7-9d28-a19d-40a5-8d45861b709d@rocketmail.com> Date: Thu, 20 Apr 2023 00:41:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v2 9/9] dt-bindings: Add documentation for rt5033 mfd, regulator and charger To: Krzysztof Kozlowski Cc: Sebastian Reichel , Lee Jones , Liam Girdwood , Mark Brown , Rob Herring , 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 References: <9275af790e6e21b5cf661a2444effe4caf2be02e.1681646904.git.jahau@rocketmail.com> <5b41b54c-88d0-3666-9db2-9cbb90ba8183@linaro.org> Content-Language: en-US From: Jakob Hauser In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.21416 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hi Krzysztof, On 19.04.23 10:42, Krzysztof Kozlowski wrote: > On 18/04/2023 23:37, Jakob Hauser wrote: > >>>> +properties: >>>> + compatible: >>>> + const: richtek,rt5033-charger >>>> + >>>> + richtek,pre-microamp: >>>> + description: >>>> + Current of pre-charge mode. The pre-charge current levels are 350 mA to >>>> + 650 mA programmed by I2C per 100 mA. >>> >>> minimum: >>> maximum: >>> multipleOf: 100 >>> >>> Same for other cases. >> >> The "multipleOf: 100" doesn't seen appropriate to me when the choice is >> 350, 450, 550, 650. Those are not multiples of 100. It's more of a step >> size. I didn't find a general property for step size. Listing them as >> "enum" would be another possibility, I guess, but not an elegant one. >> Especially for property "richtek,const-microvolt" there are 30 >> possibilities. > > Ahh, right. You can use enum here and min/max for other cases, where > multipleOf cannot be used. > >>>> + richtek,eoc-microamp: >>>> + description: >>>> + This property is end of charge current. Its level ranges from 150 mA to >>>> + 600 mA. Between 150 mA and 300 mA in 50 mA steps, between 300 mA and 600 mA >>>> + in 100 mA steps. >>>> + maxItems: 1 >> >> Here are two different step sizes. The first few are 50 mA steps (150, >> 200, 250, 300 mA) and then it changes to 100 mA steps (300, 400, 500, >> 600 mA). How to deal with that? Again I guess "enum" would be a >> possibility, but again not a nice one. > > enum Thanks for the reply. Looking through the properties, I get the following result. richtek,pre-microamp: description: Current of pre-charge mode. The pre-charge current levels are 350 mA to 650 mA programmed by I2C per 100 mA. maxItems: 1 enum: [350000, 450000, 550000, 650000] richtek,fast-microamp: description: Current of fast-charge mode. The fast-charge current levels are 700 mA to 2000 mA programmed by I2C per 100 mA. maxItems: 1 minimum: 700000 maximum: 2000000 multipleOf: 100000 richtek,eoc-microamp: description: This property is end of charge current. Its level ranges from 150 mA to 600 mA. Between 150 mA and 300 mA in 50 mA steps, between 300 mA and 600 mA in 100 mA steps. maxItems: 1 enum: [150000, 200000, 250000, 300000, 400000, 500000, 600000] richtek,pre-threshold-microvolt: description: Voltage of pre-charge mode. If the battery voltage is below the pre-charge threshold voltage, the charger is in pre-charge mode with pre-charge current. Its levels are 2.3 V to 3.8 V programmed by I2C per 0.1 V. maxItems: 1 minimum: 2300000 maximum: 3800000 multipleOf: 100000 richtek,const-microvolt: description: Battery regulation voltage of constant voltage mode. This voltage levels from 3.65 V to 4.4 V by I2C per 0.025 V. maxItems: 1 minimum: 3650000 maximum: 4400000 multipleOf: 25000 Kind regards, Jakob