Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2309690rwa; Mon, 22 Aug 2022 05:53:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4fkFerMbgxddXwEumyykOVqIztKsL0PPOZuVN53ekmXL1hYYinQlNtgEZ5Y0BwxshJ77WJ X-Received: by 2002:a05:6a00:b4e:b0:52f:59dc:70 with SMTP id p14-20020a056a000b4e00b0052f59dc0070mr20876789pfo.2.1661172798207; Mon, 22 Aug 2022 05:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661172798; cv=none; d=google.com; s=arc-20160816; b=gY9JMTZOcpyDfq2tEC1d/rNJjzLHLDkpJYwq7PH9G+XAwWspAGNfWu/OVxpMqP+K9F ML7l8mWSGx0pUp4Jc+PV2AI5WyLfLCkygxlTvIpWF25m8CA5ZmCQ56D1JP3UY738xTlj amprCwrupqbCR2Zovw+i9dG6GbFuCEtkuqjcGtf1pmP28MSXj/ohUoe1gx/1ZdNOfp5F WNlwP6yB08NR0iC2do9FppZP1h/SJVA25eX0lz/QpktWj5zM/2lN7lOuinmS0ZtgvtcO yLefXmY2Sh5sgpmjgeGMZ3iG426jJB+KV3Nli4AiEthSrdocFeX/I1JWFkvKXwoBK1z4 BS+Q== 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 :references:cc:to:content-language:user-agent:mime-version:date :message-id:subject:dkim-signature; bh=e3JlxpdhiD9UYCrKvjGxLM7DfMY6XOiLi0Am25BRKKM=; b=FgldHUvUs+RW9HCi22JtYwCU3y6b6f0gsP5GYaMqX4H5pZCRpR6TSRs+6T0TLDtGEO MirEiD9n5JXIIG4HVMw6Xdy/wFamTATiP9MgeveVGHFwJljg/kQFPnitJOWV9Rlk+bCM ZcGyTG8StiWTvNbEBQPvU7jpJHb2sBGrZ8WF+xHs9Us/+cVatDUOqzlgv+awx7X1FrX1 KlkYy1h3l0JcgkCdUNsLoMa0XCqlZWl7FAoAf5k0n9Km+WxyqMAhqO2pOGFDkWaAfeIq 0vuQ87ANQs6G5y+QuTlgoRVIxjQZRlvgXdw4rw1OobLkG8AlvWdUq620ui8OU8gUJLbo XzUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=g9MGVxQ3; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20-20020a17090aaa1400b001f534082156si11779305pjq.183.2022.08.22.05.53.06; Mon, 22 Aug 2022 05:53:18 -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=@amazon.com header.s=amazon201209 header.b=g9MGVxQ3; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234722AbiHVMhw (ORCPT + 99 others); Mon, 22 Aug 2022 08:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230503AbiHVMht (ORCPT ); Mon, 22 Aug 2022 08:37:49 -0400 Received: from smtp-fw-80007.amazon.com (smtp-fw-80007.amazon.com [99.78.197.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C31D432EC4; Mon, 22 Aug 2022 05:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1661171869; x=1692707869; h=message-id:date:mime-version:to:cc:references:from: in-reply-to:content-transfer-encoding:subject; bh=e3JlxpdhiD9UYCrKvjGxLM7DfMY6XOiLi0Am25BRKKM=; b=g9MGVxQ35MxG8BfOdm6Wy0iROMoRFqPcr9i6cW9AXiUDL/3eO9Pn4TAs EF9cV/NmYRkb0SFpYYxOEhVIbr0SX4OroP9oKs7goUOWZ633uBxrmrGII 78/l85xz6JcWn20ZPZAq+7phfKOwqvJFEQd1wrvQzXXrCuffd0YAN6VgD w=; X-IronPort-AV: E=Sophos;i="5.93,254,1654560000"; d="scan'208";a="122087194" Subject: Re: [PATCH v2 06/16] hwmon: (mr75203) fix multi-channel voltage reading Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-pdx-2c-388992e0.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 12:37:28 +0000 Received: from EX13MTAUEB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2c-388992e0.us-west-2.amazon.com (Postfix) with ESMTPS id 40D0EE04FA; Mon, 22 Aug 2022 12:37:27 +0000 (UTC) Received: from EX13D08UEB003.ant.amazon.com (10.43.60.11) by EX13MTAUEB001.ant.amazon.com (10.43.60.96) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 22 Aug 2022 12:37:25 +0000 Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D08UEB003.ant.amazon.com (10.43.60.11) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 22 Aug 2022 12:37:24 +0000 Received: from [10.220.236.67] (10.220.236.67) by mail-relay.amazon.com (10.43.60.234) with Microsoft SMTP Server id 15.0.1497.38 via Frontend Transport; Mon, 22 Aug 2022 12:37:21 +0000 Message-ID: Date: Mon, 22 Aug 2022 15:37:20 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Content-Language: en-US To: Guenter Roeck CC: , , , , , , , , , , , , , , , , , , "Farber, Eliav" References: <20220817054321.6519-1-farbere@amazon.com> <20220817054321.6519-7-farbere@amazon.com> <20220818200350.GA3287916@roeck-us.net> From: "Farber, Eliav" In-Reply-To: <20220818200350.GA3287916@roeck-us.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_SPF_WL autolearn=ham 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 8/18/2022 11:03 PM, Guenter Roeck wrote: > On Wed, Aug 17, 2022 at 05:43:11AM +0000, Eliav Farber wrote: >> - Fix voltage reading to support number of channels in VM IP (CH_NUM). >> - Configure the ip-polling register to enable polling for all channels. >> > > That fails to explain what is actually wrong in the current code. > Also, one fix per patch, please. I moved the configuration of the ip-polling register to a separate patch. The problem in the current code is that it allocates in_config according to the total number of voltage monitors and not according to the total number of channels in all voltage monitors. Therefore it didn’t create enough sysfs to read all inputs. Also pvr_read_in() only tries to access the first channel in each voltage monitor. I will add this explanation to next version. -- Thanks, Eliav