Re: [RFC PATCH V2] ACPI: Add _DEP(Operation Region Dependencies) support to fix battery issue on the Asus T100TA

From: Mika Westerberg
Date: Fri Nov 07 2014 - 06:06:00 EST


On Fri, Nov 07, 2014 at 12:00:34AM +0100, Rafael J. Wysocki wrote:
> > So if we have a device, like SDHB above (SDIO controller), that needs
> > GPIOs for powering the SDIO card and that is done by using GPIO
> > operation regions how do we ensure that the GPIO controller driver is
> > there?
> >
> > I think the answer is that we just make sure the the GPIO driver is
> > there before anything that is going to use it. E.g make it
> > subsys_initcall() or so?
>
> The current approach, which arguably is lame, has been to (1) compile in
> all drivers that *may* be depended on (like all drviers registering operation
> region handlers) and then (2) trick the devices to be registered in the right
> order.

Right, I kind of expected that it be the case :-/

> I'd rather have a more robust mechanism than that, but so far no one has
> proposed anything remotely usable.
>
> As far as _DEP is concerned, it seems that in *practice* it is used to
> reflect functional dependencies between devices rather than the operation
> regions thing only (as specified). In that case we may decide to follow
> the practice rather than the spec (and move to update the spec to reflect
> the practice at the same time), but that requires some consideration.

Indeed it looks very much that it contains more than just operation
depedencies. In T100 for example there is this PEPD device that does not
have any operation regions and it is still in the _DEP list of the SDIO
controller device.
--
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/