-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add patch to fix RTC on TrimSlice (on route to 4.1)
- Loading branch information
Showing
2 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
0001-drivers-rtc-rtc-em3027.c-add-device-tree-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From fc7789f5d8061c8d26f2e9be9ce5bd91f5033479 Mon Sep 17 00:00:00 2001 | ||
From: Peter Robinson <pbrobinson@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@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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters