[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230201143431.863784-5-frieder@fris.de>
Date: Wed, 1 Feb 2023 15:34:26 +0100
From: Frieder Schrempf <frieder@...s.de>
To: Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
devicetree@...r.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-kernel@...r.kernel.org, linux-rtc@...r.kernel.org,
Rob Herring <robh+dt@...nel.org>
Cc: Frieder Schrempf <frieder.schrempf@...tron.de>
Subject: [PATCH 4/7] rtc: Move BSM defines to separate header for DT usage
From: Frieder Schrempf <frieder.schrempf@...tron.de>
To be able to use the BSM defines in the devicetree, move the defines
to a separate header within the dt-bindings directory.
Signed-off-by: Frieder Schrempf <frieder.schrempf@...tron.de>
---
include/dt-bindings/rtc/rtc.h | 11 +++++++++++
include/uapi/linux/rtc.h | 6 +-----
2 files changed, 12 insertions(+), 5 deletions(-)
create mode 100644 include/dt-bindings/rtc/rtc.h
diff --git a/include/dt-bindings/rtc/rtc.h b/include/dt-bindings/rtc/rtc.h
new file mode 100644
index 000000000000..b0cc06d368c0
--- /dev/null
+++ b/include/dt-bindings/rtc/rtc.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+
+#ifndef _DT_BINDINGS_RTC_H
+#define _DT_BINDINGS_RTC_H
+
+#define RTC_BSM_DISABLED 0
+#define RTC_BSM_DIRECT 1
+#define RTC_BSM_LEVEL 2
+#define RTC_BSM_STANDBY 3
+
+#endif /* _DT_BINDINGS_RTC_H */
diff --git a/include/uapi/linux/rtc.h b/include/uapi/linux/rtc.h
index 97aca4503a6a..9e78c17b5733 100644
--- a/include/uapi/linux/rtc.h
+++ b/include/uapi/linux/rtc.h
@@ -12,6 +12,7 @@
#ifndef _UAPI_LINUX_RTC_H_
#define _UAPI_LINUX_RTC_H_
+#include <dt-bindings/rtc/rtc.h>
#include <linux/const.h>
#include <linux/ioctl.h>
#include <linux/types.h>
@@ -141,11 +142,6 @@ struct rtc_param {
#define RTC_PARAM_CORRECTION 1
#define RTC_PARAM_BACKUP_SWITCH_MODE 2
-#define RTC_BSM_DISABLED 0
-#define RTC_BSM_DIRECT 1
-#define RTC_BSM_LEVEL 2
-#define RTC_BSM_STANDBY 3
-
#define RTC_MAX_FREQ 8192
--
2.39.1
Powered by blists - more mailing lists