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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,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 C1A39C433DB for ; Thu, 28 Jan 2021 09:15:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7111F64DD6 for ; Thu, 28 Jan 2021 09:15:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbhA1JPX (ORCPT ); Thu, 28 Jan 2021 04:15:23 -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-i2c@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