lkml.org 
[lkml]   [2015]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Introduce an ability to specify microseconds bus scanning intervals in w1 core
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 <dk@icelogic.net>
> Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
>
> 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 <zbr@ioremap.net>");
> 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


\
 
 \ /
  Last update: 2015-04-14 19:21    [W:0.074 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site