rtc-max77686.c (4ba24fef3eb3b142197135223b90ced2f319cd53) | rtc-max77686.c (a737e835e5769ef22897179ed7f82b1fc50bfa58) |
---|---|
1/* 2 * RTC driver for Maxim MAX77686 3 * 4 * Copyright (C) 2012 Samsung Electronics Co.Ltd 5 * 6 * based on rtc-max8997.c 7 * 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License as published by the 10 * Free Software Foundation; either version 2 of the License, or (at your 11 * option) any later version. 12 * 13 */ 14 | 1/* 2 * RTC driver for Maxim MAX77686 3 * 4 * Copyright (C) 2012 Samsung Electronics Co.Ltd 5 * 6 * based on rtc-max8997.c 7 * 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License as published by the 10 * Free Software Foundation; either version 2 of the License, or (at your 11 * option) any later version. 12 * 13 */ 14 |
15#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 16 |
|
15#include <linux/slab.h> 16#include <linux/rtc.h> 17#include <linux/delay.h> 18#include <linux/mutex.h> 19#include <linux/module.h> 20#include <linux/platform_device.h> 21#include <linux/mfd/max77686-private.h> 22#include <linux/irqdomain.h> --- 75 unchanged lines hidden (view full) --- 98 data[RTC_MIN] = tm->tm_min; 99 data[RTC_HOUR] = tm->tm_hour; 100 data[RTC_WEEKDAY] = 1 << tm->tm_wday; 101 data[RTC_DATE] = tm->tm_mday; 102 data[RTC_MONTH] = tm->tm_mon + 1; 103 data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; 104 105 if (tm->tm_year < 100) { | 17#include <linux/slab.h> 18#include <linux/rtc.h> 19#include <linux/delay.h> 20#include <linux/mutex.h> 21#include <linux/module.h> 22#include <linux/platform_device.h> 23#include <linux/mfd/max77686-private.h> 24#include <linux/irqdomain.h> --- 75 unchanged lines hidden (view full) --- 100 data[RTC_MIN] = tm->tm_min; 101 data[RTC_HOUR] = tm->tm_hour; 102 data[RTC_WEEKDAY] = 1 << tm->tm_wday; 103 data[RTC_DATE] = tm->tm_mday; 104 data[RTC_MONTH] = tm->tm_mon + 1; 105 data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; 106 107 if (tm->tm_year < 100) { |
106 pr_warn("%s: MAX77686 RTC cannot handle the year %d." 107 "Assume it's 2000.\n", __func__, 1900 + tm->tm_year); | 108 pr_warn("RTC cannot handle the year %d. Assume it's 2000.\n", 109 1900 + tm->tm_year); |
108 return -EINVAL; 109 } 110 return 0; 111} 112 113static int max77686_rtc_update(struct max77686_rtc_info *info, 114 enum MAX77686_RTC_OP op) 115{ --- 411 unchanged lines hidden --- | 110 return -EINVAL; 111 } 112 return 0; 113} 114 115static int max77686_rtc_update(struct max77686_rtc_info *info, 116 enum MAX77686_RTC_OP op) 117{ --- 411 unchanged lines hidden --- |