Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2916106rdb; Wed, 15 Nov 2023 14:46:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWkmXC+rSxszPCP+gaztp9ITUif3viV5szjzoHg9h6O/wsiW3FdIa2wUKhAmrBCuMZvu03 X-Received: by 2002:a05:6808:178a:b0:3a9:6400:62c6 with SMTP id bg10-20020a056808178a00b003a9640062c6mr19507012oib.32.1700088382286; Wed, 15 Nov 2023 14:46:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700088382; cv=none; d=google.com; s=arc-20160816; b=EGYaDS3BBfl9K2kfqF1noDhMl5Nnb8E9P/pPOIYE6WPHGAWfbR3ty2l8Qp7XFU0GJ/ R0eZFMvbygw/sL8Y0ApZsH74fw62J4KgOh94kPBtU1iWo8bonvEoGH8L6iNtzEn0o8IU hOS4S60x5i8pU7vq0Krr3okt4nY/mehGjsbSi8lFTb5ZbRTzIRPV5ML0pEq3z+8iTAaa gVRmxICI76Njf6UV9DIp50SxgZqPq+bZh+nDVYKwioknCWAsgRtGkjD5QBDkHuPrs+Hi hISpoXFDZtGf1wRElr49/p0L04ywcrWG7S2rNqZPdGKdrSud+OZscX+vEyU6Upo+RRVj jAfg== 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:sender:dkim-signature; bh=8GRR5+TtT69P//O5Q8RWJy3CDQOAIoE5wweaPetEfz0=; fh=wE1OaXH61fMmnkFqUJQC9cdnc5bf0fwhy/7X+YPbBmk=; b=oE6viyzsha6h3dERnsncAsp6TGRWqU/MeQY/zqqPOfZboL70Su16GTAt7TSqIZf3Lc GPdphPWscry6bhD/9fBqOex2/Ko555+UKS1l3esqYrnY6GHbz4VUOnd6reEC0mR64EiK EdJc2lIXBtRIcfAl7UcXqG04JcWCI+HfLlNgVpEF/HEFRjCLbytE9lNd45XCJ7MXhBNG Uhd0GRcUkx2rgF872ZmtQcpyHNASqd1bR5lBcIf5qgn3aC0XHJEDLBrth8rx5YFz5RbU h/LO2/zo2H6yE0YeMikONPsXDoSvUNzKFC4IgiWpna0j2ppTzH393c9PWi0B4xMpSPEU EJAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mHyjgMg6; 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 j1-20020a634a41000000b005bd039e5a04si2299389pgl.622.2023.11.15.14.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 14:46:22 -0800 (PST) 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=mHyjgMg6; 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 AE2DB80ECF3D; Wed, 15 Nov 2023 14:46:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343665AbjKOWqL (ORCPT + 99 others); Wed, 15 Nov 2023 17:46:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbjKOWqJ (ORCPT ); Wed, 15 Nov 2023 17:46:09 -0500 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BC571AC; Wed, 15 Nov 2023 14:46:06 -0800 (PST) Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3b6d88dbaa3so112319b6e.1; Wed, 15 Nov 2023 14:46:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700088365; x=1700693165; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=8GRR5+TtT69P//O5Q8RWJy3CDQOAIoE5wweaPetEfz0=; b=mHyjgMg6IcYpAyRsjaTqNK9TCLsL6h4DV133+xiuitD7tMXeDbhRs2Lb/G/REwGeaI y236aeXyENdDf9hUe2jehkUPRsmhcSFYKgh6g+8KLWEYBQXBuoQWc9Wf7O1HOqSw0Nu+ xIUd4PCmsWawPI8yOjZzF/llfTHmt1+vAtABBDKWF/3K7PocYLmzZIPNvkEF8evw8kf1 ipsGP7d51iAq2dFoU4ZvN9ceshOd3vzCo5r0nDCXvHRZrEMVN97K3MSeEamBPocNXWto YUojP1Y328nmvPoa0Hr2JM0pqWSPsKc9I5puKm1nQyio+GN4hx41ovYv4QMOtZwYNqnH j25w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700088365; x=1700693165; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8GRR5+TtT69P//O5Q8RWJy3CDQOAIoE5wweaPetEfz0=; b=D7prfZFQTZ6bbDmU0wNamF9LTrUicfQd/EdNusNEsE72s63byRxifxVu8trV6YIQPE wRAKSxoIFYERKowrD9AGdDbUScHnyuA1R+LCIxjfFFM2yV9kU3BeeQ102gALDD/p+067 ru/qr67ZBgPWsfSWUIxZLkSCRxMuY0TkiHdpOk37JoZ34O+aOQAxfXDQXZMcW1kmkA+k CaeKbZDlZs1xOjm6XLCcv/AIcnrF2KzwTYTa1R0RWK2HknA5LxSo43ruFOwYhsi5oaDx MmeM7SaW6dmsSpSDqRKEdP1CS8tk3haInzZTavTaT9XVIdPvdkffDFtWo6LgsRmdM1BJ Ii3g== X-Gm-Message-State: AOJu0YwrhY4CtRbSwFWieebmNUJC1yGgrjpp1ZmQ7SV6VRE29UsejrVG EzD1FqcuYD2Py5kqN3tt+7Tt+qz5WdY= X-Received: by 2002:a54:4389:0:b0:3b5:9541:cb43 with SMTP id u9-20020a544389000000b003b59541cb43mr15234608oiv.14.1700088365661; Wed, 15 Nov 2023 14:46:05 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id h1-20020a056808014100b003ae0e57874fsm1626254oie.21.2023.11.15.14.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 14:46:05 -0800 (PST) Sender: Guenter Roeck Date: Wed, 15 Nov 2023 14:46:03 -0800 From: Guenter Roeck To: Delphine_CC_Chiu/WYHQ/Wiwynn Cc: "patrick@stwcx.xyz" , Jean Delvare , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "linux-i2c@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" Subject: Re: [PATCH v2 2/2] hwmon: pmbus: Add ltc4286 driver Message-ID: References: <20231026081514.3610343-1-Delphine_CC_Chiu@Wiwynn.com> <20231026081514.3610343-3-Delphine_CC_Chiu@Wiwynn.com> <2ef2e804-d498-a2ae-9717-dd03bfd26853@roeck-us.net> <4b73a239-c90e-4515-b89d-65de15a1e9a9@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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_BLOCKED,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]); Wed, 15 Nov 2023 14:46:18 -0800 (PST) On Wed, Nov 15, 2023 at 08:42:22AM +0000, Delphine_CC_Chiu/WYHQ/Wiwynn wrote: > > -----Original Message----- > > From: Guenter Roeck On Behalf Of Guenter Roeck > > Sent: Tuesday, November 7, 2023 11:30 AM > > To: Delphine_CC_Chiu/WYHQ/Wiwynn ; > > patrick@stwcx.xyz; Jean Delvare ; Jonathan Corbet > > > > Cc: Rob Herring ; Krzysztof Kozlowski > > ; Conor Dooley ; > > linux-i2c@vger.kernel.org; linux-hwmon@vger.kernel.org; > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; > > linux-doc@vger.kernel.org > > Subject: Re: [PATCH v2 2/2] hwmon: pmbus: Add ltc4286 driver > > > > Security Reminder: Please be aware that this email is sent by an external > > sender. > > > > On 11/6/23 19:08, Delphine_CC_Chiu/WYHQ/Wiwynn wrote: > > >> -----Original Message----- > > >> From: Guenter Roeck On Behalf Of Guenter Roeck > > >> Sent: Tuesday, October 31, 2023 9:47 PM > > >> To: Delphine_CC_Chiu/WYHQ/Wiwynn ; > > >> patrick@stwcx.xyz; Jean Delvare ; Jonathan Corbet > > >> > > >> Cc: Rob Herring ; Krzysztof Kozlowski > > >> ; Conor Dooley > > >> ; linux-i2c@vger.kernel.org; > > >> linux-hwmon@vger.kernel.org; devicetree@vger.kernel.org; > > >> linux-kernel@vger.kernel.org; linux-doc@vger.kernel.org > > >> Subject: Re: [PATCH v2 2/2] hwmon: pmbus: Add ltc4286 driver > > >> > > >> Security Reminder: Please be aware that this email is sent by an > > >> external sender. > > >> > > >> On 10/30/23 23:46, Delphine_CC_Chiu/WYHQ/Wiwynn wrote: > > >> [ ... ] > > >>>> > > >>>>> + > > >>>>> + ret = of_property_read_u32(client->dev.of_node, > > >>>>> + "shunt-resistor-micro-ohms", > > >>>> &rsense); > > >>>>> + if (ret < 0) > > >>>>> + return ret; > > >>>>> + > > >>>>> + if (rsense == 0) > > >>>>> + return -EINVAL; > > >>>>> + > > >>>>> + info = <c4286_info; > > >>>>> + > > >>>>> + /* Default of VRANGE_SELECT = 1, 102.4V */ > > >>>>> + if (device_property_read_bool(&client->dev, > > >>>> "adi,vrange-select-25p6")) { > > >>>> > > >>>> What if the adi,vrange-select-25p6 property is not provided, but > > >>>> the chip is programmed for this range ? > > >>> The binding document tells programmers how to fill the dts. > > >>> Thus, programmers must fill this property if their system is 25.6 > > >>> volts voltage > > >> range. > > >>> > > >> > > >> Sure, but there is no else case, meaning VRANGE_SELECT is unmodified > > >> in that case. There is no guarantee that the chip is in its power-on state. > > > > > > The else case is in v2 ltc4286.c line 133 It means that the voltage > > > range for programmer is 102.4 volts which is default value, so driver > > > doesn't need to do any change for VRANGE_SELECT bit. > > > > There is no guarantee that the value wasn't changed before the driver was > > loaded. > > We still can’t get your point. > Could you tell us about your concern here? I have repeated it several times. You are making assumptions about register values when the driver is loaded. Those asumptions are wrong since the state of the chip is unknown when the driver is loaded. Any entty (BIOS, ROMMON, i2cset, some operating system loaded earlier, or even some other driver or platform code) may have changed those values. On top of that, as I also have pointed out, LTC4287 supports saving its configuration data in eeprom. That means that any chip configuration set during production or anytime later will be retained, meaning any assumption about chip configuration when the driver is loaded is even more wrong. Guenter