habanalabs: add dedicated message towards f/w to set power
authorRajaravi Krishna Katta <rkatta@habana.ai>
Tue, 26 Oct 2021 11:11:06 +0000 (14:11 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:04 +0000 (08:59 +0200)
commite84e31a9123bda35a1e61f391e7c30e8b3a8ea5b
tree231c5adaad1ba14cd4ba259bda0e3ea2c0e6212d
parent138858226414bd026e63acebb7540093c97c69fd
habanalabs: add dedicated message towards f/w to set power

CPUCP_PACKET_POWER_GET packet type was used for both
hl_get_power() and hl_set_power().

To align with other sensor functions hl_set_power()
should use CPUCP_PACKET_POWER_SET.

This packet will only be used with newer ASICs, so need to add
a compatibility flag to the asic properties to indicate whether to use
this packet or the GET packet.

Signed-off-by: Rajaravi Krishna Katta <rkatta@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/hwmon.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/include/common/cpucp_if.h