<br><div class="gmail_quote">2010/6/25 Arjen de Korte <span dir="ltr">&lt;<a href="mailto:nut%2Bdevel@de-korte.org">nut+devel@de-korte.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Citeren Arnaud Quette &lt;<a href="mailto:aquette.dev@gmail.com" target="_blank">aquette.dev@gmail.com</a>&gt;:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

The &#39;pollonly&#39; is a flag, so just listing &#39;pollonly&#39; here would be enough<br>
(the &#39;= 1&#39; part is not used). Assuming this is important for this device, we<br>
should probably automatically disable the interrupt pipe, so this is what<br>
the revised patch will do upon detecting a 5G UPS.<br>
</blockquote>
I came to the same conclusion. now to set &quot;use_interrupt_pipe = FALSE;&quot;, the<br>
content of r1853 should be moved to upsdrv_initups(), before the claim()<br>
calls.<br>
</blockquote>
<br></div>
That would be neat, to remove the nag warning when we shut it down. Other than that, it will probably be fine as it is now, since the fun pointer will be called whenever a 5G APC UPS is detected.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
and the new apc-hid-&gt;usb_device_id_t entry (from Chris&#39; patch) should have a<br>
fun pointer to set it.<br>
though that last one was obvious!<br>
</blockquote>
<br></div>
Yes. It does however raise the question whether or not we should default to using the interrupt pipe (instead of defaulting NOT to use it). The interrupt pipe is broken for quite a few popular vendors and models and unless you override the default pollinterval, won&#39;t significantly reduce the latency.<br>

<br>
Using the interrupt pipe is probably most useful for devices where we know it is used by the UPS (and implemented correctly) and we want to lower the load the usbhid-ups driver presents by increasing &#39;pollinterval&#39; to something like 30 seconds or so. In that case the interrupt pipe will then provide you with the near instantaneous response to critical events.<br>

<br>
Any thoughts?</blockquote></div><br>agreed. And the differential polling mechanism does well at detecting major changes.<br>note that we can get rid of the fun() definitions and put the general case (use_interrupt_pipe = TRUE) directly in the claim() function.<br>
<br>cheers,<br>Arnaud<br>