OSDN Git Service

habanalabs: fix hwmon handling for legacy f/w
authorOded Gabbay <ogabbay@kernel.org>
Sun, 12 Dec 2021 14:40:24 +0000 (16:40 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:09 +0000 (08:59 +0200)
commitbb099a805104568c8babbf94824507b0d72ba232
tree6896b561d52dcef8ec8f2d2bf6ffe2b33bae8462
parent9acdc21b0b04f370c306b7d95c296c7f22660fc0
habanalabs: fix hwmon handling for legacy f/w

In legacy f/w that use old hwmon.h file, the values of the hwmon
enums are different than the values that are in newer kernels (5.6
and above).

Therefore, to support working with those f/w, we need to do some
fixup before registering with the hwmon subsystem and also when
calling the functions that communicate with the f/w to retrieve
sensors information.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/hwmon.c