Messages in this thread | | | Date | Tue, 24 Oct 2006 13:09:47 +0200 | From | "Shem Multinymous" <> | Subject | Re: Battery class driver. |
| |
On 10/24/06, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> The kernel backend or the userspace backend? We need to decide on > terminology :) There's no good programmatic way of determining how long > a query will take other than doing it and looking at the result. I guess > we could do that at boot time.
This is up to the kernel driver. Most drivers have fairly accurate knowledge about the hardware they read, in terms of both the cost of reading and the rate of change that's worth tracking.
The important thing is to define an ABI convention that lets userspace tell the driver when it wants the next refresh (via either David's timestamp or my suggested ioctl). The driver can then make its informed decision on how to reasonably fulfill the request.
Shem - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |