summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.init_priority
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-04-27 23:33:05 -0600
committerCommit Bot <commit-bot@chromium.org>2021-05-02 05:57:30 +0000
commitb58e2cba26f06702838f2965003927b678e1859a (patch)
tree6aaea10a6bc7c17405a3309bf63feb0ed017e205 /zephyr/Kconfig.init_priority
parent8c438c712b7d4113874addc52a88ab9508e3ee44 (diff)
downloadchrome-ec-b58e2cba26f06702838f2965003927b678e1859a.tar.gz
zephyr: pwm: fix init priority
Currently, the Zephyr pwm drivers were initialized at <PRE_KERNEL_1, KERNEL_INIT_PRIORITY_DEVICE (50)> which is the same priority as the shimmed pwm module. Zephyr does not guarantee any ordering if there's a tie in the priority. I believe that this may be the cause for the black screen after software sync (or at the very least error prone). BRANCH=none BUG=b:186458444 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I63758c6e11bc7b158fa27dd637f88dddd5d162cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2855993 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.init_priority')
-rw-r--r--zephyr/Kconfig.init_priority9
1 files changed, 9 insertions, 0 deletions
diff --git a/zephyr/Kconfig.init_priority b/zephyr/Kconfig.init_priority
index b8b3ab7195..af858a5296 100644
--- a/zephyr/Kconfig.init_priority
+++ b/zephyr/Kconfig.init_priority
@@ -15,3 +15,12 @@ config PLATFORM_EC_GPIO_INIT_PRIORITY
help
The initialization priority of the GPIO module. This should always happen
after the gpio drivers are initialized.
+
+config PLATFORM_EC_PWM_INIT_PRIORITY
+ int "Initialization priority of the PWM module"
+ depends on PLATFORM_EC_PWM
+ default 51
+ help
+ Sets the initialization priority of the PWM module. This MUST be a
+ value greater than the PWM driver's initialization priority which
+ currently defaults to KERNEL_INIT_PRIORITY_DEVICE.