rtc-ds2404.c (f26e8817b235d8764363bffcc9cbfc61867371f2) | rtc-ds2404.c (22652ba72453d35c8a637d5c0f06b3dc29ff9eb0) |
---|---|
1/* 2 * Copyright (C) 2012 Sven Schnelle <svens@stackframe.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 */ --- 193 unchanged lines hidden (view full) --- 202static int ds2404_read_time(struct device *dev, struct rtc_time *dt) 203{ 204 unsigned long time = 0; 205 206 ds2404_read_memory(dev, 0x203, 4, (u8 *)&time); 207 time = le32_to_cpu(time); 208 209 rtc_time_to_tm(time, dt); | 1/* 2 * Copyright (C) 2012 Sven Schnelle <svens@stackframe.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 */ --- 193 unchanged lines hidden (view full) --- 202static int ds2404_read_time(struct device *dev, struct rtc_time *dt) 203{ 204 unsigned long time = 0; 205 206 ds2404_read_memory(dev, 0x203, 4, (u8 *)&time); 207 time = le32_to_cpu(time); 208 209 rtc_time_to_tm(time, dt); |
210 return rtc_valid_tm(dt); | 210 return 0; |
211} 212 213static int ds2404_set_mmss(struct device *dev, unsigned long secs) 214{ 215 u32 time = cpu_to_le32(secs); 216 ds2404_write_memory(dev, 0x203, 4, (u8 *)&time); 217 return 0; 218} --- 66 unchanged lines hidden --- | 211} 212 213static int ds2404_set_mmss(struct device *dev, unsigned long secs) 214{ 215 u32 time = cpu_to_le32(secs); 216 ds2404_write_memory(dev, 0x203, 4, (u8 *)&time); 217 return 0; 218} --- 66 unchanged lines hidden --- |