From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933159AbbDNRPW (ORCPT ); Tue, 14 Apr 2015 13:15:22 -0400 Received: from casper.infradead.org ([85.118.1.10]:58191 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933024AbbDNRPR (ORCPT ); Tue, 14 Apr 2015 13:15:17 -0400 Message-ID: <552D4B21.4020803@infradead.org> Date: Tue, 14 Apr 2015 10:15:13 -0700 From: Randy Dunlap User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Dmitry Khromov , linux-kernel@vger.kernel.org CC: gregkh@linuxfoundation.org, Evgeniy Polyakov Subject: Re: [PATCH] Introduce an ability to specify microseconds bus scanning intervals in w1 core References: <55292A69.5020106@icelogic.net> <1040571428797306@web8j.yandex.ru> <552CC487.70402@icelogic.net> In-Reply-To: <552CC487.70402@icelogic.net> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/14/15 00:40, Dmitry Khromov wrote: > DS1990* "iButtons" and compatible RFID card readers commonly found at > physical access control systems are usually attached/generate presence > for as short as 100 ms - hence the tens-to-hundreds milliseconds scan > intervals are required. > > Tested on Raspberry Pi model B+ with DS2482-100 bus master, > tens-of-milliseconds intervals are easily achieved without significant > CPU load (and with unknown accuracy), and though I doubt > microseconds-scale intervals are really feasible in terms of practical > use and underlying buses timings, I believe it makes sense to give the > ability of using them to those willing to try. > > Signed-off-by: Dmitry Khromov > Acked-by: Evgeniy Polyakov > > drivers/w1/w1.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > --- > diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c > index 181f41c..73b4e2d 100644 > --- a/drivers/w1/w1.c > +++ b/drivers/w1/w1.c > @@ -46,11 +46,15 @@ MODULE_AUTHOR("Evgeniy Polyakov "); > MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol."); > > static int w1_timeout = 10; > +static int w1_timeout_us = 0; > int w1_max_slave_count = 64; > int w1_max_slave_ttl = 10; > > module_param_named(timeout, w1_timeout, int, 0); > MODULE_PARM_DESC(timeout, "time in seconds between automatic slave searches"); > +module_param_named(timeout_us, w1_timeout_us, int, 0); > +MODULE_PARM_DESC(timeout, "time in microseconds between automatic slave" > + "searches"); The description string needs a space between "slave" and "searches". > /* A search stops when w1_max_slave_count devices have been found in that > * search. The next search will start over and detect the same set of devices > * on a static 1-wire bus. Memory is not allocated based on this number, just -- ~Randy