Re: Battery class driver.

From: Shem Multinymous
Date: Tue Oct 24 2006 - 07:10:38 EST


On 10/24/06, Matthew Garrett <mjg59@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/