lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1usxJUtpXn7sDZJDkSY3j4F45qYVw7b4-8t5SYM5-3bfyXdgG3yXswa2oDJvi3b_Lt_e5ZZUiUIBpAJoQZriz-E9BHh1QzGGErE8QV5zbDw=@protonmail.com>
Date:   Wed, 22 Nov 2023 23:48:08 +0000
From:   Barnabás Pőcze <pobrn@...tonmail.com>
To:     Henry Shi <henryshi2018@...il.com>
Cc:     hbshi69@...mail.com, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
        hpa@...or.com, hdegoede@...hat.com, markgross@...nel.org,
        jdelvare@...e.com, linux@...ck-us.net,
        linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        linux-hwmon@...r.kernel.org, hb_shi2003@...oo.com,
        henrys@...icom-usa.com, wenw@...icom-usa.com
Subject: Re: [PATCH v14] platform/x86: Add Silicom Platform Driver

Hi

2023. november 22., szerda 22:20 keltezéssel, Henry Shi írta:

> [...]
> +What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/temp1_input
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This file is read only. It returns the temperature
> +		of device in the scale of 1000 * Degree Celsius.
> +
> +What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/temp1_label
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This file is read only. It returns "Silicom_platform:
> +		Thermostat Sensor".
> +
> +What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/fan1_input
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This file is read only. It returns current fan
> +		speed (RPM).
> +
> +What:		/sys/devices/platform/silicom-platform/hwmon/hwmon1/fan1_label
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This file is read only. It returns "Silicom_platform:
> +		Fan Speed".
> +

These are standard hwmon attributes already documented in
Documentation/ABI/testing/sysfs-class-hwmon, is it really needed to document
them here as well?



> +What:		/sys/class/leds/multicolor:sys/brightness
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This is a read only  file. It returns:
> +
> +		white amber red
> +
> +What:		/sys/class/leds/multicolor:sys/multi_intensity
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This is a read only file. It returns:
> +
> +		white yellow red
> +
> +What:		/sys/class/leds/multicolor:wan/multi_intensity
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This is a read only file. It returns:
> +
> +		red green blue yellow
> +
> +What:		/sys/class/leds/multicolor:stat%d/multi_intensity
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This is a read only file. It returns:
> +
> +		red green blue amber
> +
> +What:		/sys/class/leds/multicolor:fp_left/multi_intensity
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This is a read only  file. It returns:
> +
> +		red green blue amber
> +
> +What:		/sys/class/leds/multicolor:fp_center/multi_intensity
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +Description:
> +		This is a read only  file. It returns:
> +
> +		red green blue amber
> +
> +What:		/sys/class/leds/multicolor:fp_right/multi_intensity
> +Date:		November 2023
> +KernelVersion:	6.7
> +Contact:	Henry Shi <henrys@...icom-usa.com>
> +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.
> +

These are standard LED attributes already documented in
Documentation/ABI/testing/sysfs-class-{led,led-multicolor},
is it really needed to document them here as well?


> [...]
> +static struct led_classdev_mc plat_0222_mc_led_info[] __initdata = {
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:wan",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(plat_0222_wan_mc_subled_info),
> +		.subled_info = plat_0222_wan_mc_subled_info,
> +	},
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:sys",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(plat_0222_sys_mc_subled_info),
> +		.subled_info = plat_0222_sys_mc_subled_info,
> +	},
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:stat1",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(plat_0222_stat1_mc_subled_info),
> +		.subled_info = plat_0222_stat1_mc_subled_info,
> +	},
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:stat2",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(plat_0222_stat2_mc_subled_info),
> +		.subled_info = plat_0222_stat2_mc_subled_info,
> +	},
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:stat3",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(plat_0222_stat3_mc_subled_info),
> +		.subled_info = plat_0222_stat3_mc_subled_info,
> +	},
> +	{ },
> +};
> [...]
> +static struct led_classdev_mc cordoba_mc_led_info[] __initdata = {
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:fp_left",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(cordoba_fp_left_mc_subled_info),
> +		.subled_info = cordoba_fp_left_mc_subled_info,
> +	},
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:fp_center",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(cordoba_fp_center_mc_subled_info),
> +		.subled_info = cordoba_fp_center_mc_subled_info,
> +	},
> +	{
> +		.led_cdev = {
> +			.name = "multicolor:fp_right",
> +			.brightness = 0,
> +			.max_brightness = 1,
> +			.brightness_set = silicom_mec_led_mc_brightness_set,
> +			.brightness_get = silicom_mec_led_mc_brightness_get,
> +		},
> +		.num_colors = ARRAY_SIZE(cordoba_fp_right_mc_subled_info),
> +		.subled_info = cordoba_fp_right_mc_subled_info,
> +	},
> +	{ },
> +};
> [...]

These LED names do not have the syntax described in Documentation/leds/leds-class.rst,
which is "devicename:color:function".


Regards,
Barnabás Pőcze

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ