projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[kernel/2.6.38] fix gcc-4.6 set but unused warnings
[openwrt.git]
/
target
/
linux
/
sibyte
/
patches
/
103-m41t80_smbus.patch
diff --git
a/target/linux/sibyte/patches/103-m41t80_smbus.patch
b/target/linux/sibyte/patches/103-m41t80_smbus.patch
index
c6a07c6
..
84c0eba
100644
(file)
--- a/
target/linux/sibyte/patches/103-m41t80_smbus.patch
+++ b/
target/linux/sibyte/patches/103-m41t80_smbus.patch
@@
-24,9
+24,9
@@
-#define DRV_VERSION "0.05"
+#define DRV_VERSION "0.06"
-#define DRV_VERSION "0.05"
+#define DRV_VERSION "0.06"
+ static DEFINE_MUTEX(m41t80_rtc_mutex);
static const struct i2c_device_id m41t80_id[] = {
static const struct i2c_device_id m41t80_id[] = {
- { "m41t62", M41T80_FEATURE_SQ | M41T80_FEATURE_SQ_ALT },
-@@ -88,31 +91,88 @@ struct m41t80_data {
+@@ -89,31 +92,88 @@ struct m41t80_data {
struct rtc_device *rtc;
};
struct rtc_device *rtc;
};
@@
-136,7
+136,7
@@
tm->tm_min = bcd2bin(buf[M41T80_REG_MIN] & 0x7f);
tm->tm_hour = bcd2bin(buf[M41T80_REG_HOUR] & 0x3f);
tm->tm_mday = bcd2bin(buf[M41T80_REG_DAY] & 0x3f);
tm->tm_min = bcd2bin(buf[M41T80_REG_MIN] & 0x7f);
tm->tm_hour = bcd2bin(buf[M41T80_REG_HOUR] & 0x3f);
tm->tm_mday = bcd2bin(buf[M41T80_REG_DAY] & 0x3f);
-@@ -12
7,39 +187
,16 @@ static int m41t80_get_datetime(struct i2
+@@ -12
8,39 +188
,16 @@ static int m41t80_get_datetime(struct i2
/* Sets the given date and time to the real time clock. */
static int m41t80_set_datetime(struct i2c_client *client, struct rtc_time *tm)
{
/* Sets the given date and time to the real time clock. */
static int m41t80_set_datetime(struct i2c_client *client, struct rtc_time *tm)
{
@@
-180,7
+180,7
@@
/* Merge time-data and register flags into buf[0..7] */
buf[M41T80_REG_SSEC] = 0;
buf[M41T80_REG_SEC] =
/* Merge time-data and register flags into buf[0..7] */
buf[M41T80_REG_SSEC] = 0;
buf[M41T80_REG_SEC] =
-@@ -17
7,7 +214
,8 @@ static int m41t80_set_datetime(struct i2
+@@ -17
8,7 +215
,8 @@ static int m41t80_set_datetime(struct i2
/* assume 20YY not 19YY */
buf[M41T80_REG_YEAR] = bin2bcd(tm->tm_year % 100);
/* assume 20YY not 19YY */
buf[M41T80_REG_YEAR] = bin2bcd(tm->tm_year % 100);
@@
-190,7
+190,7
@@
dev_err(&client->dev, "write error\n");
return -EIO;
}
dev_err(&client->dev, "write error\n");
return -EIO;
}
-@@ -25
1,34 +289
,11 @@ err:
+@@ -25
2,34 +290
,11 @@ err:
static int m41t80_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *t)
{
struct i2c_client *client = to_i2c_client(dev);
static int m41t80_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *t)
{
struct i2c_client *client = to_i2c_client(dev);
@@
-228,7
+228,7
@@
dev_err(&client->dev, "read error\n");
return -EIO;
}
dev_err(&client->dev, "read error\n");
return -EIO;
}
-@@ -28
8,7 +303
,6 @@ static int m41t80_rtc_set_alarm(struct d
+@@ -28
9,7 +304
,6 @@ static int m41t80_rtc_set_alarm(struct d
reg[M41T80_REG_ALARM_MIN] = 0;
reg[M41T80_REG_ALARM_SEC] = 0;
reg[M41T80_REG_ALARM_MIN] = 0;
reg[M41T80_REG_ALARM_SEC] = 0;
@@
-236,7
+236,7
@@
reg[M41T80_REG_ALARM_SEC] |= t->time.tm_sec >= 0 ?
bin2bcd(t->time.tm_sec) : 0x80;
reg[M41T80_REG_ALARM_MIN] |= t->time.tm_min >= 0 ?
reg[M41T80_REG_ALARM_SEC] |= t->time.tm_sec >= 0 ?
bin2bcd(t->time.tm_sec) : 0x80;
reg[M41T80_REG_ALARM_MIN] |= t->time.tm_min >= 0 ?
-@@ -30
2,7 +316
,8 @@ static int m41t80_rtc_set_alarm(struct d
+@@ -30
3,7 +317
,8 @@ static int m41t80_rtc_set_alarm(struct d
else
reg[M41T80_REG_ALARM_DAY] |= 0x40;
else
reg[M41T80_REG_ALARM_DAY] |= 0x40;
@@
-246,7
+246,7
@@
dev_err(&client->dev, "write error\n");
return -EIO;
}
dev_err(&client->dev, "write error\n");
return -EIO;
}
-@@ -32
2,24 +337,10 @@ static int m41t80_rtc_read_alarm(struct
+@@ -32
3,24 +338,10 @@ static int m41t80_rtc_read_alarm(struct
{
struct i2c_client *client = to_i2c_client(dev);
u8 buf[M41T80_ALARM_REG_SIZE + 1]; /* all alarm regs and flags */
{
struct i2c_client *client = to_i2c_client(dev);
u8 buf[M41T80_ALARM_REG_SIZE + 1]; /* all alarm regs and flags */
@@
-273,7
+273,7
@@
dev_err(&client->dev, "read error\n");
return -EIO;
}
dev_err(&client->dev, "read error\n");
return -EIO;
}
-@@ -51
2,26 +513
,16 @@ static int boot_flag;
+@@ -51
3,26 +514
,16 @@ static int boot_flag;
*/
static void wdt_ping(void)
{
*/
static void wdt_ping(void)
{
@@
-306,7
+306,7
@@
/*
* M41T65 has three bits for watchdog resolution. Don't set bit 7, as
/*
* M41T65 has three bits for watchdog resolution. Don't set bit 7, as
-@@ -54
0,7 +531
,7 @@ static void wdt_ping(void)
+@@ -54
1,7 +532
,7 @@ static void wdt_ping(void)
if (clientdata->features & M41T80_FEATURE_WD)
i2c_data[1] &= ~M41T80_WATCHDOG_RB2;
if (clientdata->features & M41T80_FEATURE_WD)
i2c_data[1] &= ~M41T80_WATCHDOG_RB2;
@@
-315,7
+315,7
@@
}
/**
}
/**
-@@ -55
0,36 +541
,8 @@ static void wdt_ping(void)
+@@ -55
1,36 +542
,8 @@ static void wdt_ping(void)
*/
static void wdt_disable(void)
{
*/
static void wdt_disable(void)
{
@@
-354,7
+354,7
@@
}
/**
}
/**
-@@ -7
72,8 +73
5,8 @@ static int m41t80_probe(struct i2c_clien
+@@ -7
82,8 +74
5,8 @@ static int m41t80_probe(struct i2c_clien
struct rtc_time tm;
struct m41t80_data *clientdata = NULL;
struct rtc_time tm;
struct m41t80_data *clientdata = NULL;
This page took
0.024933 seconds
and
4
git commands to generate.