Commit 2b1b3f09 authored by Anisetti Avinash Krishna's avatar Anisetti Avinash Krishna Committed by Henrik Brix Andersen
Browse files

drivers: counter: Enables support for MFD in counter

Enabled support for MFD in CMOS counter.

Signed-off-by: default avatarAnisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
parent a1f89976
Loading
Loading
Loading
Loading
+1 −0
Changes for drivers/counter/Kconfig.cmos: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,4 +6,5 @@
config COUNTER_CMOS
	bool "Counter driver for x86 CMOS/RTC clock"
	default y if !RTC
	select MFD
	depends on DT_HAS_MOTOROLA_MC146818_ENABLED
+4 −3
Changes for drivers/counter/counter_cmos.c: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -19,8 +19,8 @@

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

#define X86_CMOS_ADDR (DT_INST_REG_ADDR_BY_IDX(0, 0))
#define X86_CMOS_DATA (DT_INST_REG_ADDR_BY_IDX(0, 1))
#define X86_CMOS_ADDR (DT_REG_ADDR_BY_IDX(DT_INST_PARENT(0), 0))
#define X86_CMOS_DATA (DT_REG_ADDR_BY_IDX(DT_INST_PARENT(0), 1))

/*
 * A snapshot of the RTC state, or at least the state we're
@@ -204,4 +204,5 @@ static DEVICE_API(counter, api) = {
};

DEVICE_DT_INST_DEFINE(0, NULL, NULL, NULL, &info, POST_KERNEL,
		      CONFIG_COUNTER_INIT_PRIORITY, &api);
		      UTIL_INC(CONFIG_MFD_MOTOROLA_MC146818_INIT_PRIORITY),
		      &api);