drivers/counter_cmos.c: Add config struct
Added config struct to enable use of generic API functions. Signed-off-by: Carver Forbes <carver.forbes@gmail.com>
This commit is contained in:
parent
ad183ce6af
commit
9d42858821
1 changed files with 6 additions and 2 deletions
|
@ -198,10 +198,14 @@ static int init(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct counter_config_info info = {
|
||||||
|
.max_top_value = UINT_MAX,
|
||||||
|
.freq = 1
|
||||||
|
};
|
||||||
|
|
||||||
static const struct counter_driver_api api = {
|
static const struct counter_driver_api api = {
|
||||||
.read = read
|
.read = read
|
||||||
};
|
};
|
||||||
|
|
||||||
DEVICE_AND_API_INIT(counter_cmos, "CMOS", init, NULL, NULL,
|
DEVICE_AND_API_INIT(counter_cmos, "CMOS", init, NULL, &info,
|
||||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &api);
|
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &api);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue