Blob Blame History Raw
From: Vadim Pasternak <vadimp@mellanox.com>
Date: Tue, 26 Feb 2019 08:20:34 +0000
Subject: platform/x86: mlx-platform: Fix access mode for fan_dir attribute
Patch-mainline: v5.1-rc1
Git-commit: 3ba29326b894e512db9ea7aaa7cb17b235f75d1b
References: bsc#1112374

Fix access mode for "fan_dir" attribute from "write only" to
"read only". This attribute is exposed to leds-mlxreg driver.
The purpose of this attribute is to provide information about FAN
direction setting on the system (forward or backward).
It is relevant for the next generation systems MQMB7xx, MSN37xx,
MSN34xx, MSN38xx.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/platform/x86/mlx-platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -1240,7 +1240,7 @@ static struct mlxreg_core_data mlxplat_m
 		.label = "fan_dir",
 		.reg = MLXPLAT_CPLD_LPC_REG_FAN_DIRECTION,
 		.bit = GENMASK(7, 0),
-		.mode = 0200,
+		.mode = 0444,
 	},
 };