From patchwork Sun Jul 28 11:41:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13743893 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 00016C3DA49 for ; Sun, 28 Jul 2024 11:46:18 +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=4q82fafFyhWuE8D9fKAnSbhAEbmOAflZeVN6dmlZRD0=; b=yWBeB3j+OgvNwtymMQ5X9Ys4Qg WW59CcTQLg9vEVzoAs2LHcu9Q0b7TGLDKA/MP1ONzpHQYzZBUdRZr2OJYe/W8gV5hvR5VNiATB3Me eb+ApDfV3Iz/9MJCYcX9yFSl8qh/KNHMkpEMy4igCoFxe2cdIt7srhF8BOLHo8vyEpvKV7jMiuV4j lrkly0j8A3umFUfb87oEXzwzaI06kCxYhWCG4IMxKzX5z2wNM5UkdYhzJ28HVXSQwU6Aka3ndMKyn V+BMibvs9VC7OTg1CmNydJmB7ICpG+DXiNvszry1Y9HOixhVvzMz9be3fx4VLUeal1AMO4RY3lzmX mILzN5kQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2Ll-00000008O5U-3ium; Sun, 28 Jul 2024 11:46:05 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sY2LK-00000008NzA-1sTh for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2024 11:45:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722167115; x=1722771915; i=wahrenst@gmx.net; bh=4q82fafFyhWuE8D9fKAnSbhAEbmOAflZeVN6dmlZRD0=; 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=Xu5kWRqVwRMEHm/f8hCDK1d+uoV2kYeXxQv8i9nSnyXZfHNWFFcUhtvRmypUy3+i WupDtA3vBAqyx7dlVQDHQ9dInJSmfOmYyI6hLBBT3xcCAuvbNSonBHVBxWxyz2vU8 CBxfxJTqgs/L1B91WKf8of3Mxbbba5zbH9CFeGsqUe38mtEi6tbeHORu9o1sng5j8 6rLdGvCEYg6f/Lbkh47qmwH0fOCtTCWE4LGx14jTDCQrtIt934dTBaa0sdZ6SfbOE 0AlfOHKBzJ8MeonceBt1D/LE9MTYqSrckUGZ+ezRG4x/vQaE5gRsjvhaMi1mNjlCV nuFyjM0qgyERE0Baqg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbivG-1rzVnY3Ecw-00laEe; Sun, 28 Jul 2024 13:45:14 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Maxime Ripard , Jassi Brar , Ulf Hansson , =?utf-8?q?Ma=C3=ADra_Canal?= , Jiri Slaby , Minas Harutyunyan Cc: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Lukas Wunner , Artur Petrosyan , 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 V2 03/16] pmdomain: raspberrypi-power: Adjust packet definition Date: Sun, 28 Jul 2024 13:41:47 +0200 Message-Id: <20240728114200.75559-4-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240728114200.75559-1-wahrenst@gmx.net> References: <20240728114200.75559-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:ww2ImHiANw1KUG0kC6NCMNYw2JJ6/w2TlLV8iCX0cp1WhqnY1gf Lrt7Rel1WCNivDng91th4RxlDGK+MD84bbpqap26he9//LsKj8FW02IehVq7aIM7RY1iuQd 5HxfVCxyLYAZflwkRNBYrC7kl0sMXN6RZClcV2ykSweCLdnMcrZtHDg1BiC88GRPcaQxwv4 iKPV35Fj2K4jIbxgLcw4g== UI-OutboundReport: notjunk:1;M01:P0:xHBFILp2AVM=;AtBau9kAHDzAQN2vi/Rlk8IGZWV HgOSGiCxZyBnPoCAlxISFVgPBz4nxSq8OgmABAa56QPjAFV41F/7zbdYbcOdX7pDcpPz4noVk VIz2j7OsZJyAdhfoPPDcUTfT79NqmuCsn4Rz4k39rSIb+WQaggJLNgd8l+V9sxVtwhv1UBfjQ klXTFlTEHhh43Fu1lMDa2TsOCU0ffl3sSurCuLLfmb8jBe3Yz5RH2bAh/GB93DqNnpzYTa/rs GaS5DOcIuEaB3M0QKAWhPVaoj0BMuan8fTJKJIm841XXARfe2kOAUXcMvtnwS2d7aw3wX0POb inEwmjYM7EVFTIWZdsAvBj7w1L+jT3k1fIOnGFJitBe/RbumOGuxtRx+3ZHOA/TrwxRoK55JR CZdyQzLMxsxg51fctS9EbO8Kf/zt2Lcx8Z1AOXmmKLkjMNEfKjw3Kz2jnvAN0NarF9AUpsbxU S2BYtUj6VblFqAKhYpM2TdYLnwTHeqBKFsoL4qrNNO6XLaFezRc4W7pCX9VWBLaq0mIgMJHLx IPjQp/NoLL8lGLUlo80cxqU+Id6dJlcCrFaWZHN2ro1dDBYTgyLPhNJd0sWdJM47QFarEUQf3 chte7qnERjYvtg98tk7rvr6ayaS21nsuex3SHfOLU3QZJiJDBdYakBWG5k3o5nUl4LYR07wmE zWWHCJNtTm37OfQM//ty6qfLLiD6PSu6kTUv0k+Py27HAqbL9W7CfY2/nc/MeI2v0a8Q8/4qL 0VHWMOe+qhaP5wIavkG6eaM8V72d65aa+EK7dsYcLXTqlNaugjzqnw1D6Ts+PTs63XAhvzb24 Y7s9H8wvrvMMjvWUUPaTDyow== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240728_044538_803775_1B8468E1 X-CRM114-Status: GOOD ( 13.54 ) 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)