Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 8d2963dc34bb511b53398338fd2367341a070653)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 923b2eba2c475b653bf61196dd0fb30b0e24c215)
@@ -49,4 +49,6 @@
 
 #define REG_COUNT 2
+
+#define RTC_FROM_FNODE(fnode)  ((rtc_t *) ((fnode)->dev->driver_data))
 
 typedef struct rtc {
@@ -61,4 +63,6 @@
 	/** The I/O port used to access the CMOS registers */
 	ioport8_t *port;
+	/** true if a client is connected to the device */
+	bool client_connected;
 } rtc_t;
 
@@ -81,4 +85,7 @@
 static void
 rtc_dev_cleanup(rtc_t *rtc);
+
+static int
+rtc_open(ddf_fun_t *fun);
 
 
@@ -109,5 +116,5 @@
 	ddf_log_init(NAME, LVL_ERROR);
 
-	rtc_dev_ops.open = NULL; /* XXX */
+	rtc_dev_ops.open = rtc_open;
 	rtc_dev_ops.close = NULL; /* XXX */
 
@@ -302,4 +309,6 @@
 	ddf_fun_add_to_category(fun, "clock");
 
+	rtc->client_connected = false;
+
 	ddf_msg(LVL_NOTE, "Device %s successfully initialized",
 	    dev->name);
@@ -315,4 +324,29 @@
 }
 
+/** Open the device
+ *
+ * @param fun   The function node
+ *
+ * @return  EOK on success or a negative error code
+ */
+static int
+rtc_open(ddf_fun_t *fun)
+{
+	int rc;
+	rtc_t *rtc = RTC_FROM_FNODE(fun);
+
+	fibril_mutex_lock(&rtc->mutex);
+
+	if (rtc->client_connected)
+		rc = EBUSY;
+	else {
+		rc = EOK;
+		rtc->client_connected = true;
+	}
+
+	fibril_mutex_unlock(&rtc->mutex);
+	return rc;
+}
+
 int
 main(int argc, char **argv)
