Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp857081pxb; Thu, 28 Jan 2021 01:50:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwi6MOANiBCkXlHpolGc9Qi1VKe/OJiHd4686otoauDg0cOy8gVKQNZNaIU1CosjQxF5maR X-Received: by 2002:a17:906:15c7:: with SMTP id l7mr10379767ejd.226.1611827404729; Thu, 28 Jan 2021 01:50:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611827404; cv=none; d=google.com; s=arc-20160816; b=mh4wBtyvXvOhAv/mMtAoFCnUHM43gvlxTvUmvHSyWD7uvifh7EKGCwdUdcQfrz2g8Q 0b65+/sLNS606z14twrbNGokqvo09oYKZus7WgnoRlTOvB1WJNQHTM/jhI4+3DdOUGsc x1E2TznruhO4vDUVUf8LqZnZY0lJxEQ6JxRKON8WSj5aOVGKxFX0EFlkGgOi5+Wk3Q4/ coiI1VgkhXFdZw0BNima1hI5n+lpgkqpQ1KrQrQMDXsWH0aOlAjQ86gqn2PGSk4cvnxE 4ZqGeugcqQMWf3b5UDRwq1lxDik6zpNk6CYeKQXeCW/6jGKp77O1HcwdNMDDr2prr4A0 CV6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SoCmbGxN/aO/kMcp3ztDvA2jTIObtogCqRK1+lIzWfA=; b=gEnP7mCugmKLkfF98GdSCdsKrfTmyvXNPVXIp47t2noQqKaqNnja+B+elTwbFhcWxd kK4chYnYwzRu8otddxHHPokpsZkYVqz2uB5jMqVSqX5WeXhqJnvXu2UE7bxio5ksFQa4 /qb3SSxnKSbO6Noxvbff+jMYVEfR6PRWtC85IU/Va2r/CfG0Zm7C29xDD4KUijVnOKIJ jCU6JXFvbGYRZphAW+yS1Wa1Wt681fwCQDLfUtFAOXWEA3IcX2/qQA1hFrT4fXOAlwhh JiJwpuEqJNtPDLDZveBi2QOJlMa7J5QuoME4G4lxHxUfTc4UPw+3uFAzygC3fgYVARe2 l8Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=oqpFU4ML; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si2199337ejp.324.2021.01.28.01.49.39; Thu, 28 Jan 2021 01:50:04 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=oqpFU4ML; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232445AbhA1JsF (ORCPT + 99 others); Thu, 28 Jan 2021 04:48:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbhA1JpD (ORCPT ); Thu, 28 Jan 2021 04:45:03 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D0C9C061573 for ; Thu, 28 Jan 2021 01:44:22 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id ox12so6805136ejb.2 for ; Thu, 28 Jan 2021 01:44:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SoCmbGxN/aO/kMcp3ztDvA2jTIObtogCqRK1+lIzWfA=; b=oqpFU4MLxEO7C9YvlPwddm12aFeciDO382Q47IoKOi3ls4NYbIibDT0ss7Tnf4Bwsm pVE6cROJYJcgp2SoTTjLQ7vPOxSyOexkDPcH639ixiLGoOhsAdX4ABh9Egnke8Lk6HFZ NGE8WDGxpJCFo+BD0BZ8LNXf+fQ9eax70X8RZlQmNUvFQcBWTY3cHvtKv/eumpN+8/a9 9PZfWDKV5jUND+Kw/QKWvQ4yhKRm5IGK+XzmVmuykp+GaKvgR1DvCgKrLYnx4RdZKSJu 7S+0foOLHxcFNcOVU7MBEquAjyKaAGsMeZgGAAhdnX1YSxULhwpShF+TACdNI/ENrpEo Goxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SoCmbGxN/aO/kMcp3ztDvA2jTIObtogCqRK1+lIzWfA=; b=mOpHjwX9UGAYlFtoMeQlxVmLo5LqLbOJq2id9ONKIX7AHHR84L7z72q1WOW29pFB+/ PoDZfQLFR2ui3OcHn7I8B2/da6jnztfNXZ0oCj+aiTdc7es4LXFGp83g0GDTZ32oTIx7 WmLYII6W+lVdyl6hjEU5nCLHeYHi6MNSSV4UREVzJg79cZefx6AId94NGXYKc36vZ12l QEdgf1mdAgNPsP5VfV2CO9K8AOXsJTkdaUoLjqujQLiy5QYNZPrRomYZl/seHYXCE3xB fDmhtPHv2JM/drBUaG7xLJbyiO80JkgH7REQz+iIvYU+K09DsUDG7H7liQK0y0RJTeLM SUug== X-Gm-Message-State: AOAM530ltzVVSyzhHoabCNfCzRnZtl7R/Z0K5sc1LLQ3kiD18+p9G6qL l8TjMHeFfERDErLjTsVtbvrkhN8JhaQNfsG3RE48GQ== X-Received: by 2002:a17:907:2632:: with SMTP id aq18mr3193614ejc.445.1611827060831; Thu, 28 Jan 2021 01:44:20 -0800 (PST) MIME-Version: 1.0 References: <20210128081030.2345998-1-hsiufangho@google.com> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 28 Jan 2021 10:44:10 +0100 Message-ID: Subject: Re: [PATCH] eeprom: at24: Add permission to write_timeout To: Greg Kroah-Hartman Cc: Jenny Ho , Arnd Bergmann , linux-i2c , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 10:12 AM Greg Kroah-Hartman wrote: > > 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 :) > I know but if we're touching it, then better do the right thing. :) > But I agree, having it per-device would be much better, a sysfs > attribute would easily work for that. > I was thinking about a generic device property that could be set from device tree etc. I doubt there's much need to change this at runtime outside of development? Bart