pbrobinson pushed to kernel (f22). "add patch to fix RTC on TrimSlice (on route to 4.1)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 21 23:11:38 UTC 2015


>From 9ed4e5a6ac0c835aa6d3486e924e850edfeba678 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson at gmail.com>
Date: Wed, 22 Apr 2015 00:11:11 +0100
Subject: add patch to fix RTC on TrimSlice (on route to 4.1)


diff --git a/0001-drivers-rtc-rtc-em3027.c-add-device-tree-support.patch b/0001-drivers-rtc-rtc-em3027.c-add-device-tree-support.patch
new file mode 100644
index 0000000..1c6af9d
--- /dev/null
+++ b/0001-drivers-rtc-rtc-em3027.c-add-device-tree-support.patch
@@ -0,0 +1,51 @@
+From fc7789f5d8061c8d26f2e9be9ce5bd91f5033479 Mon Sep 17 00:00:00 2001
+From: Peter Robinson <pbrobinson at gmail.com>
+Date: Tue, 30 Dec 2014 07:32:03 +0000
+Subject: [PATCH] drivers/rtc/rtc-em3027.c: add device tree support
+
+Set the of_match_table for this driver so that devices can be described
+in the device tree. This device is used in the Trimslice and is already
+defined in the Trimslice device tree.
+
+Signed-off-by: Peter Robinson <pbrobinson at gmail.com>
+---
+ drivers/rtc/rtc-em3027.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/drivers/rtc/rtc-em3027.c b/drivers/rtc/rtc-em3027.c
+index fccf366..7fbb051 100644
+--- a/drivers/rtc/rtc-em3027.c
++++ b/drivers/rtc/rtc-em3027.c
+@@ -15,6 +15,7 @@
+ #include <linux/rtc.h>
+ #include <linux/bcd.h>
+ #include <linux/module.h>
++#include <linux/of.h>
+ 
+ /* Registers */
+ #define EM3027_REG_ON_OFF_CTRL	0x00
+@@ -135,10 +136,21 @@ static struct i2c_device_id em3027_id[] = {
+ 	{ "em3027", 0 },
+ 	{ }
+ };
++MODULE_DEVICE_TABLE(i2c, em3027_id);
++
++#ifdef CONFIG_OF
++static const struct of_device_id em3027_of_match[] = {
++	{ .compatible = "emmicro,em3027", },
++	{}
++};
++MODULE_DEVICE_TABLE(of, em3027_of_match);
++#endif
+ 
+ static struct i2c_driver em3027_driver = {
+ 	.driver = {
+ 		   .name = "rtc-em3027",
++		   .owner  = THIS_MODULE,
++		   .of_match_table = of_match_ptr(em3027_of_match),
+ 	},
+ 	.probe = &em3027_probe,
+ 	.id_table = em3027_id,
+-- 
+2.1.0
+
diff --git a/kernel.spec b/kernel.spec
index 5348822..180b130 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -586,7 +586,7 @@ Patch21023: arm-dts-am335x-bone-common-enable-and-use-i2c2.patch
 Patch21024: arm-dts-am335x-bone-common-setup-default-pinmux-http.patch
 Patch21025: arm-dts-am335x-bone-common-add-uart2_pins-uart4_pins.patch
 Patch21026: pinctrl-pinctrl-single-must-be-initialized-early.patch
-
+Patch21027: 0001-drivers-rtc-rtc-em3027.c-add-device-tree-support.patch
 Patch21028: arm-i.MX6-Utilite-device-dtb.patch
 
 Patch21100: arm-highbank-l2-reverts.patch
@@ -1225,14 +1225,13 @@ ApplyPatch usb-make-xhci-platform-driver-use-64-bit-or-32-bit-D.patch
 # ARM
 #
 ApplyPatch ARM-tegra-usb-no-reset.patch
-
 ApplyPatch arm-dts-am335x-boneblack-lcdc-add-panel-info.patch
 ApplyPatch arm-dts-am335x-boneblack-add-cpu0-opp-points.patch
 ApplyPatch arm-dts-am335x-bone-common-enable-and-use-i2c2.patch
 ApplyPatch arm-dts-am335x-bone-common-setup-default-pinmux-http.patch
 ApplyPatch arm-dts-am335x-bone-common-add-uart2_pins-uart4_pins.patch
 ApplyPatch pinctrl-pinctrl-single-must-be-initialized-early.patch
-
+ApplyPatch 0001-drivers-rtc-rtc-em3027.c-add-device-tree-support.patch
 ApplyPatch arm-i.MX6-Utilite-device-dtb.patch
 
 ApplyPatch arm-highbank-l2-reverts.patch
@@ -2243,6 +2242,9 @@ fi
 #
 # 
 %changelog
+* Tue Apr 21 2015 Peter Robinson <pbrobinson at fedoraproject.org>
+- Fix RTC on TrimSlice
+
 * Mon Apr 20 2015 Laura Abbott - 4.0.0-2
 - Fix sound issues (rhbz 1188741)
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?h=f22&id=9ed4e5a6ac0c835aa6d3486e924e850edfeba678


More information about the scm-commits mailing list