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 F0EF4C52D7C for ; Tue, 13 Aug 2024 11:22:51 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nQ2rCZGHfeczLQQvaJbV7V/jhhTH3Xp6v0+tU05YxwA=; b=Yf+eVgRRR0Uzan5dtFZ+Of0Nkx 8EheIugaACYzBQv8ML1pH2qNXjT343wymClXTs3uqsdnsMV9UVbN2hwRtI/qRtfOfILynBoEpmJGs croMNzINxjFpxdzWjWI0Qs6u8UvDVBK+ZoEOfRtaNUvGUI585y3W5nOGtrWUYm6dLM0f+EKD0RIkT YfiulntDPuCYERX9l/wrDYy9wC4pHk0nwL4L9cDGE5qNEE8uk979h2r7Sk0gkK+lwl5KmeH2U6aW0 CNVpkZeoBqH75Eonw9fImSGIA6HKf8bTjaKqZvxC362HXHFgE3dUPIuEKtII7g3Fu5K+CahI76kmK jfFNeiWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdpbr-00000003UwW-00Dw; Tue, 13 Aug 2024 11:22:39 +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 1sdpbD-00000003Uqx-2t5k for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 11:22:01 +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 47DBLswl069776; Tue, 13 Aug 2024 06:21:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1723548114; bh=nQ2rCZGHfeczLQQvaJbV7V/jhhTH3Xp6v0+tU05YxwA=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=TxU6ZBXscCojoHjZHmE2F7dpxG3YUEFxKNwPZdB70LCO0D05TQjUAWR7BWgOy3ESV Jkjx9oegiAiPhv0xah6sJLGZO6+WT4EsGYo6jEHCjycCtdiOBHoaDVck5dBVggVTEF biNXf3gyy0RuS1m9rh/cSzqGVa/oG0pqpzC3aI1c= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 47DBLsVA013723 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Aug 2024 06:21:54 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 13 Aug 2024 06:21:53 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE106.ent.ti.com (10.64.6.27) 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; Tue, 13 Aug 2024 06:21:53 -0500 Received: from [172.24.227.249] (akashdeep-hp-z2-tower-g5-workstation.dhcp.ti.com [172.24.227.249]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 47DBLoT0116555; Tue, 13 Aug 2024 06:21:51 -0500 Message-ID: <5f6093e5-cf67-4516-b5b8-929987b05a2e@ti.com> Date: Tue, 13 Aug 2024 16:51:49 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 3/4] firmware: ti_sci: Introduce Power Management Ops To: Dhruva Gole , Kevin Hilman CC: Markus Schneider-Pargmann , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vibhore Vardhan , , , Dave Gerlach , Georgi Vlaev References: <20240809135347.2112634-1-msp@baylibre.com> <20240809135347.2112634-4-msp@baylibre.com> <20240812054717.6lzkt3lxclzec3zy@lcpd911> <7hcymdphky.fsf@baylibre.com> <20240813034935.wqehblov3e5gur3r@lcpd911> Content-Language: en-US From: a0230503 In-Reply-To: <20240813034935.wqehblov3e5gur3r@lcpd911> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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-20240813_042159_866721_10237757 X-CRM114-Status: GOOD ( 13.81 ) 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 13/08/24 09:19, Dhruva Gole wrote: > 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 > Missing the call to ti_sci_msg_cmd_lpm_wake_reason in resume path. Regards, Akashdeep Kaur