summaryrefslogtreecommitdiff
path: root/board/osiris/pwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/osiris/pwm.c')
-rw-r--r--board/osiris/pwm.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/board/osiris/pwm.c b/board/osiris/pwm.c
index 530a777a8f..eb178750e9 100644
--- a/board/osiris/pwm.c
+++ b/board/osiris/pwm.c
@@ -1,4 +1,4 @@
-/* Copyright 2022 The Chromium OS Authors. All rights reserved.
+/* Copyright 2022 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -11,31 +11,11 @@
#include "pwm_chip.h"
const struct pwm_t pwm_channels[] = {
- [PWM_CH_KBLIGHT] = {
- .channel = 3,
- .flags = 0,
- /*
- * Set PWM frequency to multiple of 50 Hz and 60 Hz to prevent
- * flicker. Higher frequencies consume similar average power to
- * lower PWM frequencies, but higher frequencies record a much
- * lower maximum power.
- */
- .freq = 25000,
- },
- [PWM_CH_FAN] = {
- .channel = 5,
- .flags = PWM_CONFIG_OPEN_DRAIN,
- .freq = 25000
- },
+ [PWM_CH_FAN] = { .channel = 5,
+ .flags = PWM_CONFIG_OPEN_DRAIN,
+ .freq = 25000 },
+ [PWM_CH_FAN2] = { .channel = 3,
+ .flags = PWM_CONFIG_OPEN_DRAIN,
+ .freq = 25000 },
};
BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
-
-static void board_pwm_init(void)
-{
- /*
- * Turn on the fan at 50%.
- */
- pwm_enable(PWM_CH_KBLIGHT, 1);
- pwm_set_duty(PWM_CH_KBLIGHT, 50);
-}
-DECLARE_HOOK(HOOK_INIT, board_pwm_init, HOOK_PRIO_DEFAULT);