drivers: hp206 driver does not need 2000 ticks/s frequency

From code inspection, the driver always took timeouts in milliseconds.
The only sub-ms wait uses k_busy_wait(), which has microseconds
granularity, but its granularity does not depend on the system clock
tick rate.

Change-Id: If48363fd1fbeeb8e5ff0f0f2ca86e671d63bc571
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-12-20 15:50:42 -05:00 committed by Anas Nashif
commit a1622472c3
2 changed files with 3 additions and 3 deletions

View file

@ -85,8 +85,8 @@
struct hp206c_device_data {
struct device *i2c;
#ifdef CONFIG_NANO_TIMERS
#if CONFIG_SYS_CLOCK_TICKS_PER_SEC < 2000
#error "SYS_CLOCK_TICKS_PER_SEC >= 2000 needed for better timeouts granularity."
#if CONFIG_SYS_CLOCK_TICKS_PER_SEC != 1000
#error "driver needs millisecond tick granularity"
#endif
struct k_timer tmr;
#endif

View file

@ -6,7 +6,7 @@ CONFIG_SPI=y
CONFIG_SYS_LOG_SENSOR_LEVEL=4
# Some sensor drivers (notably HP206C) demand high tick rates:
CONFIG_SYS_CLOCK_TICKS_PER_SEC=2000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
CONFIG_ADC=y
CONFIG_AK8975=y