Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pmdomain: raspberrypi-power: Adjust packet definition

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 <wahrenst@gmx.net>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20240728114200.75559-4-wahrenst@gmx.net
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Stefan Wahren and committed by
Ulf Hansson
49d2a1ec 8287e9e2

+4 -4
+4 -4
drivers/pmdomain/bcm/raspberrypi-power.c
··· 41 41 */ 42 42 struct rpi_power_domain_packet { 43 43 u32 domain; 44 - u32 on; 44 + u32 state; 45 45 }; 46 46 47 47 /* ··· 53 53 struct rpi_power_domain_packet packet; 54 54 55 55 packet.domain = rpi_domain->domain; 56 - packet.on = on; 56 + packet.state = on; 57 57 return rpi_firmware_property(rpi_domain->fw, 58 58 rpi_domain->old_interface ? 59 59 RPI_FIRMWARE_SET_POWER_STATE : ··· 142 142 int ret; 143 143 144 144 packet.domain = RPI_POWER_DOMAIN_ARM; 145 - packet.on = ~0; 145 + packet.state = ~0; 146 146 147 147 ret = rpi_firmware_property(rpi_domains->fw, 148 148 RPI_FIRMWARE_GET_DOMAIN_STATE, 149 149 &packet, sizeof(packet)); 150 150 151 - return ret == 0 && packet.on != ~0; 151 + return ret == 0 && packet.state != ~0; 152 152 } 153 153 154 154 static int rpi_power_probe(struct platform_device *pdev)