From patchwork Sun Jun 30 15:36:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13717175 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 1A993C3064D for ; Sun, 30 Jun 2024 15:38:14 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y0qOLaYt6Eo8pJE0miDoGlJ+NVS4slEP6icBdDJRzuc=; b=Yu5PTSn6Aw2paBrOPXTP7ZHxoA sTkGvHd+AP2vheij5ODcIn3fyUrpcYIaGcCNstQ0VIPGmGcNwiVlThueLLiXR7DMd3vuzmmCKzhmH 9YncD391RifSK5TziYUTUNbCswOKOTcG5qfsVSiyn1YwMRb54vGtzxct7bc0sE05/ySIPDwFarY3i STU2VDJB1yzytCvB2rrBE7/k55ySVvUQsPHb4X6o5w1IWGIaDDLU/11I496StqvJFOOsper/FGPdL d+Uvo191YBByX37pe7fuqnTSlYIScnYAL5ZL3DjqXsC1sbE/1x73JIEOkDa/RXwBedt4s1AX5oNdG M1+cALhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNwcr-00000000cXo-3KGE; Sun, 30 Jun 2024 15:38:01 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNwcX-00000000cMe-479S for linux-arm-kernel@lists.infradead.org; Sun, 30 Jun 2024 15:37:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1719761840; x=1720366640; i=wahrenst@gmx.net; bh=y0qOLaYt6Eo8pJE0miDoGlJ+NVS4slEP6icBdDJRzuc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=QvvW/ybf2mOaJVc47VoFjn+kLT6bKRPFOjLl0FDbezZaLxxyN6lLxLjXyQ07vuCi DCfeBS1pvGZLmG0PpLkxBjT9CpN+nxV0h0FdKJya1xZ/EMjYi9fGZUmowOW7NAkvJ JlYImhGuYqgtad8Zro9iUE2ZkUrdglkWXry3b5D43cbUDnmlrQW02s24sRulFc6NC IeRs47HrkkjFhVuAeae4bh0cpndAzSjpM6wLcRDXnFuguJDvI+MkF/mKPPFQmABqN mI9ve3qe/83QzeNqggYw7sdX+mNht9ysFqdkbdvpivRv+xwAvX4Kf30xzjynSLN/S 38Q+ymP3RWGOTWT1UQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MbirE-1rsj7x3VPS-00bUUz; Sun, 30 Jun 2024 17:37:19 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Thomas Gleixner , Jassi Brar , Ulf Hansson , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Peter Robinson , dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Stefan Wahren Subject: [PATCH 03/11] pmdomain: raspberrypi-power: Adjust packet definition Date: Sun, 30 Jun 2024 17:36:44 +0200 Message-Id: <20240630153652.318882-4-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240630153652.318882-1-wahrenst@gmx.net> References: <20240630153652.318882-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:QqYv8SsOHT/MdLbf9Bg/MkzNBJG3Ti02c5AdTTzhzh8KgfY/TO6 3GFk7ubmP9O8Y4OUQ9hmMPTYH1NRskbpJDnJPWbArtxybb4hoSw1mpWG+0YoPbMXehp9GeM FWTieW1h9rm3rwusEyK+2Xp4MZ9ZriuTi1lrNJ9r3ybTnlFX/yDh1vNGShEmg5ofsX/3WLN ARP1dJaV7XPPYz/YxVdBA== UI-OutboundReport: notjunk:1;M01:P0:NDh8fTVKp4k=;hNyq0VO06cMK9NCcVctv1X4zGj1 Lsa76eLuUXzK+u19YqKuQtSsZ9kqIVkE8/Npmfc/Cdl9bkk3QYcpzkivL5eYKfSUPcSeP2p24 73kDPH82x8Dbj1Vvev/dzZgGZAgE3A1DAC7Nf0+liOt3Hubi9kVQY9J89swAXtoc35WhbEG5e tSw7SI386FITof9+BS1m1D0HA0Q4tMRrIhLsWCcWgBOHQ9EZhodD87sSXzD84+TPbROMh9wv9 xoFkqGdj4s4rjaEhMp1lZFJZ+JysTPugwKRUzLD0lJQW4ru8Z6VZfzZ+PejfrwzmEXZRkrD0m Jimeo8Qr7/SWJS2lRRW8lHcKhYAVe0gxnYC+tqerlwyF+I9TXVPuNeSqAVKKj02gZ6lXcbAT1 w6iLzP9fdp7VAsLEROx041KZeIeFKnvA1ZeFc1PLpvTf3ts1gj59fDp0pEW5Iy0e8yISqEFSY mQsi3m3HPqgZZkzQeX8tkILdQaTznSz9KHL/3eupcNFHA2zXZL/5p8IZGvBvZFn61IBvp+3V1 QEMbECsb688qUCD5tqoM2ouE7sHKc4g8QjSSBwDmnxjQ2/41yeabJR3cVd5eeqHV1g7duEfMe q/N7QBkoUFpnIbRzMUatQ1DQvd7oB8DjSpVzPuXQ83C6bkZcvwXRJ6kJGH45f3fP3ih7Ur0L4 XNwTSK/DzBhqL1fm6BBvmNjfQ/7AYoFfKBqZYB/mly47QGbA9gw5sPxTYojuGMxIrn/Bi/v/i IyE3eCsF5M1wieNgX3WDPueQ8ReTfa0NS96c8YbHD0wjUAktGze0O2eGVMiU0i/eVBmrIqIdX bUCT9+V4eIVDB7MCPndCD9+T82xuMpVvtwNnoODyJupVQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_083742_479499_3DC21569 X-CRM114-Status: GOOD ( 13.05 ) 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 According to the official Mailbox property interface the second part of RPI_FIRMWARE_SET_POWER_STATE ( and so on ...) is named state because it represent u32 flags and just the lowest bit is for on/off. So rename it to align with documentation and prepare the driver for further changes. Link: https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- drivers/pmdomain/bcm/raspberrypi-power.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.34.1 diff --git a/drivers/pmdomain/bcm/raspberrypi-power.c b/drivers/pmdomain/bcm/raspberrypi-power.c index 06196ebfe03b..39d9a52200c3 100644 --- a/drivers/pmdomain/bcm/raspberrypi-power.c +++ b/drivers/pmdomain/bcm/raspberrypi-power.c @@ -41,7 +41,7 @@ struct rpi_power_domains { */ struct rpi_power_domain_packet { u32 domain; - u32 on; + u32 state; }; /* @@ -53,7 +53,7 @@ static int rpi_firmware_set_power(struct rpi_power_domain *rpi_domain, bool on) struct rpi_power_domain_packet packet; packet.domain = rpi_domain->domain; - packet.on = on; + packet.state = on; return rpi_firmware_property(rpi_domain->fw, rpi_domain->old_interface ? RPI_FIRMWARE_SET_POWER_STATE : @@ -142,13 +142,13 @@ rpi_has_new_domain_support(struct rpi_power_domains *rpi_domains) int ret; packet.domain = RPI_POWER_DOMAIN_ARM; - packet.on = ~0; + packet.state = ~0; ret = rpi_firmware_property(rpi_domains->fw, RPI_FIRMWARE_GET_DOMAIN_STATE, &packet, sizeof(packet)); - return ret == 0 && packet.on != ~0; + return ret == 0 && packet.state != ~0; } static int rpi_power_probe(struct platform_device *pdev)