rtc-ds1685.c (52ef84d566dc145b4d469f06667c5fa3118fdd44) | rtc-ds1685.c (a737e835e5769ef22897179ed7f82b1fc50bfa58) |
---|---|
1/* 2 * An rtc driver for the Dallas/Maxim DS1685/DS1687 and related real-time 3 * chips. 4 * 5 * Copyright (C) 2011-2014 Joshua Kinard <kumba@gentoo.org>. 6 * Copyright (C) 2009 Matthias Fuchs <matthias.fuchs@esd-electronics.com>. 7 * 8 * References: 9 * DS1685/DS1687 3V/5V Real-Time Clocks, 19-5215, Rev 4/10. 10 * DS17x85/DS17x87 3V/5V Real-Time Clocks, 19-5222, Rev 4/10. 11 * DS1689/DS1693 3V/5V Serialized Real-Time Clocks, Rev 112105. 12 * Application Note 90, Using the Multiplex Bus RTC Extended Features. 13 * 14 * This program is free software; you can redistribute it and/or modify 15 * it under the terms of the GNU General Public License version 2 as 16 * published by the Free Software Foundation. 17 */ 18 | 1/* 2 * An rtc driver for the Dallas/Maxim DS1685/DS1687 and related real-time 3 * chips. 4 * 5 * Copyright (C) 2011-2014 Joshua Kinard <kumba@gentoo.org>. 6 * Copyright (C) 2009 Matthias Fuchs <matthias.fuchs@esd-electronics.com>. 7 * 8 * References: 9 * DS1685/DS1687 3V/5V Real-Time Clocks, 19-5215, Rev 4/10. 10 * DS17x85/DS17x87 3V/5V Real-Time Clocks, 19-5222, Rev 4/10. 11 * DS1689/DS1693 3V/5V Serialized Real-Time Clocks, Rev 112105. 12 * Application Note 90, Using the Multiplex Bus RTC Extended Features. 13 * 14 * This program is free software; you can redistribute it and/or modify 15 * it under the terms of the GNU General Public License version 2 as 16 * published by the Free Software Foundation. 17 */ 18 |
19#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 20 |
|
19#include <linux/bcd.h> 20#include <linux/delay.h> 21#include <linux/io.h> 22#include <linux/module.h> 23#include <linux/platform_device.h> 24#include <linux/rtc.h> 25#include <linux/workqueue.h> 26 --- 2150 unchanged lines hidden (view full) --- 2177void __noreturn 2178ds1685_rtc_poweroff(struct platform_device *pdev) 2179{ 2180 u8 ctrla, ctrl4a, ctrl4b; 2181 struct ds1685_priv *rtc; 2182 2183 /* Check for valid RTC data, else, spin forever. */ 2184 if (unlikely(!pdev)) { | 21#include <linux/bcd.h> 22#include <linux/delay.h> 23#include <linux/io.h> 24#include <linux/module.h> 25#include <linux/platform_device.h> 26#include <linux/rtc.h> 27#include <linux/workqueue.h> 28 --- 2150 unchanged lines hidden (view full) --- 2179void __noreturn 2180ds1685_rtc_poweroff(struct platform_device *pdev) 2181{ 2182 u8 ctrla, ctrl4a, ctrl4b; 2183 struct ds1685_priv *rtc; 2184 2185 /* Check for valid RTC data, else, spin forever. */ 2186 if (unlikely(!pdev)) { |
2185 pr_emerg("rtc-ds1685: platform device data not available, spinning forever ...\n"); | 2187 pr_emerg("platform device data not available, spinning forever ...\n"); |
2186 unreachable(); 2187 } else { 2188 /* Get the rtc data. */ 2189 rtc = platform_get_drvdata(pdev); 2190 2191 /* 2192 * Disable our IRQ. We're powering down, so we're not 2193 * going to worry about cleaning up. Most of that should --- 56 unchanged lines hidden --- | 2188 unreachable(); 2189 } else { 2190 /* Get the rtc data. */ 2191 rtc = platform_get_drvdata(pdev); 2192 2193 /* 2194 * Disable our IRQ. We're powering down, so we're not 2195 * going to worry about cleaning up. Most of that should --- 56 unchanged lines hidden --- |