summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhurima Paruchuri <mparuchuri@google.com>2022-07-18 16:58:23 +0530
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-18 17:00:47 +0000
commit98cc714b48aacafa022307590b765666f45a5251 (patch)
tree527a040cd56c85fe910cc1fa7b57069dd0a31699
parentc66c42bf01446a9d3418f5e69bcbee953ad9d3e3 (diff)
downloadchrome-ec-98cc714b48aacafa022307590b765666f45a5251.tar.gz
zephyr: drivers: kblight: Use 'period' from PWM spec inplace of 'frequency'
Update driver to use 'period' from PWM spec inplace of 'frequency' BUG=b:230093078 BRANCH=none TEST=zmake testall Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: I260e38cb1b5eb58127a8bd617b7404ef4d037670 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3768139 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
-rw-r--r--zephyr/drivers/cros_kblight/pwm_kblight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zephyr/drivers/cros_kblight/pwm_kblight.c b/zephyr/drivers/cros_kblight/pwm_kblight.c
index b6695bbecf..3d56ec1dc1 100644
--- a/zephyr/drivers/cros_kblight/pwm_kblight.c
+++ b/zephyr/drivers/cros_kblight/pwm_kblight.c
@@ -21,7 +21,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1,
#define KBLIGHT_PWM_NODE DT_INST_PWMS_CTLR(0)
#define KBLIGHT_PWM_CHANNEL DT_INST_PWMS_CHANNEL(0)
#define KBLIGHT_PWM_FLAGS DT_INST_PWMS_FLAGS(0)
-#define KBLIGHT_PWM_PERIOD_NS (NSEC_PER_SEC / DT_INST_PROP(0, frequency))
+#define KBLIGHT_PWM_PERIOD_NS DT_INST_PWMS_PERIOD(0)
static bool kblight_enabled;
static int kblight_percent;