From patchwork Fri Nov 17 11:14:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13458823 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O7fzctNC" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E13FD4B; Fri, 17 Nov 2023 03:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700219683; x=1731755683; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nl2Dsw+dPH2fUNbgA5kZPDoI4Q44DM8znc3EQjvjalA=; b=O7fzctNCFA+Sg6r5l96ARM2UpVU0LysS6H5HNxW/p//CYqqUR2gQ5bBY lZJNZ9AaMGBndblYwGYFKtA5Q9tKyaChtxkRO9eFoetkMVANBaLwsR+84 qe2Se2QMOcfN6PCX1GiyXkisSeyx4uiHJirLhBveZBrxDoD07fwtGdvb/ 6F0VpXs4oJJzY/pCxYLO3vDoKFEV4ijH5smjXY3HgCvHYhgmpB852T6Nu HY3s7Ak2ET2lCOpnkaAssUZiKMz6WHmVtYd/TDEh83R9n9BkwiciIXeHv xL2vOMuUXdQm7epcZrL4EU4yu43xcUJ91iARudfjaLKOMgYxP3bATVmL8 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="9941636" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="9941636" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 03:14:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="769201197" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="769201197" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 03:14:38 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 16409120F14; Fri, 17 Nov 2023 13:14:36 +0200 (EET) From: Sakari Ailus To: linux-acpi@vger.kernel.org Cc: linux-media@vger.kernel.org, rafael@kernel.org, jacopo.mondi@ideasonboard.com, laurent.pinchart@ideasonboard.com Subject: [PATCH v2 3/7] ACPI: Documentation: Document acpi_dev_state_d0() Date: Fri, 17 Nov 2023 13:14:29 +0200 Message-Id: <20231117111433.1561669-4-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231117111433.1561669-1-sakari.ailus@linux.intel.com> References: <20231117111433.1561669-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document that acpi_dev_state_d0() can be used to tell if the device was powered on for probe. Signed-off-by: Sakari Ailus --- 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. + I²C ---