Skip to content

Commit 21877d4

Browse files
Jing LiWenlp
authored andcommitted
sw64: powercap: increase the interval of polling mode
The polling interval is too small, resulting in excessive occupation of IPMI bandwidth, thus increasing the polling interval. Signed-off-by: Jing Li <[email protected]> Reviewed-by: He Sheng <[email protected]> Signed-off-by: Gu Zitao <[email protected]>
1 parent bcb796b commit 21877d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/platform/sw64/powercap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
#define SUNWAY_POWERCAP_ACPI_NOTIFY_VALUE 0x84
2020

21+
#define POLL_INTERVAL_UNIT_10MS 10
22+
2123
enum sunway_powercap_version {
2224
SUNWAY_POWERCAP_V1 = 1,
2325
SUNWAY_POWERCAP_VERSION_MAX,
@@ -531,7 +533,7 @@ static int sunway_powercap_setup_cfg(const struct sunway_powercap_cfg *cfg)
531533

532534
driver_data.version = cfg->version;
533535
driver_data.mode = cfg->mode;
534-
driver_data.poll_interval = cfg->poll_interval;
536+
driver_data.poll_interval = cfg->poll_interval * POLL_INTERVAL_UNIT_10MS;
535537

536538
if (is_poll_mode) {
537539
timer_setup(&driver_data.timer, sunway_powercap_poll_func, 0);

0 commit comments

Comments
 (0)