Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp841324pxb; Thu, 28 Jan 2021 01:16:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqFFRjcCJljFIZPY+bjl2k1q8rEaCKg6wAA5xEVRxJMxaLGLjVjk9ZyhYBugMpuulbOvwT X-Received: by 2002:a17:906:dfda:: with SMTP id jt26mr9924861ejc.240.1611825405831; Thu, 28 Jan 2021 01:16:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611825405; cv=none; d=google.com; s=arc-20160816; b=crMfCxzZ/fL8pUqgQDs96KwEP3GsDxyuKyo8XobVM8/RUS8M6zraXKGqyrwanI+jB5 pJD/I9nuqjhnVtKRS77cjjx0w6EE/Sx894jB4xYE5NJH1bzh9Sls4L2GCo3W0RVSzEN6 L7Y3lARjxSGqNZqq4egUrSClOLmiJSJ6TJ+xHNnaUsHuK+T7ZuaoaDYzL1z0NEeLssI3 oXN7qk1YFzzNpdXrRUJIUkoclC2lhBeJ0CSlw4IJcGJ6Zga6QK4lusciJfiTLnArU3Co PzrTvAtancgfjNS0TfrQcoJGO9RLUeWN+8ldELajW6hUUhPFb+VO+c1Z8+VBNO4Yx7No vjHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3lOufDwmmiXk5gQyimZc5HMGr9hqMJo6+Zy8Zr2WQW4=; b=qH3lJ5nXeoMb/i8ZGoONGj/PWzB+OdXeDMQz8TmqXpMdJoldIKXYjha24Urhw55C6M RHEAwx4u4C+2MjWMN6EBPzji/N192FvBd5lbXamSgZLNUb6equwtVXYJHSnbpjj3HXdD sUaWVXR8i9jywxG2dJ5qG7PuRg5kL5j0Sfr1OdfNBPMe5bLnfMiflBh6HrqaZskoWIWq hCLaTcIWNcrI9A71RE4lEcObOImvhx8k/OZOvumiF8cJuNMUf04JD9xj+B1uoj26TgJ3 7gntqGa6jA2hHFdrl7mpZbXGU4MtD8q6ikBLZA0aciJhdgpNZsovjlwk9d5uS4dHyrQ+ BuOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MoUJRBgp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si2163162ejx.608.2021.01.28.01.16.21; Thu, 28 Jan 2021 01:16:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MoUJRBgp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231980AbhA1JP3 (ORCPT + 99 others); Thu, 28 Jan 2021 04:15:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:50620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231845AbhA1JMn (ORCPT ); Thu, 28 Jan 2021 04:12:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C89D664DE2; Thu, 28 Jan 2021 09:12:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611825121; bh=V0gFBUmlQ3mUq1LhdKTMEyJZFGxdd6qNoJjRUhrIJeU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MoUJRBgpNYBrcHaoC9XIwU8/GZtvNJcr+Xut3aR8CHSxuojiwW+h3GZo76jopEyDk Y9Wwupg72Rdx7Jyq20vI/E5luNttcZamdbZwozRJtBQP2sa0NbvtZfRVXY7VLUpooa XP699CHI6Zh03olf/65nceNmyjgi3PkTj7feoRh8= Date: Thu, 28 Jan 2021 10:11:57 +0100 From: Greg Kroah-Hartman To: Bartosz Golaszewski Cc: Jenny Ho , Arnd Bergmann , linux-i2c , LKML Subject: Re: [PATCH] eeprom: at24: Add permission to write_timeout Message-ID: References: <20210128081030.2345998-1-hsiufangho@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 10:04:42AM +0100, Bartosz Golaszewski wrote: > On Thu, Jan 28, 2021 at 9:10 AM Jenny Ho wrote: > > > > Need to change timeout time for different use > > cases to prevent I2C error cases. Open the api > > and allow Read/Write permission to write_timeout > > > > Signed-off-by: Jenny Ho > > --- > > drivers/misc/eeprom/at24.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c > > index 926408b41270..39caead4058c 100644 > > --- a/drivers/misc/eeprom/at24.c > > +++ b/drivers/misc/eeprom/at24.c > > @@ -117,7 +117,7 @@ MODULE_PARM_DESC(at24_io_limit, "Maximum bytes per I/O (default 128)"); > > * it's important to recover from write timeouts. > > */ > > static unsigned int at24_write_timeout = 25; > > -module_param_named(write_timeout, at24_write_timeout, uint, 0); > > +module_param_named(write_timeout, at24_write_timeout, uint, 0600); > > MODULE_PARM_DESC(at24_write_timeout, "Time (in ms) to try writes (default 25)"); > > > > struct at24_chip_data { > > -- > > 2.30.0.280.ga3ce27912f-goog > > > > IMO this should be a per-chip device property and not a global module > param. Any chance you could maybe try and extend the driver with a new > property for that? This already is a global module parameter :) But I agree, having it per-device would be much better, a sysfs attribute would easily work for that. thanks, greg k-h