LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [W1] ds1wm: testers please, msleep not udelay
@ 2008-03-08 4:37 David Fries
0 siblings, 0 replies; only message in thread
From: David Fries @ 2008-03-08 4:37 UTC (permalink / raw)
To: linux-kernel; +Cc: Anton Vorontsov, Matt Reimer
I'm working on some patches to the one wire system I just need to
split them into small logical patches. I don't have the hardware to
test this ds1wm change. I wouldn't expect the delay here to be
critical, and on a handheld platform, I wouldn't think busywaiting for
such a long time to be a good idea. I also wouldn't expect putting
off reading the battery status a timer tick to matter much, so why not
sleep?
So, if someone would try out the patch and report back or tell me why
it's wrong I would appreciate it. If it looks good I'll submit the
patch with the rest of the one wire changes I'm working on.
Index: drivers/w1/masters/ds1wm.c
===================================================================
RCS file: /home/david/kernel/k/spacedout/patches/linux/drivers/w1/masters/ds1wm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- drivers/w1/masters/ds1wm.c 2 Feb 2008 18:37:24 -0000 1.3
+++ drivers/w1/masters/ds1wm.c 15 Feb 2008 03:42:36 -0000 1.4
@@ -159,8 +159,10 @@ static int ds1wm_reset(struct ds1wm_data
* 625 us - 60 us - 240 us - 100 ns = 324.9 us
*
* We'll wait a bit longer just to be sure.
+ * Was udelay(500), but if it is going to busywait the cpu that long,
+ * might as well come back later.
*/
- udelay(500);
+ msleep(1);
ds1wm_write_register(ds1wm_data, DS1WM_INT_EN,
DS1WM_INTEN_ERBF | DS1WM_INTEN_ETMT | DS1WM_INTEN_EPD |
--
David Fries <david@fries.net>
http://fries.net/~david/ (PGP encryption key available)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-08 4:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-08 4:37 [W1] ds1wm: testers please, msleep not udelay David Fries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).