Skip to content

Commit

Permalink
dts: bindings: Rename nxp,kinetis-lptmr compat
Browse files Browse the repository at this point in the history
Rename nxp,kinetis-lptmr compat to nxp,lptmr.
Because of concerns over breaking downstream users,
keep support for the old compatible temporarily and
make it clear it should be changed.

Signed-off-by: Declan Snyder <[email protected]>
  • Loading branch information
decsny committed May 24, 2024
1 parent d545c1f commit e14f509
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
13 changes: 12 additions & 1 deletion drivers/counter/Kconfig.mcux_lptmr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
config COUNTER_MCUX_LPTMR
bool "MCUX LPTMR driver"
default y
depends on DT_HAS_NXP_KINETIS_LPTMR_ENABLED
depends on DT_HAS_NXP_LPTMR_ENABLED || \
COUNTER_MCUX_KINETIS_LPTMR
help
Enable support for the MCUX Low Power Timer (LPTMR).

config COUNTER_MCUX_KINETIS_LPTMR
bool "Deprecated DT compatible"
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/counter/counter_mcux_lptmr.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/drivers/counter.h>
#include <zephyr/irq.h>
Expand Down
8 changes: 8 additions & 0 deletions dts/bindings/counter/nxp,kinetis-lptmr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0

description: Deprecated compatible for NXP LPTMR

compatible: "nxp,kinetis-lptmr"

include: nxp,lptmr.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) 2020 Vestas Wind Systems A/S
# SPDX-License-Identifier: Apache-2.0

description: Kinetis LPTMR
description: NXP LPTMR

compatible: "nxp,kinetis-lptmr"
compatible: "nxp,lptmr"

include: rtc.yaml

Expand Down

0 comments on commit e14f509

Please sign in to comment.