Skip to content

Commit 6a9b197

Browse files
committed
porting following patches to kernel 4.9.30 (sonic-net#6)
- support sff-8436 - add intel ismt delay param - add pca954x force deselect - support max6620 - support dni dps460 - add config for s6000, z9100 and s9100
1 parent 5a72b3a commit 6a9b197

14 files changed

Lines changed: 424 additions & 158 deletions

patch/0010-config-mellanox-configuration.patch

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
From c951dd6c826de2dbcb1d239743448bb56753ef96 Mon Sep 17 00:00:00 2001
2+
23
From: root <[email protected]>
3-
Date: Mon, 27 Nov 2017 15:53:20 +0200
4+
45
Subject: [v4.9 backport 10/10] config: mellanox configuration
56

67
It adds the next configuration flags, used by Mellanox systems:
@@ -31,11 +32,11 @@ CONFIG_MAX1363=y
3132

3233
Signed-off-by: Vadim Pastrenak <[email protected]>
3334
---
34-
debian/build/build_amd64_none_amd64/.config | 28 +++++++++++++++++++++++-----
35-
1 file changed, 23 insertions(+), 5 deletions(-)
35+
debian/build/build_amd64_none_amd64/.config | 39 ++++++++++++++++++++++++---
36+
1 file changed, 34 insertions(+), 5 deletions(-)
3637

3738
diff --git a/debian/build/build_amd64_none_amd64/.config b/debian/build/build_amd64_none_amd64/.config
38-
index 88a71ef..f1930a1 100644
39+
index 88a71ef..e927c8d 100644
3940
--- a/debian/build/build_amd64_none_amd64/.config
4041
+++ b/debian/build/build_amd64_none_amd64/.config
4142
@@ -2632,7 +2632,13 @@ CONFIG_MLX4_DEBUG=y
@@ -58,7 +59,7 @@ index 88a71ef..f1930a1 100644
5859
# CONFIG_I2C_MUX_PCA954x is not set
5960
# CONFIG_I2C_MUX_PINCTRL is not set
6061
-# CONFIG_I2C_MUX_REG is not set
61-
+CONFIG_I2C_MUX_REG=y
62+
+CONFIG_I2C_MUX_REG=m
6263
+CONFIG_I2C_MUX_MLXCPLD=m
6364
CONFIG_I2C_HELPER_AUTO=y
6465
CONFIG_I2C_SMBUS=m
@@ -76,34 +77,34 @@ index 88a71ef..f1930a1 100644
7677
CONFIG_SENSORS_IBMAEM=m
7778
CONFIG_SENSORS_IBMPEX=m
7879
-# CONFIG_SENSORS_IIO_HWMON is not set
79-
+CONFIG_SENSORS_IIO_HWMON=y
80+
+CONFIG_SENSORS_IIO_HWMON=m
8081
CONFIG_SENSORS_I5500=m
8182
CONFIG_SENSORS_CORETEMP=m
8283
CONFIG_SENSORS_IT87=m
83-
@@ -3932,7 +3949,21 @@ CONFIG_SENSORS_NCT6775=m
84+
@@ -3932,7 +3940,21 @@ CONFIG_SENSORS_NCT6775=m
8485
# CONFIG_SENSORS_NCT7802 is not set
8586
# CONFIG_SENSORS_NCT7904 is not set
8687
CONFIG_SENSORS_PCF8591=m
8788
-# CONFIG_PMBUS is not set
8889
+CONFIG_PMBUS=m
8990
+CONFIG_SENSORS_PMBUS=m
90-
+CONFIG_SENSORS_LM25066=m
91-
+CONFIG_SENSORS_TPS53679=m
92-
+CONFIG_SENSORS_UCD9000=m
93-
+CONFIG_SENSORS_UCD9200=m
9491
+# CONFIG_SENSORS_ADM1275 is not set
92+
+CONFIG_SENSORS_LM25066=m
9593
+# CONFIG_SENSORS_LTC2978 is not set
9694
+# CONFIG_SENSORS_LTC3815 is not set
9795
+# CONFIG_SENSORS_MAX16064 is not set
9896
+# CONFIG_SENSORS_MAX20751 is not set
9997
+# CONFIG_SENSORS_MAX34440 is not set
10098
+# CONFIG_SENSORS_MAX8688 is not set
10199
+# CONFIG_SENSORS_TPS40422 is not set
100+
+CONFIG_SENSORS_TPS53679=m
101+
+CONFIG_SENSORS_UCD9000=m
102+
+CONFIG_SENSORS_UCD9200=m
102103
+# CONFIG_SENSORS_ZL6100 is not set
103104
# CONFIG_SENSORS_SHT15 is not set
104105
CONFIG_SENSORS_SHT21=m
105106
# CONFIG_SENSORS_SHT3x is not set
106-
@@ -5904,6 +5919,9 @@ CONFIG_LEDS_MENF21BMC=m
107+
@@ -5904,6 +5926,9 @@ CONFIG_LEDS_MENF21BMC=m
107108
#
108109
# CONFIG_LEDS_BLINKM is not set
109110
# CONFIG_LEDS_MLXCPLD is not set
@@ -113,7 +114,7 @@ index 88a71ef..f1930a1 100644
113114

114115
#
115116
# LED Triggers
116-
@@ -6483,10 +6497,14 @@ CONFIG_PVPANIC=m
117+
@@ -6483,10 +6508,14 @@ CONFIG_PVPANIC=m
117118
CONFIG_INTEL_PMC_IPC=m
118119
CONFIG_SURFACE_PRO3_BUTTON=m
119120
# CONFIG_INTEL_PUNIT_IPC is not set
@@ -128,15 +129,12 @@ index 88a71ef..f1930a1 100644
128129
CONFIG_CLKDEV_LOOKUP=y
129130
CONFIG_HAVE_CLK_PREPARE=y
130131
CONFIG_COMMON_CLK=y
131-
@@ -6621,7 +6639,7 @@ CONFIG_MMA9553=m
132+
@@ -6621,7 +6650,7 @@ CONFIG_MMA9553=m
132133
# CONFIG_INA2XX_ADC is not set
133134
# CONFIG_LTC2485 is not set
134135
# CONFIG_MAX1027 is not set
135136
-# CONFIG_MAX1363 is not set
136-
+CONFIG_MAX1363=y
137+
+CONFIG_MAX1363=m
137138
# CONFIG_MCP320X is not set
138139
# CONFIG_MCP3422 is not set
139140
# CONFIG_NAU7802 is not set
140-
--
141-
2.11.0
142-

patch/config-dell-s6000.patch

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ CONFIG_GPIO_SCH=m
2121
CONFIG_X86_PAT is not set
2222
CONFIG_STRICT_DEVMEM is not set
2323
---
24-
debian/build/build_amd64_none_amd64/.config | 26 +++++++++++++++++++-------
25-
1 file changed, 19 insertions(+), 7 deletions(-)
24+
debian/build/build_amd64_none_amd64/.config | 13 +++++++------
25+
1 file changed, 7 insertions(+), 6 deletions(-)
2626

2727
diff --git a/debian/build/build_amd64_none_amd64/.config b/debian/build/build_amd64_none_amd64/.config
28-
index c0b11a1..c63bdf3 100644
28+
index e927c8d..74d6692 100644
2929
--- a/debian/build/build_amd64_none_amd64/.config
3030
+++ b/debian/build/build_amd64_none_amd64/.config
31-
@@ -511,8 +511,7 @@ CONFIG_MTRR=y
31+
@@ -580,8 +580,7 @@ CONFIG_MTRR=y
3232
CONFIG_MTRR_SANITIZER=y
3333
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
3434
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
@@ -37,16 +37,16 @@ index c0b11a1..c63bdf3 100644
3737
+# CONFIG_X86_PAT is not set
3838
CONFIG_ARCH_RANDOM=y
3939
CONFIG_X86_SMAP=y
40-
CONFIG_EFI=y
41-
@@ -1788,6 +1787,7 @@ CONFIG_EEPROM_LEGACY=m
40+
CONFIG_X86_INTEL_MPX=y
41+
@@ -2036,6 +2035,7 @@ CONFIG_EEPROM_LEGACY=m
4242
CONFIG_EEPROM_MAX6875=m
4343
CONFIG_EEPROM_93CX6=m
4444
# CONFIG_EEPROM_93XX46 is not set
4545
+CONFIG_EEPROM_SFF_8436=m
4646
CONFIG_CB710_CORE=m
4747
# CONFIG_CB710_DEBUG is not set
4848
CONFIG_CB710_DEBUG_ASSUMPTIONS=y
49-
@@ -3144,7 +3144,7 @@ CONFIG_I2C_MUX=m
49+
@@ -3567,7 +3567,7 @@ CONFIG_I2C_MUX=m
5050
#
5151
# Multiplexer I2C Chip support
5252
#
@@ -55,57 +55,37 @@ index c0b11a1..c63bdf3 100644
5555
# CONFIG_I2C_MUX_PCA9541 is not set
5656
# CONFIG_I2C_MUX_PCA954x is not set
5757
# CONFIG_I2C_MUX_PINCTRL is not set
58-
@@ -3285,7 +3285,7 @@ CONFIG_GPIOLIB=y
59-
CONFIG_GPIO_DEVRES=y
60-
CONFIG_GPIO_ACPI=y
61-
# CONFIG_DEBUG_GPIO is not set
62-
-# CONFIG_GPIO_SYSFS is not set
63-
+CONFIG_GPIO_SYSFS=y
64-
58+
@@ -3743,7 +3743,7 @@ CONFIG_GPIO_AMDPT=m
6559
#
66-
# Memory mapped GPIO drivers:
67-
@@ -3294,7 +3294,7 @@ CONFIG_GPIO_ACPI=y
68-
# CONFIG_GPIO_IT8761E is not set
6960
# CONFIG_GPIO_F7188X is not set
70-
# CONFIG_GPIO_SCH311X is not set
61+
# CONFIG_GPIO_IT87 is not set
7162
-# CONFIG_GPIO_SCH is not set
7263
+CONFIG_GPIO_SCH=m
73-
# CONFIG_GPIO_ICH is not set
74-
# CONFIG_GPIO_VX855 is not set
75-
# CONFIG_GPIO_LYNXPOINT is not set
76-
@@ -3454,6 +3454,7 @@ CONFIG_SENSORS_MAX1668=m
64+
# CONFIG_GPIO_SCH311X is not set
65+
66+
#
67+
@@ -3911,6 +3911,7 @@ CONFIG_SENSORS_MAX1668=m
7768
CONFIG_SENSORS_MAX6639=m
7869
CONFIG_SENSORS_MAX6642=m
7970
CONFIG_SENSORS_MAX6650=m
8071
+CONFIG_SENSORS_MAX6620=m
8172
# CONFIG_SENSORS_MAX6697 is not set
82-
# CONFIG_SENSORS_HTU21 is not set
73+
# CONFIG_SENSORS_MAX31790 is not set
8374
# CONFIG_SENSORS_MCP3021 is not set
84-
@@ -3480,7 +3481,18 @@ CONFIG_SENSORS_NTC_THERMISTOR=m
85-
CONFIG_SENSORS_NCT6683=m
86-
CONFIG_SENSORS_NCT6775=m
87-
CONFIG_SENSORS_PCF8591=m
88-
-# CONFIG_PMBUS is not set
89-
+CONFIG_PMBUS=m
90-
+CONFIG_SENSORS_PMBUS=m
91-
+# CONFIG_SENSORS_ADM1275 is not set
92-
+# CONFIG_SENSORS_LM25066 is not set
93-
+# CONFIG_SENSORS_LTC2978 is not set
94-
+# CONFIG_SENSORS_MAX16064 is not set
95-
+# CONFIG_SENSORS_MAX34440 is not set
75+
@@ -3949,6 +3950,7 @@ CONFIG_SENSORS_LM25066=m
76+
# CONFIG_SENSORS_MAX16064 is not set
77+
# CONFIG_SENSORS_MAX20751 is not set
78+
# CONFIG_SENSORS_MAX34440 is not set
9679
+CONFIG_SENSORS_DNI_DPS460=m
97-
+# CONFIG_SENSORS_MAX8688 is not set
98-
+# CONFIG_SENSORS_UCD9000 is not set
99-
+# CONFIG_SENSORS_UCD9200 is not set
100-
+# CONFIG_SENSORS_ZL6100 is not set
101-
# CONFIG_SENSORS_SHT15 is not set
102-
CONFIG_SENSORS_SHT21=m
103-
# CONFIG_SENSORS_SHTC1 is not set
104-
@@ -6479,7 +6491,7 @@ CONFIG_FTRACE_MCOUNT_RECORD=y
105-
# CONFIG_SAMPLES is not set
106-
CONFIG_HAVE_ARCH_KGDB=y
107-
# CONFIG_KGDB is not set
80+
# CONFIG_SENSORS_MAX8688 is not set
81+
# CONFIG_SENSORS_TPS40422 is not set
82+
CONFIG_SENSORS_TPS53679=m
83+
@@ -7536,8 +7538,7 @@ CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
84+
# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set
85+
# CONFIG_UBSAN is not set
86+
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
10887
-CONFIG_STRICT_DEVMEM=y
88+
-CONFIG_IO_STRICT_DEVMEM=y
10989
+# CONFIG_STRICT_DEVMEM is not set
11090
# CONFIG_X86_VERBOSE_BOOTUP is not set
11191
CONFIG_EARLY_PRINTK=y

patch/config-dell-z9100.patch

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1+
enable I2C_MUX_PCA954x for Dell Z9100
2+
3+
From: Guohan Lu <[email protected]>
4+
5+
6+
---
7+
debian/build/build_amd64_none_amd64/.config | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
110
diff --git a/debian/build/build_amd64_none_amd64/.config b/debian/build/build_amd64_none_amd64/.config
2-
index b22d55f..a57510b 100644
11+
index 74d6692..6e78364 100644
312
--- a/debian/build/build_amd64_none_amd64/.config
413
+++ b/debian/build/build_amd64_none_amd64/.config
5-
@@ -3146,7 +3146,7 @@ CONFIG_I2C_MUX=m
14+
@@ -3569,7 +3569,7 @@ CONFIG_I2C_MUX=m
615
#
716
CONFIG_I2C_MUX_GPIO=m
817
# CONFIG_I2C_MUX_PCA9541 is not set
918
-# CONFIG_I2C_MUX_PCA954x is not set
1019
+CONFIG_I2C_MUX_PCA954x=m
1120
# CONFIG_I2C_MUX_PINCTRL is not set
12-
CONFIG_I2C_HELPER_AUTO=y
13-
CONFIG_I2C_SMBUS=m
21+
CONFIG_I2C_MUX_REG=m
22+
CONFIG_I2C_MUX_MLXCPLD=m

patch/config-ingrasys-s9100.patch

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,30 @@ Enable CONFIG_GPIO_PCA953X, CONFIG_I2C_GPIO
22

33
From: wadelnn <[email protected]>
44

5+
56
---
6-
debian/build/build_amd64_none_amd64/.config | 4 ++--
7+
debian/build/build_amd64_none_amd64/.config | 4 ++--
78
1 file changed, 2 insertions(+), 2 deletions(-)
89

910
diff --git a/debian/build/build_amd64_none_amd64/.config b/debian/build/build_amd64_none_amd64/.config
10-
index a57510b..6b6aea9 100644
11+
index 01f96e7..f92e015 100644
1112
--- a/debian/build/build_amd64_none_amd64/.config
1213
+++ b/debian/build/build_amd64_none_amd64/.config
13-
@@ -3190,7 +3190,7 @@ CONFIG_I2C_SCMI=m
14-
CONFIG_I2C_DESIGNWARE_CORE=m
15-
CONFIG_I2C_DESIGNWARE_PLATFORM=m
14+
@@ -3617,7 +3617,7 @@ CONFIG_I2C_DESIGNWARE_PLATFORM=m
1615
CONFIG_I2C_DESIGNWARE_PCI=m
16+
# CONFIG_I2C_DESIGNWARE_BAYTRAIL is not set
17+
# CONFIG_I2C_EMEV2 is not set
1718
-# CONFIG_I2C_GPIO is not set
1819
+CONFIG_I2C_GPIO=m
1920
CONFIG_I2C_KEMPLD=m
2021
CONFIG_I2C_OCORES=m
2122
CONFIG_I2C_PCA_PLATFORM=m
22-
@@ -3304,7 +3304,7 @@ CONFIG_GPIO_SCH=m
23-
#
23+
@@ -3752,7 +3752,7 @@ CONFIG_GPIO_SCH=m
24+
# CONFIG_GPIO_ADP5588 is not set
2425
# CONFIG_GPIO_MAX7300 is not set
2526
# CONFIG_GPIO_MAX732X is not set
2627
-# CONFIG_GPIO_PCA953X is not set
2728
+CONFIG_GPIO_PCA953X=m
2829
# CONFIG_GPIO_PCF857X is not set
29-
# CONFIG_GPIO_ADP5588 is not set
30-
31-
--
32-
2.1.4
33-
30+
# CONFIG_GPIO_SX150X is not set
31+
# CONFIG_GPIO_TPIC2810 is not set

patch/driver-hwmon-max6620.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ From: Cumulus Networks <[email protected]>
1111
create mode 100644 drivers/hwmon/max6620.c
1212

1313
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
14-
index 02d3d85..ca38e05 100644
14+
index 45cef3d..62d3be7 100644
1515
--- a/drivers/hwmon/Kconfig
1616
+++ b/drivers/hwmon/Kconfig
17-
@@ -784,6 +784,16 @@ config SENSORS_MAX6650
17+
@@ -875,6 +875,16 @@ config SENSORS_MAX6650
1818
This driver can also be built as a module. If so, the module
1919
will be called max6650.
2020

@@ -32,17 +32,17 @@ index 02d3d85..ca38e05 100644
3232
tristate "Maxim MAX6697 and compatibles"
3333
depends on I2C
3434
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
35-
index 3dc0f02..8837a7b 100644
35+
index aecf4ba..348bb1d 100644
3636
--- a/drivers/hwmon/Makefile
3737
+++ b/drivers/hwmon/Makefile
38-
@@ -111,6 +111,7 @@ obj-$(CONFIG_SENSORS_MAX197) += max197.o
38+
@@ -118,6 +118,7 @@ obj-$(CONFIG_SENSORS_MAX31722) += max31722.o
3939
obj-$(CONFIG_SENSORS_MAX6639) += max6639.o
4040
obj-$(CONFIG_SENSORS_MAX6642) += max6642.o
4141
obj-$(CONFIG_SENSORS_MAX6650) += max6650.o
4242
+obj-$(CONFIG_SENSORS_MAX6620) += max6620.o
4343
obj-$(CONFIG_SENSORS_MAX6697) += max6697.o
44+
obj-$(CONFIG_SENSORS_MAX31790) += max31790.o
4445
obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o
45-
obj-$(CONFIG_SENSORS_MCP3021) += mcp3021.o
4646
diff --git a/drivers/hwmon/max6620.c b/drivers/hwmon/max6620.c
4747
new file mode 100644
4848
index 0000000..3c337c7

patch/driver-hwmon-pmbus-dni_dps460-update-pmbus-core.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Update this data structure to meet current kernel (3.16.x) implementation.
1010
1 file changed, 17 insertions(+), 25 deletions(-)
1111

1212
diff --git a/drivers/hwmon/pmbus/dni_dps460.c b/drivers/hwmon/pmbus/dni_dps460.c
13-
index c687217..1607b65 100644
13+
index ad29134..7332480 100644
1414
--- a/drivers/hwmon/pmbus/dni_dps460.c
1515
+++ b/drivers/hwmon/pmbus/dni_dps460.c
1616
@@ -39,41 +39,32 @@ enum chips { dni_dps460 };

patch/driver-hwmon-pmbus-dni_dps460.patch

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ From: Cumulus Networks <[email protected]>
1111
create mode 100644 drivers/hwmon/pmbus/dni_dps460.c
1212

1313
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
14-
index ec48945..7d3b1aa 100644
14+
index 61938ea..8c39a51 100644
1515
--- a/drivers/hwmon/pmbus/Kconfig
1616
+++ b/drivers/hwmon/pmbus/Kconfig
17-
@@ -77,6 +77,16 @@ config SENSORS_MAX34440
17+
@@ -105,6 +105,16 @@ config SENSORS_MAX34440
1818
This driver can also be built as a module. If so, the module will
1919
be called max34440.
2020

@@ -32,20 +32,20 @@ index ec48945..7d3b1aa 100644
3232
tristate "Maxim MAX8688"
3333
default n
3434
diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
35-
index 5e6c316..767d086 100644
35+
index b912fec..0624729 100644
3636
--- a/drivers/hwmon/pmbus/Makefile
3737
+++ b/drivers/hwmon/pmbus/Makefile
38-
@@ -9,6 +9,7 @@ obj-$(CONFIG_SENSORS_LM25066) += lm25066.o
39-
obj-$(CONFIG_SENSORS_LTC2978) += ltc2978.o
38+
@@ -11,6 +11,7 @@ obj-$(CONFIG_SENSORS_LTC3815) += ltc3815.o
4039
obj-$(CONFIG_SENSORS_MAX16064) += max16064.o
40+
obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
4141
obj-$(CONFIG_SENSORS_MAX34440) += max34440.o
4242
+obj-$(CONFIG_SENSORS_DNI_DPS460) += dni_dps460.o
4343
obj-$(CONFIG_SENSORS_MAX8688) += max8688.o
44-
obj-$(CONFIG_SENSORS_UCD9000) += ucd9000.o
45-
obj-$(CONFIG_SENSORS_UCD9200) += ucd9200.o
44+
obj-$(CONFIG_SENSORS_TPS40422) += tps40422.o
45+
obj-$(CONFIG_SENSORS_TPS53679) += tps53679.o
4646
diff --git a/drivers/hwmon/pmbus/dni_dps460.c b/drivers/hwmon/pmbus/dni_dps460.c
4747
new file mode 100644
48-
index 0000000..c687217
48+
index 0000000..ad29134
4949
--- /dev/null
5050
+++ b/drivers/hwmon/pmbus/dni_dps460.c
5151
@@ -0,0 +1,253 @@
@@ -209,7 +209,7 @@ index 0000000..c687217
209209
+ long val;
210210
+ int err;
211211
+
212-
+ err = strict_strtol(buf, 10, &val);
212+
+ err = kstrtol(buf, 10, &val);
213213
+ if (err < 0)
214214
+ return err;
215215
+

0 commit comments

Comments
 (0)