Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp779168rdh; Thu, 26 Oct 2023 16:02:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgd7C6kinUvCcrW/Y1549dmUtWn8dJcJWdAK6IFFoER5KDhldPWLJXcFLMfVD+sZVlIE0R X-Received: by 2002:a81:ad1a:0:b0:5ae:dff7:6159 with SMTP id l26-20020a81ad1a000000b005aedff76159mr1103624ywh.18.1698361350046; Thu, 26 Oct 2023 16:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698361350; cv=none; d=google.com; s=arc-20160816; b=uzo3No3qLTpmcJ6Wt4m5GeKvA9uUv65rm3N2bpeyO84NKxhrQPXTO/jJN9OBsnZk3e V+8+pWaa06aRY72av8z9zHWJ/cjSXHBrLAQMkgTXXE44XcTzO2dr0zUm6ecYjtDO3Xtt OXgGpldzL/pLElm3Dq6uM/V27k/zWIZIz9ghi6eaDTjbxwMSKqgycegJcQKf+7+Zdot3 deI07uppL6OjeITr8fu/+EN3wkuAK3hSwTBUxQJtpPQrFLK8U742rx6alOoVhn0RCh1B B03ELlaXs63WDTZAYn+Z3Q8E7b0VbQIINOlgjX87d2Lm4vGR9E2UPt/x/2J9Jqtvs/QP nIVg== 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:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=8VMHg2dbZC6m4HFrqo+Py57nY4d2BX9cNIAaKURpnOA=; fh=8JqkARERDoU2YVoNF1uSqMhXgZyABC4BWBrUko4CDaU=; b=VvTPnvYqvLc73Ly5czcuVhSEi4YDrRoo+ZJijX4evOaTGW1ZddYm5PoWyhXDCdZrIu VtlhVwFyAOYSDv9P1jj1s2athulkjY8+STa/BtRlbY2r2//+agj6UUcy1UUR10K21Win OGSp/QvbGZQU2upqu692Ed199+7rHDOdPhOVYQsnMNAcGzamLDCGTc8DoTFuiTV4eq10 otRq3bD5x1hQsoRx/zZk0aERaf8DpSc4CB0cSAF8reYzua/DmX/V1IF9zfMzqm4hWacz Hl4PR/r0/uk/7TVarrGre/oJjgc+SAOI7TSqs2L7OyZCMwc2fZXUQKJM2UA88c+NDgNU gHyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TE6WTpr4; 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 s13-20020a81bf4d000000b005861659568csi521820ywk.180.2023.10.26.16.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 16:02:30 -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=TE6WTpr4; 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 7719B827005B; Thu, 26 Oct 2023 16:02:28 -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 S231977AbjJZXC0 (ORCPT + 99 others); Thu, 26 Oct 2023 19:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229668AbjJZXCZ (ORCPT ); Thu, 26 Oct 2023 19:02:25 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B63F128; Thu, 26 Oct 2023 16:02:23 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6b36e1fcea0so1376730b3a.1; Thu, 26 Oct 2023 16:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698361342; x=1698966142; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to: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=8VMHg2dbZC6m4HFrqo+Py57nY4d2BX9cNIAaKURpnOA=; b=TE6WTpr4FLsQZPu3fP9j9RLmQyoqrznPBAP6l58kDkhk1NaifE4PkfgdpqZnEhqRmh g+ePj969IJNUFUmMITst8WUdQFDFsJkHMv5Zw7CAo3VHrRSropQmjYEmJaC/dqTa7xn4 PjXkY3IfC8sV27McR6/EgR4y72/d8cpr7CiX09L0WgLqpl8LZKp+pd4TbSol6lauzMpK LArt75mEb9KxA/2Sxojv8C2+4cihNfpuKSZaW1IS6DQcdu0oJdbbhsZ/aH1/HwKmSkUM J+0dWm45dc+YHMaBgGyDarbPmFt5+A0gqiQYtHS/HPoGs3bn7qm/oWu5DVfZwzGuK4Jr moog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698361342; x=1698966142; h=content-transfer-encoding:in-reply-to: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=8VMHg2dbZC6m4HFrqo+Py57nY4d2BX9cNIAaKURpnOA=; b=FDw8uDnVx7IG3cSwpaHjqLbRnSWUc2xmQJIL+gAnur5uMVuSHwiWV8xK/O8zBHNDQ1 uCV8HUxgsYvrRNvizbP0qFtLF8Ubyg0S/CwkHi8r/r28QKUETxIFWLetl2amhy6edfUX FzbuDhZuRA7Ef0XVx89UebgWajLa00Mbl0idRvcTWxVktBBkd7GQWourPDWQeNQ3odyj 84TyWRZk8PT/lTzQldnZVfbj1lbamRFk77d+jm7guNHZNJ74g24kbA7h4M45rgYw7OO7 hsAX4Ox21qPW9kYExE5oK5yPJkjMjTYFQAsz8a0RqVdexynZ60XJQJ5jX4Zrld9/Laa0 l7UQ== X-Gm-Message-State: AOJu0Yw/vCeh3+69alypafa6blWTWLD64XKhLfHRKIwJXmzmdz2C5CfK clZxJXhGLZ6x1mwAPsFEVN4= X-Received: by 2002:a05:6a20:728f:b0:135:1af6:9a01 with SMTP id o15-20020a056a20728f00b001351af69a01mr1546913pzk.8.1698361342523; Thu, 26 Oct 2023 16:02:22 -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 k19-20020aa79733000000b006be2927ca7esm118854pfg.85.2023.10.26.16.02.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Oct 2023 16:02:21 -0700 (PDT) Sender: Guenter Roeck Message-ID: <0bd4fede-2d11-c781-98af-5a27ba454346@roeck-us.net> Date: Thu, 26 Oct 2023 16:02:20 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v4] hwmon: (pmbus/max31785) Add delay between bus accesses Content-Language: en-US To: Lakshmi Yadlapati , joel@jms.id.au, andrew@aj.id.au, eajames@linux.ibm.com, ninad@linux.ibm.com, jdelvare@suse.com Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231026221708.1582518-1-lakshmiy@us.ibm.com> From: Guenter Roeck In-Reply-To: <20231026221708.1582518-1-lakshmiy@us.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 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, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 16:02:28 -0700 (PDT) On 10/26/23 15:17, Lakshmi Yadlapati wrote: > The MAX31785 has shown erratic behaviour across multiple system > designs, unexpectedly clock stretching and NAKing transactions. > > Experimentation shows that this seems to be triggered by a register access > directly back to back with a previous register write. Experimentation also > shows that inserting a small delay after register writes makes the issue go > away. > > Use a similar solution to what the max15301 driver does to solve the same > problem. Create a custom set of bus read and write functions that make sure > that the delay is added. > > Signed-off-by: Lakshmi Yadlapati > --- > V3 -> V4: Fixed warnings realted to this commit I also asked about the use of udelay() instead of usleep_range() or fsleep(). I see you did not change the code. Fine, but please explain why the use of udelay() instead of the alternative is desirable or needed here, and don't just ignore review feedback. Thanks, Guenter