summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhurima Paruchuri <mparuchuri@google.com>2022-07-18 13:59:25 +0530
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-18 10:53:26 +0000
commit7caea3df4a0f2cda387137a41e9f25dfa751c205 (patch)
treea90e98b3aee4e8c334c726db7b4a494de307fe0c
parent2a05849cedd96a49497444f97159811db34643ce (diff)
downloadchrome-ec-7caea3df4a0f2cda387137a41e9f25dfa751c205.tar.gz
zephyr: drivers: displight: 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: I440a8b49bc3179d9f2b1462b64499374b0a9ab01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3769708 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
-rw-r--r--zephyr/drivers/cros_displight/cros_displight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zephyr/drivers/cros_displight/cros_displight.c b/zephyr/drivers/cros_displight/cros_displight.c
index 3dcfd35480..6f4697e36c 100644
--- a/zephyr/drivers/cros_displight/cros_displight.c
+++ b/zephyr/drivers/cros_displight/cros_displight.c
@@ -21,7 +21,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1,
#define DISPLIGHT_PWM_NODE DT_INST_PWMS_CTLR(0)
#define DISPLIGHT_PWM_CHANNEL DT_INST_PWMS_CHANNEL(0)
#define DISPLIGHT_PWM_FLAGS DT_INST_PWMS_FLAGS(0)
-#define DISPLIGHT_PWM_PERIOD_NS (NSEC_PER_SEC / DT_INST_PROP(0, frequency))
+#define DISPLIGHT_PWM_PERIOD_NS DT_INST_PWMS_PERIOD(0)
static int displight_percent;