Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2143844rdb; Mon, 9 Oct 2023 14:17:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGMayuoPRpf36K7iR7ylxMvBKVDPraDvtlioDGFgU4jdGijrTkWGS75CfjrJaAdkjaooVK X-Received: by 2002:a17:90b:398:b0:26d:1eec:1fc4 with SMTP id ga24-20020a17090b039800b0026d1eec1fc4mr13452792pjb.19.1696886238832; Mon, 09 Oct 2023 14:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696886238; cv=none; d=google.com; s=arc-20160816; b=l/4lBClVc28e45i6HWMaO175cdIsKWv8aqj1lTVOvjfkezpnGL+aLSiPhc1pv5IxV3 cXg5+T+r4iOcOWyI1ktVPZx/TG3eLmHoTqdRvP49K2kW0diq8FT+0gkP8aZLLK9cZeAQ d+1lI3ElRgwUhsxMOu6nNEgiPnQ6hR92KfTCppivYkuQKyErlEFzlzLlrBkTFrBBb7a2 dTfC8kFveVJJfUtnx9YyPy8JRMw6sx3SVEiV2+q0pdV/3z8y7ek8b9jQ4MoCZm42Uyqz nc4dfajxNPU2iZwvZelOxwr6BOHe0zjATn9GcBw4pBAK8KEKKn/2Zj/UWz5XFuLOXhhj Lucg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=5+pEpy1esTDnBoJJaotd858xWP0rcc3/1x8ExWl1X/w=; fh=Q+QwZIjHVBI6KB+rjKuagZ5f+61G3WUA3tiqFNJgx/w=; b=a/jPnJqbyFAugtRlTQBaD46MypjRktHBogfGAxOXeVIUOJUaFbc432MpbiD+dSJE5B EJxVHdp7L406iYcEoDUkAP/wWkMAZUjWog+6vyXmElRwgQM3c9PB8WGcuFmg144x10h6 Tga3n/MAodlqLVyO8VhefrOuCaiWt03Ci4meEtUiC5AmAgKYjb98tZdG8/wnLldEPA+O Gse4KCx/POflxWiDjgu6MqmUenGvsSFBMzFznqd+ZbvXEGLkhkd8hDIdNQ87LGMK5jLm Xi9s+Tu950KAWTbKIAuv7xXHT2jUkXdMBPF/GDN4hxtQeT8WGtKanS8of2zS+2LAlMuK BmeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aAkjifx1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id y1-20020a17090a1f4100b0026b698fdda6si11897340pjy.98.2023.10.09.14.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aAkjifx1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6D44C8119D08; Mon, 9 Oct 2023 14:17:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378629AbjJIVQt (ORCPT + 99 others); Mon, 9 Oct 2023 17:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234628AbjJIVQc (ORCPT ); Mon, 9 Oct 2023 17:16:32 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 772601FE3; Mon, 9 Oct 2023 14:15:20 -0700 (PDT) Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 399KvgKm027830; Mon, 9 Oct 2023 21:14:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=5+pEpy1esTDnBoJJaotd858xWP0rcc3/1x8ExWl1X/w=; b=aAkjifx18vMBFOfqGka7ZkkT/38XyxJambLZsm+jb8GFCKRNUmImRcv9175E3O4Y+BkW R4B1W1CvX2isPslj7R5TQCPA0cEcnr4TFj+TgEaVVvtawF2oPbXV5Vt3nouu4Wg7v3SG Vp2GN1CR2gvH5nbNJwxja3tSH7UlEebGFb65UJqiL0FkhIzsTQzst9KzK1XrQD4mZ9oh HE7vYXsDcC5XNI5SZ+d5Qtkh0mPt3pMTE1KTssHyIYYnTJdXCKpbYFHLNGkooKD2MyT5 +oyzCDAOcU5LsJAoNSoVPjLWiBCK4xlKzW18p4488ft6DB30hBC7T8QEkQNrCzBkqnJE +w== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tms0srum4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Oct 2023 21:14:52 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 399IrmXU023094; Mon, 9 Oct 2023 21:14:51 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3tkmc1b963-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Oct 2023 21:14:51 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 399LEndU17564408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Oct 2023 21:14:50 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1B0458058; Mon, 9 Oct 2023 21:14:49 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BF5C958057; Mon, 9 Oct 2023 21:14:49 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTPS; Mon, 9 Oct 2023 21:14:49 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id 6707B740051; Mon, 9 Oct 2023 16:14:49 -0500 (CDT) From: Lakshmi Yadlapati To: linux@roeck-us.net, wsa@kernel.org, sumit.semwal@linaro.org, christian.koenig@amd.com, jdelvare@suse.com, joel@jms.id.au, andrew@aj.id.au, eajames@linux.ibm.com, ninad@linux.ibm.com Cc: Lakshmi Yadlapati , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-hwmon@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v1 0/2] [PATCH] hwmon: (pmbus/max31785) Add minimum delay between bus accesses Date: Mon, 9 Oct 2023 16:14:18 -0500 Message-Id: <20231009211420.3454026-1-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.39.2 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Y8ap5htUORrYlfEhm753yyHqf-pZGJfr X-Proofpoint-GUID: Y8ap5htUORrYlfEhm753yyHqf-pZGJfr Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-09_19,2023-10-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 priorityscore=1501 lowpriorityscore=0 adultscore=0 malwarescore=0 mlxlogscore=709 mlxscore=0 suspectscore=0 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310090169 X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:17:16 -0700 (PDT) X-Spam-Level: ** Reintroduce per-client throttling of transfers for improved compatibility. Some devices have experienced issues with small command turn-around times when using in-kernel device drivers. While a previous proposal was rejected due to concerns about error-prone open-coding of delays, recent upstream changes for similar problems in I2C devices (e.g., max15301 and ucd90320) and now max31785 make it sensible to reintroduce Andrew's generic solution. This change aims to improve compatibility for affected devices and may help avoid duplicating implementations of handlers for I2C and PMBus calls in driver code. Reference to Andrew's previous proposal: https://lore.kernel.org/all/20200914122811.3295678-1-andrew@aj.id.au/ Lakshmi Yadlapati (2): i2c: smbus: Allow throttling of transfers to client devices hwmon: (pmbus/max31785) Add minimum delay between bus accesses drivers/hwmon/pmbus/max31785.c | 8 ++ drivers/i2c/i2c-core-base.c | 8 +- drivers/i2c/i2c-core-smbus.c | 143 ++++++++++++++++++++++++++------- drivers/i2c/i2c-core.h | 23 ++++++ include/linux/i2c.h | 2 + 5 files changed, 153 insertions(+), 31 deletions(-) -- 2.39.2