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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS 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 1EB15C43382 for ; Thu, 27 Sep 2018 21:36:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6EDB215F0 for ; Thu, 27 Sep 2018 21:36:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6EDB215F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 S1728523AbeI1D42 (ORCPT ); Thu, 27 Sep 2018 23:56:28 -0400 Received: from mga02.intel.com ([134.134.136.20]:2906 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728372AbeI1D42 (ORCPT ); Thu, 27 Sep 2018 23:56:28 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 14:36:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,312,1534834800"; d="scan'208";a="78009680" Received: from yoojae-mobl1.amr.corp.intel.com (HELO [10.7.153.151]) ([10.7.153.151]) by orsmga006.jf.intel.com with ESMTP; 27 Sep 2018 14:35:53 -0700 Subject: Re: [PATCH i2c-next v3 1/3] dt-bindings: i2c: aspeed: Add 'timeout' property as an optional property To: Rob Herring Cc: Brendan Higgins , Wolfram Sang , Benjamin Herrenschmidt , Joel Stanley , 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 References: <20180926215842.23125-1-jae.hyun.yoo@linux.intel.com> <20180926215842.23125-2-jae.hyun.yoo@linux.intel.com> <20180927205610.GA29022@bogus> From: Jae Hyun Yoo Message-ID: Date: Thu, 27 Sep 2018 14:35:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180927205610.GA29022@bogus> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 9/27/2018 1:56 PM, Rob Herring wrote: > On Wed, Sep 26, 2018 at 02:58:40PM -0700, Jae Hyun Yoo wrote: >> This commit adds 'aspeed,timeout' property as an optional property >> which can be used for setting 'timeout' value of >> 'struct i2c_adapter'. With this patch, the timeout value can be >> set through an I2C_TIMEOUT ioctl on cdev, or through this optional >> DT property. > > Isn't controlling this from userspace or relying on a default > sufficient? I can't see this needing to be highly tuned for each > platform. > It can be controlled using an ioctl command on an I2C cdev from userspace if CONFIG_I2C_CHARDEV is enabled. A couple of I2C drivers use their own specific default value for it but in general the common default value (1 second) which is set by i2c core is sufficient. But it still needs to be tuned for specific cases based on attached devices' characteristic, on packet length, on bus speed and on etc. Specifically in Aspeed I2C driver for BMC, it should be tuned to support multi-master use cases properly, and it needs a device tree property to apply this timeout value from the probing time of the module. > However, if we do have a property, it should be common. > Okay, I'll change it to 'timeout'. Thanks a lot, Jae From mboxrd@z Thu Jan 1 00:00:00 1970 From: jae.hyun.yoo@linux.intel.com (Jae Hyun Yoo) Date: Thu, 27 Sep 2018 14:35:52 -0700 Subject: [PATCH i2c-next v3 1/3] dt-bindings: i2c: aspeed: Add 'timeout' property as an optional property In-Reply-To: <20180927205610.GA29022@bogus> References: <20180926215842.23125-1-jae.hyun.yoo@linux.intel.com> <20180926215842.23125-2-jae.hyun.yoo@linux.intel.com> <20180927205610.GA29022@bogus> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Rob, On 9/27/2018 1:56 PM, Rob Herring wrote: > On Wed, Sep 26, 2018 at 02:58:40PM -0700, Jae Hyun Yoo wrote: >> This commit adds 'aspeed,timeout' property as an optional property >> which can be used for setting 'timeout' value of >> 'struct i2c_adapter'. With this patch, the timeout value can be >> set through an I2C_TIMEOUT ioctl on cdev, or through this optional >> DT property. > > Isn't controlling this from userspace or relying on a default > sufficient? I can't see this needing to be highly tuned for each > platform. > It can be controlled using an ioctl command on an I2C cdev from userspace if CONFIG_I2C_CHARDEV is enabled. A couple of I2C drivers use their own specific default value for it but in general the common default value (1 second) which is set by i2c core is sufficient. But it still needs to be tuned for specific cases based on attached devices' characteristic, on packet length, on bus speed and on etc. Specifically in Aspeed I2C driver for BMC, it should be tuned to support multi-master use cases properly, and it needs a device tree property to apply this timeout value from the probing time of the module. > However, if we do have a property, it should be common. > Okay, I'll change it to 'timeout'. Thanks a lot, Jae