rtc-s5m.c (5281f94ae7f54d2d1a48dbc10223fd12d2aea716) | rtc-s5m.c (a737e835e5769ef22897179ed7f82b1fc50bfa58) |
---|---|
1/* 2 * Copyright (c) 2013-2014 Samsung Electronics Co., Ltd 3 * http://www.samsung.com 4 * 5 * Copyright (C) 2013 Google, Inc 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 */ 17 | 1/* 2 * Copyright (c) 2013-2014 Samsung Electronics Co., Ltd 3 * http://www.samsung.com 4 * 5 * Copyright (C) 2013 Google, Inc 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 */ 17 |
18#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 19 |
|
18#include <linux/module.h> 19#include <linux/i2c.h> 20#include <linux/bcd.h> 21#include <linux/regmap.h> 22#include <linux/rtc.h> 23#include <linux/platform_device.h> 24#include <linux/mfd/samsung/core.h> 25#include <linux/mfd/samsung/irq.h> --- 115 unchanged lines hidden (view full) --- 141 data[RTC_HOUR] = tm->tm_hour & ~HOUR_PM_MASK; 142 143 data[RTC_WEEKDAY] = 1 << tm->tm_wday; 144 data[RTC_DATE] = tm->tm_mday; 145 data[RTC_MONTH] = tm->tm_mon + 1; 146 data[RTC_YEAR1] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; 147 148 if (tm->tm_year < 100) { | 20#include <linux/module.h> 21#include <linux/i2c.h> 22#include <linux/bcd.h> 23#include <linux/regmap.h> 24#include <linux/rtc.h> 25#include <linux/platform_device.h> 26#include <linux/mfd/samsung/core.h> 27#include <linux/mfd/samsung/irq.h> --- 115 unchanged lines hidden (view full) --- 143 data[RTC_HOUR] = tm->tm_hour & ~HOUR_PM_MASK; 144 145 data[RTC_WEEKDAY] = 1 << tm->tm_wday; 146 data[RTC_DATE] = tm->tm_mday; 147 data[RTC_MONTH] = tm->tm_mon + 1; 148 data[RTC_YEAR1] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; 149 150 if (tm->tm_year < 100) { |
149 pr_err("s5m8767 RTC cannot handle the year %d.\n", | 151 pr_err("RTC cannot handle the year %d\n", |
150 1900 + tm->tm_year); 151 return -EINVAL; 152 } else { 153 return 0; 154 } 155} 156 157/* --- 656 unchanged lines hidden --- | 152 1900 + tm->tm_year); 153 return -EINVAL; 154 } else { 155 return 0; 156 } 157} 158 159/* --- 656 unchanged lines hidden --- |