Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp507637rdf; Fri, 3 Nov 2023 07:09:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0c9I+/BKLLY1+JOKShi3vh+aPjKTEPmKykgPF4/RAEgvRzJZ2kKw82nh/+JvXL5eH/EPQ X-Received: by 2002:a05:6e02:969:b0:359:42cd:1417 with SMTP id q9-20020a056e02096900b0035942cd1417mr7645118ilt.17.1699020577628; Fri, 03 Nov 2023 07:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020577; cv=none; d=google.com; s=arc-20160816; b=bntLdcGYWMCOIvEhy24C/TFiE2ByJuE3DswXWx9ITogZXXEpLPhF+xNpZKw6OOFQ2w LCQiPYcOh0tp3ctb17ksxQIGjV65XHpx8BLZBuoMaokxqI2ql24dKsqAjMDk7TsV61sZ k7BhEaLuGmItIWYmhZomEDHC5rmcz7QapwRyVDI7h+3OFbKFAQe2IdOb4xVwuqQF0d/9 Tw61kh4QJDsj1RgzOPVMWtDCjxwVjGaYTXzSPt3xWy/KbYycONj9iPGlyLn/7A6Dw3t7 IpYyIa1RBw6RezjeRuQdiESxiguLV6bF1u3auJ3QN0Ki2WRkx8usmt6tPvDagklgqBEV 4EXQ== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:sender:dkim-signature; bh=sIKyxdcVNpKFBly0hFFv+ZdrlRZfkg9V+7hrvUWInms=; fh=Knt1mcEIcRUcHFGLK72zh77cC/ohd9CHE59dYe5bfhE=; b=GqLzNLzt0K96TNusUiQTYuROT3fBF4G75MFrVI0JdyAMKoveHZSd01Pc2IV9M5Ztrz S8V7XiRriqUroolzM6M8Dljrg7rG/kO0KlQwnX7GQStq++2SQCLbHqYrU97djdfTtd4d whXowH3YeYi2n5HaTItvXOLmajKc1jfr2kE8LL7m8RFJHlfj82mZHkEm0znQgSwvFua9 S8x5dvYWj5Nt99pN6eMStc0MTScLLUYExdd2e5eYZB2AfJD2Lgdv6G7zv8yBpkyRMZ9Q KEWbst57abyhGUw2ulfB5kK+CFh911do2xWCemwAl42ded78vyQDAmjgb/tVWFGHJ/FW yAIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Is2OgnZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bx39-20020a056a02052700b005abf640eec5si1644945pgb.171.2023.11.03.07.09.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:09:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Is2OgnZM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5E19682CEE60; Fri, 3 Nov 2023 07:09:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377728AbjKCOJf (ORCPT + 99 others); Fri, 3 Nov 2023 10:09:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbjKCOJe (ORCPT ); Fri, 3 Nov 2023 10:09:34 -0400 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0579CD45; Fri, 3 Nov 2023 07:09:32 -0700 (PDT) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5afabb23900so25199677b3.2; Fri, 03 Nov 2023 07:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699020571; x=1699625371; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=sIKyxdcVNpKFBly0hFFv+ZdrlRZfkg9V+7hrvUWInms=; b=Is2OgnZMJ3GvBxZfJgCAzAOUm5qa6uKsFlorxS50AGkhKzq9EiAtBfV1SupMXztTdR bIVjxmMEyWSll7ydcEBoOAJscT5ZfDKFkLYlLXdMWs3hjypu596/e2jkihrc5skqSXwV eGE7cMEW0NpE0sY1+1+HCTqrQgdhiOmV0nwRdQgqj03SevHPQYKV9VCJaIv035HQ94VU nmdB5wT3/NA3jleBKohS7X2zP1oqlMBd3g05q1Rr+4wsXw3hlC371I8ztxIRQVU5fHkP bmUh+kUiITlvU2B4qln6KjYr7xVrfMzBxwVUXLrDjRkD94a0c0QKpizS5hT063VzGj9M RWbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699020571; x=1699625371; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sIKyxdcVNpKFBly0hFFv+ZdrlRZfkg9V+7hrvUWInms=; b=eNRGNP0lyuQqb5au1yDpO47MvImeu5byo0BjltKgqFgplkfeDrshCQEH/jHBTigTvG cHVC8ZUkZ7wPR3HN/tgSX1CGvFPRuy8FDt4l6AsCMyRzSD7m9Twba/NbwwUL8ROCh8nV WashV31Zbtn3vQkoEFaKwAY1W9W1J8xc4Shm+9hicHYq3Ky/Yh+yLImQFcDcLhDJGa8t FS/c5SXe41Tfi7fhrR7K0+T6ZTPGTW+9wqeVHvSO+Bk9tSKjWuKe2AmyBIc3GDs8hUBa XECOEaOigQ51L7Q44P6vjyiVgiJKlzOdBgInEh+P0t2u/Q6fEnTzVZGFo8EjkgDBvb1T G/nQ== X-Gm-Message-State: AOJu0Yz0UOMoKzLmfidxwOHY0iAblRasVGzgIwWaaGjC8Kx6F9j1w218 KPffyItqmc8YCDqEk9Jtkfs= X-Received: by 2002:a81:9a05:0:b0:5a7:b723:8fa3 with SMTP id r5-20020a819a05000000b005a7b7238fa3mr2580452ywg.26.1699020571074; Fri, 03 Nov 2023 07:09:31 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id r125-20020a0de883000000b005a7fbac4ff0sm966265ywe.110.2023.11.03.07.09.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Nov 2023 07:09:30 -0700 (PDT) Sender: Guenter Roeck Message-ID: <5451ac26-c498-4af5-b3fa-fe2265433ccc@roeck-us.net> Date: Fri, 3 Nov 2023 07:09:27 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] rtc: add pcf85053a Content-Language: en-US To: Carlos Menin , linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Cc: Alessandro Zummo , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jean Delvare , Sergio Prado References: <20231103125106.78220-1-menin@carlosaurelio.net> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+Ap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iPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAlVcpi8FCRmg08MACgkQyx8mb86fmYHNRQ/+ J0OZsBYP4leJvQF8lx9zif+v4ZY/6C9tTcUv/KNAE5leyrD4IKbnV4PnbrVhjq861it/zRQW cFpWQszZyWRwNPWUUz7ejmm9lAwPbr8xWT4qMSA43VKQ7ZCeTQJ4TC8kjqtcbw41SjkjrcTG wF52zFO4bOWyovVAPncvV9eGA/vtnd3xEZXQiSt91kBSqK28yjxAqK/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20231103125106.78220-1-menin@carlosaurelio.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:09:36 -0700 (PDT) On 11/3/23 05:51, Carlos Menin wrote: > Add support for NXP's PCF85053A RTC chip. > > Signed-off-by: Carlos Menin > Reviewed-by: Sergio Prado > --- [ ... ] > +static int pcf85053a_bvl_to_mv(unsigned int bvl) > +{ > + long mv_table[] = { > + 1700, > + 1900, > + 2100, > + 2300, > + 2500, > + 2700, > + 2900, > + 3100, How are those numbers determined ? The datasheet gives voltage ranges. I'd have assumed that the center of those ranges is chosen, but for the most part it is the maximum, except for 2900 which is a bit above center and 3100 for "> 3.0V". Not that I care too much, but it seems to me that using the center voltage for each range would be more consistent. > +static int pcf85053a_hwmon_register(struct device *dev, const char *name) > +{ > + struct pcf85053a *pcf85053a = dev_get_drvdata(dev); > + struct device *hwmon_dev; > + > + hwmon_dev = devm_hwmon_device_register_with_info(dev, name, pcf85053a, > + &pcf85053a_hwmon_chip_info, > + 0); This won't compile if CONFIG_HWMON=n or if CONFIG_RTC_DRV_PCF85053A=y and CONFIG_HWMON=m. Guenter