From 66645fe5dcc33258f73afa8c4764780fb701954d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Caletka?= <ondrej@caletka.cz>
Date: Tue, 29 Oct 2019 16:09:37 +0100
Subject: [PATCH] configs/turris1x/kernel: Allow RTC NVMEM access
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In Linux 4.13, a new kernel option was introduced to allow userspace
access to RTC NVMEM. This option is off by default, making the NVMEM
inaccessable. Since there is at least one application utilizing it, this
patch adds `/sys/class/rtc/rtc0/device/nvram` back.

Signed-off-by: Ondřej Caletka <ondrej@caletka.cz>
(cherry-picked from commit e09c946dec355de98d0ffe4431aec4334cd38977)
---
 configs/turris1x/kernel | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configs/turris1x/kernel b/configs/turris1x/kernel
index 77a859785..29f075d7b 100644
--- a/configs/turris1x/kernel
+++ b/configs/turris1x/kernel
@@ -11,3 +11,7 @@ CONFIG_KERNEL_NET_DSA=y
 CONFIG_KERNEL_NET_DSA_QCA8K=y
 # For rainbow
 CONFIG_KERNEL_DEVMEM=y
+
+# Allow RTC NVMEM access
+CONFIG_KERNEL_RTC_NVMEM=y
+CONFIG_KERNEL_NVMEM_SYSFS=y
-- 
GitLab