From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4ABDC52D7C for ; Tue, 13 Aug 2024 03:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:CC:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+e5MjfWpudv39Gxx6zPYNJy6Yw6AmGclY2+tnee5S0s=; b=Eg4Q0V1rN3oiclTy85OMf+MptZ bvoDgrUYfyEmyq5wUgmjQ8t8ecqIuUkAJn0gWAFtVKEbykvT9VoJM4u2UDaCRAOt122j9QkQEqD5n x2KEFQq0TYkIPrQwFNjSS4uYtB3hwuq/S6wA+Bvh3AC2m31O9bkZPmeREfDMkfcApgZCMkcHjXnmq qF/PIy5FQDgO4wH0Ww4GjSPi0flbFGbw3Eer9xF7yjI/X8qEKxfPd+QDVowEZqEqSTCsQwMTj2tJy 6pxqDG4A7BapeNrrR2cGqKS6QAtWmMUn8YSJMEG7wQlJTv60yHJvFBiTh36HyIxSS0IWTQtexOr1M QkPHD4Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdiYD-00000002FEP-3r94; Tue, 13 Aug 2024 03:50:26 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdiXb-00000002F9y-3Ptm for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 03:49:50 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 47D3na2m090629; Mon, 12 Aug 2024 22:49:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1723520977; bh=+e5MjfWpudv39Gxx6zPYNJy6Yw6AmGclY2+tnee5S0s=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=hWUYn4emwKwjJGOGREiFoSrb3mPML4PhE1KlYLCFxH3Begc9Q9sSILbMHsW/yuwrO l6i33IJiCMv425yaOIxOeTqf4jDeQx3TsrgTiULWMgatezuY+Te6DiikQd0Roirxvc /qOFRnBudKm9UHCejOrVUOk70E9m8EYISV2hGkUg= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 47D3nahn016324 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Aug 2024 22:49:36 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 12 Aug 2024 22:49:36 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 12 Aug 2024 22:49:36 -0500 Received: from localhost (lcpd911.dhcp.ti.com [172.24.227.68]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 47D3nZHT035512; Mon, 12 Aug 2024 22:49:36 -0500 Date: Tue, 13 Aug 2024 09:19:35 +0530 From: Dhruva Gole To: Kevin Hilman CC: Markus Schneider-Pargmann , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vibhore Vardhan , , , Dave Gerlach , Georgi Vlaev , Akashdeep Kaur Subject: Re: [PATCH v9 3/4] firmware: ti_sci: Introduce Power Management Ops Message-ID: <20240813034935.wqehblov3e5gur3r@lcpd911> References: <20240809135347.2112634-1-msp@baylibre.com> <20240809135347.2112634-4-msp@baylibre.com> <20240812054717.6lzkt3lxclzec3zy@lcpd911> <7hcymdphky.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <7hcymdphky.fsf@baylibre.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240812_204948_088925_546BD049 X-CRM114-Status: GOOD ( 17.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Aug 12, 2024 at 14:16:45 -0700, Kevin Hilman wrote: [...] > >> +/** > >> + * struct ti_sci_msg_resp_lpm_wake_reason - Response for TI_SCI_MSG_LPM_WAKE_REASON. > >> + * > >> + * @hdr: Generic header. > >> + * @wake_source: The wake up source that woke soc from LPM. > >> + * @wake_timestamp: Timestamp at which soc woke. > >> + * > >> + * Response to a generic message with message type TI_SCI_MSG_LPM_WAKE_REASON, > >> + * used to query the wake up source from low power mode. > >> + */ > >> +struct ti_sci_msg_resp_lpm_wake_reason { > >> + struct ti_sci_msg_hdr hdr; > >> + u32 wake_source; > >> + u64 wake_timestamp; > >> +} __packed; > >> + > > > > It looks like we forgot to update the parameters in this API. > > See [1]: > > > > struct tisci_msg_lpm_wake_reason_req > > > > We're missing here the wake_pin, mode and 2 rsvd fields as well. > > > > [1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#tisci-msg-lpm-wake-reason > > > > The docs mention how to interpret the pin, but not the mode. This > driver should translate this mode number to some human-readable state > for better debug messages. > > Kevin Agreed, we would all benefit from a logic that prints the human-readable state. The way to interpret the mode would be just as: https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#supported-low-power-modes So for eg. 0x0 = TISCI_MSG_VALUE_SLEEP_MODE_DEEP_SLEEP -- Best regards, Dhruva Gole