Skip to content
Permalink
Browse files

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>
  • Loading branch information...
Carver Forbes authored and nashif committed Jul 16, 2019
1 parent ad183ce commit 9d42858821fc84d3f703ba84ea5cf269051a03d6
Showing with 6 additions and 2 deletions.
  1. +6 −2 drivers/counter/counter_cmos.c
@@ -198,10 +198,14 @@ static int init(struct device *dev)
return 0;
}

static const struct counter_config_info info = {
.max_top_value = UINT_MAX,
.freq = 1
};

static const struct counter_driver_api api = {
.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);

0 comments on commit 9d42858

Please sign in to comment.
You can’t perform that action at this time.