Re: fw_devlink for ACPI - need some pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 12, 2020 at 3:13 AM Saravana Kannan <saravanak@xxxxxxxxxx> wrote:
>
> Hi ACPI devs,
>
> I want to take a stab at adding fw_devlink support for ACPI.
>
> fw_devlink adds device links between consumer and supplier devices. It
> finds the supplier-consumer dependencies by looking at the firmware
> nodes of devices as they are added to driver core.
>
> Main benefits of fw_devlink (because it creates device links):
> * Removes a lot of deferred probes or probe failures (due to poor
> error handling).
> * Makes module load order less important for things to probe successfully.
> * Makes suspend/resume a bit more robust.
>
> For DT (devicetree), I know how to interpret the common properties
> (Eg: clocks, -gpios, etc) to figure out what devices supply resources
> for a given device. In general, I'm familiar with DT and there's also
> Documentation/devicetree/bindings/ that I can grep for if I need to
> know what a property means. So, I've been able to implement fw_devlink
> for DT.
>
> Now, I want to add support for ACPI to get the ball rolling. However,
> I'm fairly clueless with it comes to ACPI. So, if I can get some
> pointers, that'd be great!
>
> Things I need help with:
> 1) I don't even know how to view the ACPI data on my PC. For example,
> in DT, /sys/firmware/devicetree/ has the entire DT represented as a
> tree of folders and files. How do I read ACPI info that lists all the
> devices, their properties, etc?

You can look at the directory structure under
/sys/devices/LNXSYSTM\:00/ which roughly corresponds to DT contents.

> 2) Is there documentation to look up what each of those device properties mean?

Of course there is.  The docs in Documentation/firmware-guide/acpi/ to
start with, the ACPI spec and a number of assorted additional pieces.

> 3) How are some of the common device dependencies listed in ACPI? For
> example, if a device depends on power, clock, GPIO, interrupt, etc how
> does ACPI list the supplier devices for each of those resources?

That depends.

_DEP is one way to specify dependencies between devices in ACPI, but
there are others.

> 4) Assuming there are a few common properties that list the device
> dependencies, how do I look up a firmware node that a property points
> to? If this is not how it works, how does it work?

The concept of "properties" as you know them from DT doesn't apply to
ACPI in general.

While it is possible to define "properties" of a device in a way that
is kind of analogous to DT, it really isn't used in practice.

Generally speaking, the spec defines the ways to represent various
types of information etc.

> In general, any pointers to docs that'll answer the above questions
> would also be appreciated.

Well, you may find it less compelling than expected, but feel free to
ask if you have any more specific questions.

Cheers!



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux