Re: [PATCH v2 3/7] ACPI: Documentation: Document acpi_dev_state_d0()

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

 



Hi Sakari,

Thank you for the patch.

On Fri, Nov 17, 2023 at 01:14:29PM +0200, Sakari Ailus wrote:
> Document that acpi_dev_state_d0() can be used to tell if the device was
> powered on for probe.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> ---
>  Documentation/firmware-guide/acpi/non-d0-probe.rst | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/firmware-guide/acpi/non-d0-probe.rst b/Documentation/firmware-guide/acpi/non-d0-probe.rst
> index 7afd16701a02..815bcc8db69f 100644
> --- a/Documentation/firmware-guide/acpi/non-d0-probe.rst
> +++ b/Documentation/firmware-guide/acpi/non-d0-probe.rst
> @@ -24,6 +24,14 @@ there's a problem with the device, the driver likely probes just fine but the
>  first user will find out the device doesn't work, instead of a failure at probe
>  time. This feature should thus be used sparingly.
>  
> +ACPI framework
> +--------------
> +
> +Use the Linux ACPI framework function :c:func:`acpi_dev_state_d0()` to tell
> +whether the device was powered on for probe. :c:func:`acpi_dev_state_d0()`
> +returns true if the device is powered on, false otherwise. For non-ACPI backed
> +devices it returns true always.
> +

While this is true, I don't want to see drivers having to call
ACPI-specific functions, the same way you dislike OF-specific functions
in drivers. Please find a better way to handle this.

>  I²C
>  ---
>  

-- 
Regards,

Laurent Pinchart




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux