From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7561BC43441 for ; Wed, 28 Nov 2018 21:55:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F71320863 for ; Wed, 28 Nov 2018 21:55:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F71320863 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=the-dreams.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbeK2I6F (ORCPT ); Thu, 29 Nov 2018 03:58:05 -0500 Received: from sauhun.de ([88.99.104.3]:41712 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbeK2I6F (ORCPT ); Thu, 29 Nov 2018 03:58:05 -0500 Received: from localhost (pd95c76c9.dip0.t-ipconnect.de [217.92.118.201]) by pokefinder.org (Postfix) with ESMTPSA id AF20B2E354A; Wed, 28 Nov 2018 22:54:59 +0100 (CET) Date: Wed, 28 Nov 2018 22:54:59 +0100 From: Wolfram Sang To: Jae Hyun Yoo Cc: Brendan Higgins , Rob Herring , Joel Stanley , Benjamin Herrenschmidt , Mark Rutland , Andrew Jeffery , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, Jarkko Nikula , James Feist , Vernon Mauery Subject: Re: [PATCH i2c-next v9 1/5] dt-bindings: i2c: Add 'bus-timeout-ms' and '#retries' properties as common optional Message-ID: <20181128215458.GB1666@kunai> References: <20181030210917.32711-1-jae.hyun.yoo@linux.intel.com> <20181030210917.32711-2-jae.hyun.yoo@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181030210917.32711-2-jae.hyun.yoo@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 30, 2018 at 02:09:12PM -0700, Jae Hyun Yoo wrote: > This commit adds 'bus-timeout-ms' and '#retries' properties as > common optional properties that can be used for setting 'timeout' > and 'retries' values of 'struct i2c_adapter'. With this patch, the > bus timeout value and the master transfer retries count can be set > through these properties at the registration time of an adapter. > Still the values can be set by I2C_TIMEOUT and I2C_RETRIES ioctls > on cdev at runtime too. > > These properties may not be supported by all drivers. However, if > a driver wants to support one of them, it should adapt the > bindings in this document. > > Signed-off-by: Jae Hyun Yoo > Reviewed-by: Rob Herring Definately NACK on the #retries part. This is purely a configuration thing. Besides that it is kind of ancient cruft, too. I don't recommend it, at all. On the timeout thing, I am still not fully convinced that this is a HW description. I said that before. But maybe I need to understand your problem case better. > --- > Documentation/devicetree/bindings/i2c/i2c.txt | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt > index 11263982470e..bdead91f82a4 100644 > --- a/Documentation/devicetree/bindings/i2c/i2c.txt > +++ b/Documentation/devicetree/bindings/i2c/i2c.txt > @@ -80,6 +80,12 @@ wants to support one of the below features, it should adapt the bindings below. > Names of map programmable addresses. > It can contain any map needing another address than default one. > > +- bus-timeout-ms > + Bus timeout in milliseconds. > + > +- #retries > + Number of retries for master transfer. > + > Binding may contain optional "interrupts" property, describing interrupts > used by the device. I2C core will assign "irq" interrupt (or the very first > interrupt if not using interrupt names) as primary interrupt for the slave. > -- > 2.19.1 >