Skip to content

Commit 72ebd04

Browse files
committed
drivers: counter: Enables support for MFD in counter
Enabled support for MFD in CMOS counter. Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
1 parent a463b00 commit 72ebd04

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/counter/Kconfig.cmos

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
config COUNTER_CMOS
77
bool "Counter driver for x86 CMOS/RTC clock"
88
default y if !RTC
9+
select MFD
910
depends on DT_HAS_MOTOROLA_MC146818_ENABLED

drivers/counter/counter_cmos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
/* The "CMOS" device is accessed via an address latch and data port. */
2121

22-
#define X86_CMOS_ADDR (DT_INST_REG_ADDR_BY_IDX(0, 0))
23-
#define X86_CMOS_DATA (DT_INST_REG_ADDR_BY_IDX(0, 1))
22+
#define X86_CMOS_ADDR (DT_REG_ADDR_BY_IDX(DT_INST_PARENT(0), 0))
23+
#define X86_CMOS_DATA (DT_REG_ADDR_BY_IDX(DT_INST_PARENT(0), 1))
2424

2525
/*
2626
* A snapshot of the RTC state, or at least the state we're

0 commit comments

Comments
 (0)