Skip to content

Commit

Permalink
drivers: mcux_lptmr_timer: Fix compat string error
Browse files Browse the repository at this point in the history
Fix error due to compatible string changing in DT and
forgetting to update this driver with the change.

Also make the counter symbol hidden.

Signed-off-by: Declan Snyder <[email protected]>
  • Loading branch information
decsny committed Jun 4, 2024
1 parent 4fc6506 commit 730ee54
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/counter/Kconfig.mcux_lptmr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config COUNTER_MCUX_LPTMR
Enable support for the MCUX Low Power Timer (LPTMR).

config COUNTER_MCUX_KINETIS_LPTMR
bool "Deprecated DT compatible"
bool
default y
depends on DT_HAS_NXP_KINETIS_LPTMR_ENABLED
select DEPRECATED
Expand Down
13 changes: 12 additions & 1 deletion drivers/timer/Kconfig.mcux_lptmr
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@
config MCUX_LPTMR_TIMER
bool "MCUX LPTMR timer"
default y
depends on DT_HAS_NXP_KINETIS_LPTMR_ENABLED
depends on DT_HAS_NXP_KINETIS_LPTMR_ENABLED || \
MCUX_KINETIS_LPTMR
depends on !COUNTER_MCUX_LPTMR
depends on PM
select SYSTEM_TIMER_HAS_DISABLE_SUPPORT
help
This module implements a kernel device driver for the NXP MCUX Low
Power Timer (LPTMR) and provides the standard "system clock driver"
interfaces.

config MCUX_KINETIS_LPTMR
bool
default y
depends on DT_HAS_NXP_KINETIS_LPTMR_ENABLED
select DEPRECATED
help
The compatible string "nxp,kinetis-lptmr" should
be swiched to "nxp,lptmr" in DT. The former will
be removed eventually.
5 changes: 5 additions & 0 deletions drivers/timer/mcux_lptmr_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/devicetree.h>
#if DT_HAS_COMPAT_STATUS_OKAY(nxp_kinetis_lptmr)
#define DT_DRV_COMPAT nxp_kinetis_lptmr
#else
#define DT_DRV_COMPAT nxp_lptmr
#endif

#include <zephyr/init.h>
#include <zephyr/drivers/timer/system_timer.h>
Expand Down

0 comments on commit 730ee54

Please sign in to comment.