Skip to content

Commit f9e1104

Browse files
mellanoxbmcandy-shev
authored andcommitted
platform/x86: mlx-platform: Extend FAN platform data description
Extend FAN platform data with register presence field. Add register present entry per rotor (tachometer) description tuple. The purpose is to allow indication of FAN presence. Signed-off-by: Vadim Pasternak <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 17727a3 commit f9e1104

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/platform/x86/mlx-platform.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,83 +1840,96 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_fan_data[] = {
18401840
.mask = GENMASK(7, 0),
18411841
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18421842
.bit = BIT(0),
1843+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
1844+
18431845
},
18441846
{
18451847
.label = "tacho2",
18461848
.reg = MLXPLAT_CPLD_LPC_REG_TACHO2_OFFSET,
18471849
.mask = GENMASK(7, 0),
18481850
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18491851
.bit = BIT(1),
1852+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18501853
},
18511854
{
18521855
.label = "tacho3",
18531856
.reg = MLXPLAT_CPLD_LPC_REG_TACHO3_OFFSET,
18541857
.mask = GENMASK(7, 0),
18551858
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18561859
.bit = BIT(2),
1860+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18571861
},
18581862
{
18591863
.label = "tacho4",
18601864
.reg = MLXPLAT_CPLD_LPC_REG_TACHO4_OFFSET,
18611865
.mask = GENMASK(7, 0),
18621866
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18631867
.bit = BIT(3),
1868+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18641869
},
18651870
{
18661871
.label = "tacho5",
18671872
.reg = MLXPLAT_CPLD_LPC_REG_TACHO5_OFFSET,
18681873
.mask = GENMASK(7, 0),
18691874
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18701875
.bit = BIT(4),
1876+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18711877
},
18721878
{
18731879
.label = "tacho6",
18741880
.reg = MLXPLAT_CPLD_LPC_REG_TACHO6_OFFSET,
18751881
.mask = GENMASK(7, 0),
18761882
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18771883
.bit = BIT(5),
1884+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18781885
},
18791886
{
18801887
.label = "tacho7",
18811888
.reg = MLXPLAT_CPLD_LPC_REG_TACHO7_OFFSET,
18821889
.mask = GENMASK(7, 0),
18831890
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18841891
.bit = BIT(6),
1892+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18851893
},
18861894
{
18871895
.label = "tacho8",
18881896
.reg = MLXPLAT_CPLD_LPC_REG_TACHO8_OFFSET,
18891897
.mask = GENMASK(7, 0),
18901898
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP1_OFFSET,
18911899
.bit = BIT(7),
1900+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18921901
},
18931902
{
18941903
.label = "tacho9",
18951904
.reg = MLXPLAT_CPLD_LPC_REG_TACHO9_OFFSET,
18961905
.mask = GENMASK(7, 0),
18971906
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP2_OFFSET,
18981907
.bit = BIT(0),
1908+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
18991909
},
19001910
{
19011911
.label = "tacho10",
19021912
.reg = MLXPLAT_CPLD_LPC_REG_TACHO10_OFFSET,
19031913
.mask = GENMASK(7, 0),
19041914
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP2_OFFSET,
19051915
.bit = BIT(1),
1916+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
19061917
},
19071918
{
19081919
.label = "tacho11",
19091920
.reg = MLXPLAT_CPLD_LPC_REG_TACHO11_OFFSET,
19101921
.mask = GENMASK(7, 0),
19111922
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP2_OFFSET,
19121923
.bit = BIT(2),
1924+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
19131925
},
19141926
{
19151927
.label = "tacho12",
19161928
.reg = MLXPLAT_CPLD_LPC_REG_TACHO12_OFFSET,
19171929
.mask = GENMASK(7, 0),
19181930
.capability = MLXPLAT_CPLD_LPC_REG_FAN_CAP2_OFFSET,
19191931
.bit = BIT(3),
1932+
.reg_prsnt = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET,
19201933
},
19211934
{
19221935
.label = "conf",

0 commit comments

Comments
 (0)