diff options
author | Mike Isely <isely@pobox.com> | 2006-02-25 22:00:38 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2006-02-25 22:00:38 -0600 |
commit | abc2e09464172bd433f2de2c11dbe5dfd4c73e8d (patch) | |
tree | d4ba3fcec24be4598b20fb6d112d3933cb9f4b22 | |
parent | becf9b027438240f4e8dde0de7c04c38cd68e489 (diff) | |
download | mediapointer-dvb-s2-abc2e09464172bd433f2de2c11dbe5dfd4c73e8d.tar.gz mediapointer-dvb-s2-abc2e09464172bd433f2de2c11dbe5dfd4c73e8d.tar.bz2 |
Implement configurable initialization pause in pvrusb2
From: Mike Isely <isely@pobox.com>
This implements a module option which may be used to pause
initialization of the driver right after the point where the hardware
is reset. The idea here is to provide a means for the driver to stay
out of the way until the hardware has finished initializating itself.
The default delay is zero, which disables it (at the moment I don't
think the delay is needed but it's worth leaving the logic in place to
do it).
Signed-off-by: Mike Isely <isely@pobox.com>
-rw-r--r-- | v4l_experimental/pvrusb2/pvrusb2-hdw.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/v4l_experimental/pvrusb2/pvrusb2-hdw.c b/v4l_experimental/pvrusb2/pvrusb2-hdw.c index c88da5417..01a1b8f80 100644 --- a/v4l_experimental/pvrusb2/pvrusb2-hdw.c +++ b/v4l_experimental/pvrusb2/pvrusb2-hdw.c @@ -43,9 +43,12 @@ static int initusbreset = 1; static int procreload = 0; static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 }; static int tolerance[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 }; +static int init_pause_msec = 0; module_param(ctlchg, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value"); +module_param(init_pause_msec, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(init_pause_msec, "hardware initialization settling delay"); module_param(initusbreset, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(initusbreset, "Do USB reset device on probe"); module_param(procreload, int, S_IRUGO|S_IWUSR); @@ -2244,6 +2247,13 @@ void pvr2_hdw_device_reset(struct pvr2_hdw *hdw) pvr2_trace(PVR2_TRACE_ERROR_LEGS, "Failed to lock USB device ret=%d",ret); } + if (init_pause_msec) { + pvr2_trace(PVR2_TRACE_INFO, + "Waiting %u msec for hardware to settle", + init_pause_msec); + msleep(init_pause_msec); + } + } |