Skip to contentSkip to conversation

platform/x86: Add Silicom Platform Driver

PATCH Superseded Henry Shi 4 participants 8 messages Nov 13, 2023 – Nov 16, 2023

Subsystems (2)

v12 of 15 Superseded Latest is v15 →

lore
Share & tools
lore

Henry Shi

author
#0 lore raw

PATCH v12 1/1 platform/x86: Add Silicom Platform Driver

platform/x86: Add Silicom Platform Driver

Add Silicom platform (silicom-platform) Linux driver for Swisscom Business Box (Swisscom BB) as well as Cordoba family products.

This platform driver provides support for various functions via the Linux LED framework, GPIO framework, Hardware Monitoring (HWMON) and device attributes.

---

Changes from v1 to v2:
===========================

Suggested by Hans de Goede <[email protected]>
.Use git send-email to submit patch.
.patch contents should be in message body.
.Kconfig bit for the driver should be in drivers/platform/x86/Kconfig.

changes from patch v2 to v3
===========================

changes suggested by Guenter Roeck <[email protected]> .Removed unnecessary include file linux/thermal.h. .Removed EXPORT_SYMBOL for mutex lock/unlock function.

Changes suggested by Ilpo Järvinen <[email protected]> .Remove extra new line in code on multiple position.
.Use table instead of space in code.
.Uss Linux defined bit operation MACRO define.
.Removed local variable in rpm_get().
.Corrected typo in comments.
.Corrected incorrect indentation.
.Removed unnecessary comments in silicom_mc_leds_register(). .Rewrite efuse_status_show() to used defined variable and removed uncessary local variables.
.Rewrite uc_version_show() to used defined variable and removed uncessary local variables.
.Removed unused MACRO define: #define CHANNEL_TO_BIT(chan) ((chan) & 0x07). .Rewrite powercycle_uc() to used defined variable and removed uncessary local variables.
.use GENMASK() and use FIELD_GET() instead of bit shift.
.Added define for constant 0x28 used in efuse_status_show(). .Added define for constant 0x0 used in uc_version_show(). .Added define for constant 0x0 used in powercycle_uc(). .Rearrange functions to avoid uncessary pre-define.
.Rewrite rpm_get() to used defined variable and removed uncessary local variables.
.Rewrite temp_get() to used defined variable and removed uncessary local variables.
.Use FIELD_GET instead of bit shift in temp_get().
.Used #define for constant variable 0/1.

Changes suggested by Christophe JAILLET <[email protected]>:
.use "if (!led->subled_info)" instead of
"if (IS_ERR_OR_NULL(led->subled_info))
"in silicom_mc_leds_register

changes from patch v3 to v4
===========================

changes suggested by Guenter Roeck <[email protected]>

Changes suggested by Ilpo Järvinen <[email protected]>:
.Rewrite silicom_mec_led/gpip_set/get() functions to use two newly created silicom_mec_port_get()/silicom_mec_port_set() which have common code. .Remove duplicate code in silicom_mec_port_get()
.Rewrite uc_version_show() to use Linux bit operation MACRO, and add logic to check un-supported register value.
.Added "#define MEC_EFUSE_LSB_ADDR 0x28" and "#define MEC_POWER_CYCLE_ADDR 0x24"
.Added "#define MEC_VERSION_MAJOR GENMASK(15, 14)" and "#define MEC_VERSION_MINOR GENMASK(13, 8)".

Changes suggested by Christophe JAILLET <[email protected]>:
.Used a local variable to store "sizeof(struct mc_subled)" in function silicom_mc_leds_register().

change from patch v4 to v5
===========================================

changes suggested by Guenter Roeck <[email protected]>:
.Corrected return value in temp_get() to return 1/10000th degree. .Removed local variable struct silicom_fan_control_data *ctl in silicom_fan_control_read_fan(),
removed storing rpm value to ctl variable.
.Removed local variable struct silicom_fan_control_data *ctl in silicom_fan_control_read_temp(),
.removed storing rpm value to ctl variable.
.Changed return string in silicom_fan_control_read_labels() to specific string for Silicom platform driver.
.Removed silicom_fan_control_data structure.
.Removed static variable mec_io_base and mec_io_len, and added "#define MEC_IO_BASE 0x0800 and #define MEC_IO_LEN 0x8". .Removed ".write = NULL" in silicom_fan_control_hwmon_ops structure defination.
.Removed unnecessary function silicom_fan_control_write(). .Removed unnecessary check for silicom_led_info in function silicom_platform_probe.
.Removed unnecessary local variable "silicom_fan_control_data *ctl" in silicom_platform_probe().
.Clean out driver initialization error handling in silicom_platform_init();
.Add patch version and changelog for patch submission.

Changes suggested by Ilpo Järvinen <[email protected]>:
.Rename "#define MEC_DATA(offset) to "#define MEC_DATA_OFFSET(offset). .Use constant defined in include/linux/units.h instead of a literal. .return directly instead of go to err condition when platform_device_register_simple() failed.
.Remove unnecessary check for silicom_led_info and silicom_gpiochip. .Use a local variable to how multiple use of array size. .Align the arguments to the same column in silicom_mec_led_mc_brightness_set.
.Add patch version and changelog that shows version to version changes for patch submission.

Changes suggested by Christophe JAILLET <[email protected]>:
.Use "sizeof(*led)" instead of "sizeof(struct led_classdev_mc)" .Use "if (!led)" instead of "if (IS_ERR_OR_NULL(led))" .Removed unnecessary error message:
"dev_err(dev, "Failed to alloc led_classdev_mc[%d]:
%ld\n", i, PTR_ERR(led)).

change from patch vv5 to v6
===========================================

changes suggested by Guenter Roeck <[email protected]>:
.Removed checkpath warnings.
.Resoved dependencies between CONFIG_HWMON and CONFIG_SILICOM_PLATFORM.

change from patch v6 to v7
===========================================

changes suggested by Hans de Goede <[email protected]>:
.Usa a proper subsystem prefix for this patch subject:
Subject: platform/x86: Add Silicom Platform Driver.

change from patch v7 to v8
===========================================

changes suggested by Hans de Goede <[email protected]>:
.Chnage commit message of this driver.
.Adjust location of change log and signed-off-by.
.Change "config SILICOM_PLATFORM" and help contents location, and put it to source "drivers/platform/x86/siemens/Kconfig". .Set editor tab to 8 and align the start of extra function parameters to directly after (. This should be applied for all function.
.Do not manually create a sysfs dir and register sysfs attribute, instead define a platform_driver structure.
.Move MODULE_DEVICE_TABLE(dmi, silicom_dmi_ids) directly after table declaration.
.Using pr_info() instead of dev_info() in function silicom_platform_info_init().
.Made dmi_check_system() check the first thing to do in silicom_platform_init().
.Instead of separate platform_device creation + driver registration, switched to using platform_create_bundle().
.Removed mutex_destroy(&mec_io_mutex).

Changes suggested by Ilpo Järvinen <[email protected]>:
.Too many GENMASK() within to code itself, need put them to #define. Removed all GENMASK() in c functions.

change from patch v8 to v9
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
.Just do the same (like MEC_VERSION_MAJOR) with all places in the where you previously had GENMASK() in the code (currently MEC_GET_BITS() is there, obviously, but it should go away and be replaced with FIELD_GET(GOODPREFIX_GOODNAME, ...))).
.This is sysfs so it's odd to print pr_err() like that here. If the driver does not support those versions at all, the probe should fail. If driver is fine but just doesn't know how to interpret such a version, you should return -Esomething here. Driver returns -EINVAL here.
.Replace CENTI with 100
.Align FIELD_GET()s to the same column for line 661.
.Change variables efuse_status, mec_uc_version, power_cycle to unsigned int from int.

changes suggested by Hans de Goede <[email protected]>:
.Please add a Documentation/ABI/testing/sysfs-platform-silicom file to document driver specific the sysfs attributes of this driver. .Like with the Kconfig part, group this together with the other industrial PC drivers we have at the end of the Makefile after Siemens Simatic Industrial PCs.

change from patch v9 to v10
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
.Added missing newline in kernel document file.
.Changed the order #define to make sure they are in increasing order. .Removed printing in init function silicom_platform_info_init(); .Changed #define name MEC_PREFIX_HIGH_BYTES to MEC_TEMPERATURE. .Removed dev_err(dev, "Failed to register[%d]: %d\n", i, err) in function silicom_mc_leds_register() before ruturn err. .Changed %du to %u in function power_cycle_store(...). .Chnaged sprintf() to sysfs_emit().
.Changed start point for multi-line comments.
.Added empty line to seperate #define.
.Remove parenthesis around MEC_IO_BASE.
.Changed #define EC_ADDR_MSB (MEC_IO_BASE + 0x3), use
a constant value instead of MEC_DATA_OFFSET_MASK.
.Changed define name MEC_PREFIX_NAME to MEC_PORT_LOC. .Changed define MEC_PREFIX_HIGH_BYTES to MEC_TEMP_LOC. .Removed "PREFIX" from define name, changed MEC_PREFIX_SEC_BYTE to MEC_VERSION_LOC.

change from patch v10 to v11
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
.Don't print anything when userspace gives an invalid value,
just return -EINVAL in function power_cycle_store().
.The includes should be in alphabethical order.
.Just make the calculation once and store into a local variable in function silicom_mec_port_set().
.Use GENMASK for MEC_PORT_OFFSET_MASK, MEC_PORT_CHANNEL_MASK, MEC_DATA_OFFSET_MASK.
.Rename MEC_PORT_LOC to MEC_PORT_DWORD_OFFSET.
.Add local variable to function silicom_mec_port_set() and silicom_mec_port_get() to make the code less heavy to read. .Allgned defines start from same column mostly.
.Kernel test robot WARNING sys/devices/platform/silicom-platform/hwmon/hwmon1/ is defined 4 times.

change from patch v11 to v12
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
Several editorial things:
.Put the subdir headers separately.
.Add more new line in define section.
.Use () around all macro arguments to be on the safe side. .Add new line and remove comment in function silicom_mec_port_get(). .Add new line and remove comment in function silicom_mec_port_set(). .Remove unnecessary comment in function temp_get(), rpm_get().

 .../ABI/testing/sysfs-platform-silicom        |  262 +++++
 drivers/platform/x86/Kconfig                  |   14 +
 drivers/platform/x86/Makefile                 |    3 +
 drivers/platform/x86/silicom-platform.c       | 1010 +++++++++++++++++
 4 files changed, 1289 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-silicom
 create mode 100644 drivers/platform/x86/silicom-platform.c
Documentation/ABI/testing/sysfs-platform-silicom new file +262 -0
new file mode 100644
index 000000000000..90d69f0f14c1
@@ -0,0 +1,262 @@
+What:		/sys/devices/platform/silicom-platform/uc_version
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file allows to read microcontroller firmware
+		version of current platform.
+
+What:		/sys/devices/platform/silicom-platform/power_cycle
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+		This file allow user to power cycle the platform.
+		default value is 0; when set to 1, it powers down
+		the platform, wait 5 seconds, then power on the
+		device.
+
+What:		/sys/devices/platform/silicom-platform/efuse_status
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns the current
+		OTP status:
+
+		0 - not programmed.
+		1 - programmed.
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/temp1_input
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns the temperature
+		of device.
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/temp1_label
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns "Silicom_platform:
+		Thermostat Sensor".
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/fan1_input
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns current fan
+		speed (RPM).
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/fan1_label
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns "Silicom_platform:
+		Fan Speed".
+
+What:		/sys/class/leds/multicolor:sys/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of system LED brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:sys/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only  file. It returns:
+
+		white amber red
+
+What:		/sys/class/leds/multicolor:sys/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of system LED: First value for
+		color white; Second value for color amber and third value
+		for color red:
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:wan/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of WAN LED brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:wan/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only file. It returns:
+
+		white yellow red
+
+What:		/sys/class/leds/multicolor:wan/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of WAN LED: First value for
+		color white; Second value for color yellow and third value
+		for color red:
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:stat%d/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of device status LED (number %d) brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:stat%d/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only file. It returns:
+
+		red green blue yellow
+
+What:		/sys/class/leds/multicolor:stat%d/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of device status LED (number %d):
+		First value for color red; Second value for color green;
+		Third value for color blue and fourth value for color
+		yellow.
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:fp_left/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of left LED brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:fp_left/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only  file. It returns:
+
+		red green blue amber
+
+What:		/sys/class/leds/multicolor:fp_left/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of left LED: First value for
+		color red; Second value for color green; Third value for
+		color blue and fourth value for color amber.
+		for color red:
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:fp_center/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of left LED brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:fp_center/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only  file. It returns:
+
+		red green blue amber
+
+What:		/sys/class/leds/multicolor:fp_center/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of left LED: First value for
+		color red; Second value for color green; Third value for
+		color blue and fourth value for color amber.
+		for color red:
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:fp_right/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of left LED brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:fp_right/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only  file. It returns:
+
+		red green blue amber
+
+What:		/sys/class/leds/multicolor:fp_right/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of left LED: First value for
+		color red; Second value for color green; Third value for
+		color blue and fourth value for color amber.
+		for color red:
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
drivers/platform/x86/Kconfig +14 -0
index 2a1070543391..f38fbd97f33d 100644
@@ -1076,6 +1076,20 @@ config INTEL_SCU_IPC_UTIL
 
 source "drivers/platform/x86/siemens/Kconfig"
 
+config SILICOM_PLATFORM
+	tristate "Silicom Edge Networking device support"
+	depends on HWMON
+	select LEDS_CLASS_MULTICOLOR
+	help
+	  This option enables support for the LEDs/GPIO/etc downstream of the
+	  embedded controller on Silicom "Cordoba" hardware and derivatives.
+
+	  This platform driver provides support for various functions via
+	  the Linux LED framework, GPIO framework, Hardware Monitoring (HWMON)
+	  and device attributes.
+
+	  If you have a Silicom network appliance, say Y or M here.
+
 config WINMATE_FM07_KEYS
 	tristate "Winmate FM07/FM07P front-panel keys driver"
 	depends on INPUT
drivers/platform/x86/Makefile +3 -0
index b457de5abf7d..8fdb0c7d8ca1 100644
@@ -133,6 +133,9 @@ obj-$(CONFIG_X86_INTEL_LPSS)		+= pmc_atom.o
 # Siemens Simatic Industrial PCs
 obj-$(CONFIG_SIEMENS_SIMATIC_IPC)	+= siemens/
 
+# Silicom
+obj-$(CONFIG_SILICOM_PLATFORM)		+= silicom-platform.o
+
 # Winmate
 obj-$(CONFIG_WINMATE_FM07_KEYS)		+= winmate-fm07-keys.o
 
drivers/platform/x86/silicom-platform.c new file +1010 -0

1,010 lines not on this page · raw message

Signature · 1 line
2.21.3
#1 lore raw
Quoted 11 lines · Henry Shi

platform/x86: Add Silicom Platform Driver

Add Silicom platform (silicom-platform) Linux driver for Swisscom Business Box (Swisscom BB) as well as Cordoba family products.

This platform driver provides support for various functions via the Linux LED framework, GPIO framework, Hardware Monitoring (HWMON) and device attributes.

---

Hi,

An x86_64 defconfig + this driver enabled gives me:

ld: vmlinux.o: in function `silicom_gpio_get':
silicom-platform.c:(.text+0xae6639): undefined reference to `gpiochip_get_data'
ld: vmlinux.o: in function `silicom_gpio_get_direction':
silicom-platform.c:(.text+0xae66a8): undefined reference to `gpiochip_get_data'
ld: vmlinux.o: in function `silicom_gpio_direction_input':
silicom-platform.c:(.text+0xae6888): undefined reference to `gpiochip_get_data'
ld: vmlinux.o: in function `silicom_gpio_set':
silicom-platform.c:(.text+0xae68d3): undefined reference to `gpiochip_get_data'
ld: silicom-platform.c:(.text+0xae68de): undefined reference to `gpiochip_get_data'
ld: vmlinux.o:silicom-platform.c:(.text+0xae69a1): more undefined references to `gpiochip_get_data' follow
ld: vmlinux.o: in function `silicom_platform_probe':
silicom-platform.c:(.init.text+0x656b7): undefined reference to `devm_gpiochip_add_data_with_key'

Signature · 1 line
~Randy
#2 lore raw
Quoted 20 lines · Randy Dunlap
Quoted 11 lines · Henry Shi

platform/x86: Add Silicom Platform Driver

Add Silicom platform (silicom-platform) Linux driver for Swisscom Business Box (Swisscom BB) as well as Cordoba family products.

This platform driver provides support for various functions via the Linux LED framework, GPIO framework, Hardware Monitoring (HWMON) and device attributes.

---

Hi,

An x86_64 defconfig + this driver enabled gives me:

Quoted 12 lines

ld: vmlinux.o: in function `silicom_gpio_get':
silicom-platform.c:(.text+0xae6639): undefined reference to `gpiochip_get_data'
ld: vmlinux.o: in function `silicom_gpio_get_direction':
silicom-platform.c:(.text+0xae66a8): undefined reference to `gpiochip_get_data'
ld: vmlinux.o: in function `silicom_gpio_direction_input':
silicom-platform.c:(.text+0xae6888): undefined reference to `gpiochip_get_data'
ld: vmlinux.o: in function `silicom_gpio_set':
silicom-platform.c:(.text+0xae68d3): undefined reference to `gpiochip_get_data'
ld: silicom-platform.c:(.text+0xae68de): undefined reference to `gpiochip_get_data'
ld: vmlinux.o:silicom-platform.c:(.text+0xae69a1): more undefined references to `gpiochip_get_data' follow
ld: vmlinux.o: in function `silicom_platform_probe':
silicom-platform.c:(.init.text+0x656b7): undefined reference to `devm_gpiochip_add_data_with_key'

so add
depends on GPIOLIB
for this driver.

Signature · 1 line
~Randy
#3 lore raw
In reply to Henry Shi

Hi,
Please see comments inline.

Quoted 5 lines · Henry Shi

platform/x86: Add Silicom Platform Driver

Add Silicom platform (silicom-platform) Linux driver for Swisscom Business Box (Swisscom BB) as well as Cordoba family products.

Quoted 7 lines

This platform driver provides support for various functions via the Linux LED framework, GPIO framework, Hardware Monitoring (HWMON) and device attributes.

---

[detailed changelog]

Quoted 30 lines

change from patch v11 to v12
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
Several editorial things:
.Put the subdir headers separately.
.Add more new line in define section.
.Use () around all macro arguments to be on the safe side. .Add new line and remove comment in function silicom_mec_port_get(). .Add new line and remove comment in function silicom_mec_port_set(). .Remove unnecessary comment in function temp_get(), rpm_get().

 .../ABI/testing/sysfs-platform-silicom        |  262 +++++
 drivers/platform/x86/Kconfig                  |   14 +
 drivers/platform/x86/Makefile                 |    3 +
 drivers/platform/x86/silicom-platform.c       | 1010 +++++++++++++++++
 4 files changed, 1289 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-silicom
 create mode 100644 drivers/platform/x86/silicom-platform.c
Documentation/ABI/testing/sysfs-platform-silicom new file +4 -0
new file mode 100644
index 000000000000..90d69f0f14c1
@@ -0,0 +1,262 @@
+What:		/sys/devices/platform/silicom-platform/uc_version
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>

Documentation/ABI/testing/sysfs-platform-silicom line 14

Quoted 10 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +10 -0
+Description:
+		This file allows to read microcontroller firmware
+		version of current platform.
+
+What:		/sys/devices/platform/silicom-platform/power_cycle
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+		This file allow user to power cycle the platform.
+		default value is 0; when set to 1, it powers down

Default

Documentation/ABI/testing/sysfs-platform-silicom line 15

Quoted 1 line
Documentation/ABI/testing/sysfs-platform-silicom new file +1 -0
+		the platform, wait 5 seconds, then power on the

powers

Quoted 10 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +10 -0
+		device.
+
+What:		/sys/devices/platform/silicom-platform/efuse_status
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns the current
+		OTP status:
+

Documentation/ABI/testing/sysfs-platform-silicom line 35

Quoted 10 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +10 -0
+		0 - not programmed.
+		1 - programmed.
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/temp1_input
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns the temperature
+		of device.

on what scale? in what units?

Quoted 43 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +43 -0
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/temp1_label
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns "Silicom_platform:
+		Thermostat Sensor".
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/fan1_input
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns current fan
+		speed (RPM).
+
+What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/fan1_label
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This file is read only. It returns "Silicom_platform:
+		Fan Speed".
+
+What:		/sys/class/leds/multicolor:sys/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of system LED brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:sys/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only  file. It returns:
+

Documentation/ABI/testing/sysfs-platform-silicom line 88

Quoted 10 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +10 -0
+		white amber red
+
+What:		/sys/class/leds/multicolor:sys/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of system LED: First value for
+		color white; Second value for color amber and third value

color white,

Quoted 23 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +23 -0
+		for color red:
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:wan/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of WAN LED brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:wan/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only file. It returns:
+

Documentation/ABI/testing/sysfs-platform-silicom line 121

Quoted 10 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +10 -0
+		white yellow red
+
+What:		/sys/class/leds/multicolor:wan/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of WAN LED: First value for
+		color white; Second value for color yellow and third value

color white,

Quoted 46 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +46 -0
+		for color red:
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:stat%d/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of device status LED (number %d) brightness:
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:stat%d/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only file. It returns:
+
+		red green blue yellow
+
+What:		/sys/class/leds/multicolor:stat%d/multi_intensity
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		multi-color intensity of device status LED (number %d):
+		First value for color red; Second value for color green;
+		Third value for color blue and fourth value for color
+		yellow.
+
+		0 - The color is turned off.
+		1 - the color is turned on.
+
+What:		/sys/class/leds/multicolor:fp_left/brightness
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read/write file. It is used to read/set current
+		status of left LED brightness:

Documentation/ABI/testing/sysfs-platform-silicom line 177

Quoted 10 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +10 -0
+
+		0 - to turn off the LED
+		1 - to turn on the LED
+
+What:		/sys/class/leds/multicolor:fp_left/multi_index
+Date:		October 2023
+KernelVersion:	6.6
+Contact:	Henry Shi <[email protected]>
+Description:
+		This is a read only  file. It returns:

Drop one space ^^^^^^^^

Documentation/ABI/testing/sysfs-platform-silicom line 180

Quoted 3 lines
Documentation/ABI/testing/sysfs-platform-silicom new file +3 -0
+
+		red green blue amber
+

[]

Quoted 30 lines
drivers/platform/x86/silicom-platform.c new file +24 -0
new file mode 100644
index 000000000000..659fce6584f0
@@ -0,0 +1,1010 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// silicom-platform.c - Silicom MEC170x platform driver
+//
+// Copyright (C) 2023 Henry Shi <[email protected]>
+#include <linux/bitfield.h>
+#include <linux/bits.h>
+#include <linux/dmi.h>
+#include <linux/hwmon.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/kobject.h>
+#include <linux/led-class-multicolor.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
+#include <linux/string.h>
+#include <linux/sysfs.h>
+#include <linux/units.h>
+
+#include <linux/gpio/driver.h>
+

drivers/platform/x86/silicom-platform.c line 34

Quoted 10 lines
drivers/platform/x86/silicom-platform.c new file +10 -0
+#define MEC_POWER_CYCLE_ADDR 0x24
+#define MEC_EFUSE_LSB_ADDR   0x28
+#define MEC_GPIO_IN_POS      0x08
+#define MEC_IO_BASE          0x0800
+#define MEC_IO_LEN           0x8
+#define IO_REG_BANK          0x0
+#define DEFAULT_CHAN_LO      0
+#define DEFAULT_CHAN_HI      0
+#define DEFAULT_CHAN_LO_T    0xc
+#define MEC_ADDR             ((MEC_IO_BASE) + 0x02)

Extra parens around MEC_IO_BASE are not needed.

[]

drivers/platform/x86/silicom-platform.c line 48

Quoted 2 lines
drivers/platform/x86/silicom-platform.c new file +2 -0
+
+#define EC_ADDR_MSB           ((MEC_IO_BASE) + 0x3)

Ditto.

drivers/platform/x86/silicom-platform.c line 49

Quoted 1 line
drivers/platform/x86/silicom-platform.c new file +1 -0
+#define MEC_DATA_OFFSET(offset) ((MEC_IO_BASE) + 0x04 + offset)

Ditto.

[]

drivers/platform/x86/silicom-platform.c line 223

Quoted 10 lines
drivers/platform/x86/silicom-platform.c new file +10 -0
+static void silicom_mec_led_mc_brightness_set(struct led_classdev *led_cdev,
+					      enum led_brightness brightness)
+{
+	struct led_classdev_mc *mc_cdev = lcdev_to_mccdev(led_cdev);
+	int i;
+
+	led_mc_calc_color_components(mc_cdev, brightness);
+	for (i = 0; i < mc_cdev->num_colors; i++) {
+		silicom_mec_port_set(mc_cdev->subled_info[i].channel,
+		mc_cdev->subled_info[i].brightness);

Add more indentation on the line above.

drivers/platform/x86/silicom-platform.c line 49

Quoted 2 lines
drivers/platform/x86/silicom-platform.c new file +2 -0
+	}
+}

[]

Signature · 1 line
~Randy
maintainer
#4 lore raw
In reply to Henry Shi
Quoted 245 lines · Henry Shi

platform/x86: Add Silicom Platform Driver

Add Silicom platform (silicom-platform) Linux driver for Swisscom Business Box (Swisscom BB) as well as Cordoba family products.

This platform driver provides support for various functions via the Linux LED framework, GPIO framework, Hardware Monitoring (HWMON) and device attributes.

---

Changes from v1 to v2:
===========================

Suggested by Hans de Goede <[email protected]>
.Use git send-email to submit patch.
.patch contents should be in message body.
.Kconfig bit for the driver should be in drivers/platform/x86/Kconfig.

changes from patch v2 to v3
===========================

changes suggested by Guenter Roeck <[email protected]> .Removed unnecessary include file linux/thermal.h. .Removed EXPORT_SYMBOL for mutex lock/unlock function.

Changes suggested by Ilpo Järvinen <[email protected]> .Remove extra new line in code on multiple position.
.Use table instead of space in code.
.Uss Linux defined bit operation MACRO define.
.Removed local variable in rpm_get().
.Corrected typo in comments.
.Corrected incorrect indentation.
.Removed unnecessary comments in silicom_mc_leds_register(). .Rewrite efuse_status_show() to used defined variable and removed uncessary local variables.
.Rewrite uc_version_show() to used defined variable and removed uncessary local variables.
.Removed unused MACRO define: #define CHANNEL_TO_BIT(chan) ((chan) & 0x07). .Rewrite powercycle_uc() to used defined variable and removed uncessary local variables.
.use GENMASK() and use FIELD_GET() instead of bit shift.
.Added define for constant 0x28 used in efuse_status_show(). .Added define for constant 0x0 used in uc_version_show(). .Added define for constant 0x0 used in powercycle_uc(). .Rearrange functions to avoid uncessary pre-define.
.Rewrite rpm_get() to used defined variable and removed uncessary local variables.
.Rewrite temp_get() to used defined variable and removed uncessary local variables.
.Use FIELD_GET instead of bit shift in temp_get().
.Used #define for constant variable 0/1.

Changes suggested by Christophe JAILLET <[email protected]>:
.use "if (!led->subled_info)" instead of
"if (IS_ERR_OR_NULL(led->subled_info))
"in silicom_mc_leds_register

changes from patch v3 to v4
===========================

changes suggested by Guenter Roeck <[email protected]>

Changes suggested by Ilpo Järvinen <[email protected]>:
.Rewrite silicom_mec_led/gpip_set/get() functions to use two newly created silicom_mec_port_get()/silicom_mec_port_set() which have common code. .Remove duplicate code in silicom_mec_port_get()
.Rewrite uc_version_show() to use Linux bit operation MACRO, and add logic to check un-supported register value.
.Added "#define MEC_EFUSE_LSB_ADDR 0x28" and "#define MEC_POWER_CYCLE_ADDR 0x24"
.Added "#define MEC_VERSION_MAJOR GENMASK(15, 14)" and "#define MEC_VERSION_MINOR GENMASK(13, 8)".

Changes suggested by Christophe JAILLET <[email protected]>:
.Used a local variable to store "sizeof(struct mc_subled)" in function silicom_mc_leds_register().

change from patch v4 to v5
===========================================

changes suggested by Guenter Roeck <[email protected]>:
.Corrected return value in temp_get() to return 1/10000th degree. .Removed local variable struct silicom_fan_control_data *ctl in silicom_fan_control_read_fan(),
removed storing rpm value to ctl variable.
.Removed local variable struct silicom_fan_control_data *ctl in silicom_fan_control_read_temp(),
.removed storing rpm value to ctl variable.
.Changed return string in silicom_fan_control_read_labels() to specific string for Silicom platform driver.
.Removed silicom_fan_control_data structure.
.Removed static variable mec_io_base and mec_io_len, and added "#define MEC_IO_BASE 0x0800 and #define MEC_IO_LEN 0x8". .Removed ".write = NULL" in silicom_fan_control_hwmon_ops structure defination.
.Removed unnecessary function silicom_fan_control_write(). .Removed unnecessary check for silicom_led_info in function silicom_platform_probe.
.Removed unnecessary local variable "silicom_fan_control_data *ctl" in silicom_platform_probe().
.Clean out driver initialization error handling in silicom_platform_init();
.Add patch version and changelog for patch submission.

Changes suggested by Ilpo Järvinen <[email protected]>:
.Rename "#define MEC_DATA(offset) to "#define MEC_DATA_OFFSET(offset). .Use constant defined in include/linux/units.h instead of a literal. .return directly instead of go to err condition when platform_device_register_simple() failed.
.Remove unnecessary check for silicom_led_info and silicom_gpiochip. .Use a local variable to how multiple use of array size. .Align the arguments to the same column in silicom_mec_led_mc_brightness_set.
.Add patch version and changelog that shows version to version changes for patch submission.

Changes suggested by Christophe JAILLET <[email protected]>:
.Use "sizeof(*led)" instead of "sizeof(struct led_classdev_mc)" .Use "if (!led)" instead of "if (IS_ERR_OR_NULL(led))" .Removed unnecessary error message:
"dev_err(dev, "Failed to alloc led_classdev_mc[%d]:
%ld\n", i, PTR_ERR(led)).

change from patch vv5 to v6
===========================================

changes suggested by Guenter Roeck <[email protected]>:
.Removed checkpath warnings.
.Resoved dependencies between CONFIG_HWMON and CONFIG_SILICOM_PLATFORM.

change from patch v6 to v7
===========================================

changes suggested by Hans de Goede <[email protected]>:
.Usa a proper subsystem prefix for this patch subject:
Subject: platform/x86: Add Silicom Platform Driver.

change from patch v7 to v8
===========================================

changes suggested by Hans de Goede <[email protected]>:
.Chnage commit message of this driver.
.Adjust location of change log and signed-off-by.
.Change "config SILICOM_PLATFORM" and help contents location, and put it to source "drivers/platform/x86/siemens/Kconfig". .Set editor tab to 8 and align the start of extra function parameters to directly after (. This should be applied for all function.
.Do not manually create a sysfs dir and register sysfs attribute, instead define a platform_driver structure.
.Move MODULE_DEVICE_TABLE(dmi, silicom_dmi_ids) directly after table declaration.
.Using pr_info() instead of dev_info() in function silicom_platform_info_init().
.Made dmi_check_system() check the first thing to do in silicom_platform_init().
.Instead of separate platform_device creation + driver registration, switched to using platform_create_bundle().
.Removed mutex_destroy(&mec_io_mutex).

Changes suggested by Ilpo Järvinen <[email protected]>:
.Too many GENMASK() within to code itself, need put them to #define. Removed all GENMASK() in c functions.

change from patch v8 to v9
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
.Just do the same (like MEC_VERSION_MAJOR) with all places in the where you previously had GENMASK() in the code (currently MEC_GET_BITS() is there, obviously, but it should go away and be replaced with FIELD_GET(GOODPREFIX_GOODNAME, ...))).
.This is sysfs so it's odd to print pr_err() like that here. If the driver does not support those versions at all, the probe should fail. If driver is fine but just doesn't know how to interpret such a version, you should return -Esomething here. Driver returns -EINVAL here.
.Replace CENTI with 100
.Align FIELD_GET()s to the same column for line 661.
.Change variables efuse_status, mec_uc_version, power_cycle to unsigned int from int.

changes suggested by Hans de Goede <[email protected]>:
.Please add a Documentation/ABI/testing/sysfs-platform-silicom file to document driver specific the sysfs attributes of this driver. .Like with the Kconfig part, group this together with the other industrial PC drivers we have at the end of the Makefile after Siemens Simatic Industrial PCs.

change from patch v9 to v10
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
.Added missing newline in kernel document file.
.Changed the order #define to make sure they are in increasing order. .Removed printing in init function silicom_platform_info_init(); .Changed #define name MEC_PREFIX_HIGH_BYTES to MEC_TEMPERATURE. .Removed dev_err(dev, "Failed to register[%d]: %d\n", i, err) in function silicom_mc_leds_register() before ruturn err. .Changed %du to %u in function power_cycle_store(...). .Chnaged sprintf() to sysfs_emit().
.Changed start point for multi-line comments.
.Added empty line to seperate #define.
.Remove parenthesis around MEC_IO_BASE.
.Changed #define EC_ADDR_MSB (MEC_IO_BASE + 0x3), use
a constant value instead of MEC_DATA_OFFSET_MASK.
.Changed define name MEC_PREFIX_NAME to MEC_PORT_LOC. .Changed define MEC_PREFIX_HIGH_BYTES to MEC_TEMP_LOC. .Removed "PREFIX" from define name, changed MEC_PREFIX_SEC_BYTE to MEC_VERSION_LOC.

change from patch v10 to v11
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
.Don't print anything when userspace gives an invalid value,
just return -EINVAL in function power_cycle_store().
.The includes should be in alphabethical order.
.Just make the calculation once and store into a local variable in function silicom_mec_port_set().
.Use GENMASK for MEC_PORT_OFFSET_MASK, MEC_PORT_CHANNEL_MASK, MEC_DATA_OFFSET_MASK.
.Rename MEC_PORT_LOC to MEC_PORT_DWORD_OFFSET.
.Add local variable to function silicom_mec_port_set() and silicom_mec_port_get() to make the code less heavy to read. .Allgned defines start from same column mostly.
.Kernel test robot WARNING sys/devices/platform/silicom-platform/hwmon/hwmon1/ is defined 4 times.

change from patch v11 to v12
===========================================

Changes suggested by Ilpo Järvinen <[email protected]>:
Several editorial things:
.Put the subdir headers separately.
.Add more new line in define section.
.Use () around all macro arguments to be on the safe side. .Add new line and remove comment in function silicom_mec_port_get(). .Add new line and remove comment in function silicom_mec_port_set(). .Remove unnecessary comment in function temp_get(), rpm_get().

Quoted 1 line

+#define MEC_DATA_OFFSET(offset) ((MEC_IO_BASE) + 0x04 + offset)

Put parenthesis around offset.

Quoted 4 lines
drivers/platform/x86/silicom-platform.c new file +4 -0
+static ssize_t uc_version_show(struct device *dev,
+			       struct device_attribute *attr,
+			       char *buf)
+{

drivers/platform/x86/silicom-platform.c

Quoted 10 lines
drivers/platform/x86/silicom-platform.c new file +8 -0
+	u32 reg;
+	int uc_version;
 
 
+static int __init silicom_platform_probe(struct platform_device *device)
+{
+	int err;
+	u8 magic, ver;
+	struct device *hwmon_dev;
+	const char *name = "Silocom_Fan_Monitor";

There a typo in this string? Also, this doesn't seem to require using local variable, you could just put it directly into the call below.

Are you aware that most drivers use all lowercase names (this is not universal but seems to be mostly the case)? I guess the name that would best follow the usual convention is just "silicom_fan".

Also, try to use reverse xmas tree order for function variable declaration lines (that is, put the longest line first). Check the other functions yourself besides the two I quoted above.

But no need to go overboard with it if there are internal dependencies in the variable initalizations, you may occasionally have to "violate" the length based ordering, that's fine.

Quoted 39 lines
drivers/platform/x86/silicom-platform.c new file +39 -0
+	if (!devm_request_region(&device->dev, MEC_IO_BASE, MEC_IO_LEN, "mec")) {
+		dev_err(&device->dev, "couldn't reserve MEC io ports\n");
+		return -EBUSY;
+	}
+
+	/* Sanity check magic number read for EC */
+	outb(IO_REG_BANK, MEC_ADDR);
+	magic = inb(MEC_DATA_OFFSET(DEFAULT_CHAN_LO));
+	ver = inb(MEC_DATA_OFFSET(DEFAULT_CHAN_HI));
+	dev_dbg(&device->dev, "EC magic 0x%02x, version 0x%02x\n", magic, ver);
+
+	if (magic != SILICOM_MEC_MAGIC) {
+		dev_err(&device->dev, "Bad EC magic 0x%02x!\n", magic);
+		return -ENODEV;
+	}
+
+	err = silicom_mc_leds_register(&device->dev, silicom_led_info);
+	if (err) {
+		dev_err(&device->dev, "Failed to register LEDs\n");
+		return err;
+	}
+
+	err = devm_gpiochip_add_data(&device->dev, silicom_gpiochip,
+				     silicom_gpio_channels);
+	if (err) {
+		dev_err(&device->dev, "Failed to register gpiochip: %d\n", err);
+		return err;
+	}
+
+	hwmon_dev = devm_hwmon_device_register_with_info(&device->dev, name, NULL,
+							 &silicom_chip_info, NULL);
+	err = PTR_ERR_OR_ZERO(hwmon_dev);
+	if (err) {
+		dev_err(&device->dev, "Failed to register hwmon_dev: %d\n", err);
+		return err;
+	}
+
+	return err;
+}
Signature · 1 line
 i.
#5 lore raw
In reply to Henry Shi
kernel test robot noticed the following build warnings:

Hi Henry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/master]
[also build test WARNING on linus/master tip/auto-latest v6.7-rc1 next-20231116] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Henry-Shi/platform-x86-Add-Silicom-Platform-Driver/20231114-050431
base:   tip/master
patch link:    https://lore.kernel.org/r/20231113210216.30237-1-henryshi2018%40gmail.com
patch subject: [PATCH v12] platform/x86: Add Silicom Platform Driver
config: i386-kismet-CONFIG_LEDS_CLASS_MULTICOLOR-CONFIG_SILICOM_PLATFORM-0-0 (https://download.01.org/0day-ci/archive/20231116/[email protected]/config)
reproduce: (https://download.01.org/0day-ci/archive/20231116/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

kismet warnings: (new ones prefixed by >>)

>> kismet: WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR when selected by SILICOM_PLATFORM

WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR
Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=n] Selected by [y]:
- SILICOM_PLATFORM [=y] && X86_PLATFORM_DEVICES [=y] && HWMON [=y]

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#6 lore raw
In reply to Henry Shi
kernel test robot noticed the following build warnings:

Hi Henry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/master]
[also build test WARNING on linus/master tip/auto-latest v6.7-rc1 next-20231116] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Henry-Shi/platform-x86-Add-Silicom-Platform-Driver/20231114-050431
base:   tip/master
patch link:    https://lore.kernel.org/r/20231113210216.30237-1-henryshi2018%40gmail.com
patch subject: [PATCH v12] platform/x86: Add Silicom Platform Driver
config: i386-kismet-CONFIG_LEDS_CLASS_MULTICOLOR-CONFIG_SILICOM_PLATFORM-0-0 (https://download.01.org/0day-ci/archive/20231116/[email protected]/config)
reproduce: (https://download.01.org/0day-ci/archive/20231116/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

kismet warnings: (new ones prefixed by >>)

>> kismet: WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR when selected by SILICOM_PLATFORM

WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR
Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=n] Selected by [y]:
- SILICOM_PLATFORM [=y] && X86_PLATFORM_DEVICES [=y] && HWMON [=y]

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#7 lore raw
In reply to Henry Shi
kernel test robot noticed the following build warnings:

Hi Henry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/master]
[also build test WARNING on linus/master tip/auto-latest v6.7-rc1 next-20231116] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Henry-Shi/platform-x86-Add-Silicom-Platform-Driver/20231114-050431
base:   tip/master
patch link:    https://lore.kernel.org/r/20231113210216.30237-1-henryshi2018%40gmail.com
patch subject: [PATCH v12] platform/x86: Add Silicom Platform Driver
config: i386-kismet-CONFIG_LEDS_CLASS_MULTICOLOR-CONFIG_SILICOM_PLATFORM-0-0 (https://download.01.org/0day-ci/archive/20231117/[email protected]/config)
reproduce: (https://download.01.org/0day-ci/archive/20231117/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

kismet warnings: (new ones prefixed by >>)

>> kismet: WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR when selected by SILICOM_PLATFORM

WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR
Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=n] Selected by [y]:
- SILICOM_PLATFORM [=y] && X86_PLATFORM_DEVICES [=y] && HWMON [=y]

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki