summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-02-18 08:04:25 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-02-18 08:05:31 -0600
commit1aa475c18f1aa490ed96555f848a617f80feede8 (patch)
treea8238271301feca4e3f15429352778bcac1a614a /nuttx/drivers
parent2393757b0bb390447613db1e622067c771872ad3 (diff)
downloadpx4-nuttx-1aa475c18f1aa490ed96555f848a617f80feede8.tar.gz
px4-nuttx-1aa475c18f1aa490ed96555f848a617f80feede8.tar.bz2
px4-nuttx-1aa475c18f1aa490ed96555f848a617f80feede8.zip
Add an IOCTL method to the RTC interface
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/timers/rtc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/drivers/timers/rtc.c b/nuttx/drivers/timers/rtc.c
index 1d4a0c827..f3231ded1 100644
--- a/nuttx/drivers/timers/rtc.c
+++ b/nuttx/drivers/timers/rtc.c
@@ -502,8 +502,18 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
break;
#endif /* CONFIG_RTC_ALARM */
+ /* Forward any unrecognized IOCTLs to the lower half driver... they
+ * may represent some architecture-specific command.
+ */
+
default:
- ret = -ENOTTY;
+ {
+ ret = -ENOTTY;
+ if (ops->ioctl)
+ {
+ ret = ops->ioctl(upper->lower, cmd, arg);
+ }
+ }
break;
}