summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-02-18 08:23:10 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-02-18 08:23:10 -0600
commitc875dcfd8a753cd131d39e1efa5f34642200e52c (patch)
treec7bc9abc91fc3aa5ad3ef5ceb01ca0510713776b /nuttx/drivers
parent1aa475c18f1aa490ed96555f848a617f80feede8 (diff)
downloadpx4-nuttx-c875dcfd8a753cd131d39e1efa5f34642200e52c.tar.gz
px4-nuttx-c875dcfd8a753cd131d39e1efa5f34642200e52c.tar.bz2
px4-nuttx-c875dcfd8a753cd131d39e1efa5f34642200e52c.zip
The RTC ioctl() method is now a configuration option
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/timers/Kconfig7
-rw-r--r--nuttx/drivers/timers/rtc.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/nuttx/drivers/timers/Kconfig b/nuttx/drivers/timers/Kconfig
index af0fb3e42..ee4698d88 100644
--- a/nuttx/drivers/timers/Kconfig
+++ b/nuttx/drivers/timers/Kconfig
@@ -107,6 +107,13 @@ config RTC_EPOCHYEAR
With some RTCs, these operations can be used to read or to set the RTC's
Epoch, respectively.
+config RTC_IOCTL
+ bool "RTC IOCTLs"
+ default n
+ ---help---
+ Support the RTC interface ioctl() method. This allows you to add
+ architecture-specific RTC operations to the RTC interface
+
endif # RTC_DRIVER
endif # RTC
diff --git a/nuttx/drivers/timers/rtc.c b/nuttx/drivers/timers/rtc.c
index f3231ded1..6550131e4 100644
--- a/nuttx/drivers/timers/rtc.c
+++ b/nuttx/drivers/timers/rtc.c
@@ -509,10 +509,12 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
default:
{
ret = -ENOTTY;
+#ifdef CONFIG_RTC_IOCTL
if (ops->ioctl)
{
ret = ops->ioctl(upper->lower, cmd, arg);
}
+#endif
}
break;
}