rtc-twl.c (4ba24fef3eb3b142197135223b90ced2f319cd53) | rtc-twl.c (a737e835e5769ef22897179ed7f82b1fc50bfa58) |
---|---|
1/* 2 * rtc-twl.c -- TWL Real Time Clock interface 3 * 4 * Copyright (C) 2007 MontaVista Software, Inc 5 * Author: Alexandre Rusev <source@mvista.com> 6 * 7 * Based on original TI driver twl4030-rtc.c 8 * Copyright (C) 2006 Texas Instruments, Inc. --- 4 unchanged lines hidden (view full) --- 13 * Copyright (C) 2006 David Brownell 14 * 15 * This program is free software; you can redistribute it and/or 16 * modify it under the terms of the GNU General Public License 17 * as published by the Free Software Foundation; either version 18 * 2 of the License, or (at your option) any later version. 19 */ 20 | 1/* 2 * rtc-twl.c -- TWL Real Time Clock interface 3 * 4 * Copyright (C) 2007 MontaVista Software, Inc 5 * Author: Alexandre Rusev <source@mvista.com> 6 * 7 * Based on original TI driver twl4030-rtc.c 8 * Copyright (C) 2006 Texas Instruments, Inc. --- 4 unchanged lines hidden (view full) --- 13 * Copyright (C) 2006 David Brownell 14 * 15 * This program is free software; you can redistribute it and/or 16 * modify it under the terms of the GNU General Public License 17 * as published by the Free Software Foundation; either version 18 * 2 of the License, or (at your option) any later version. 19 */ 20 |
21#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 22 |
|
21#include <linux/kernel.h> 22#include <linux/errno.h> 23#include <linux/init.h> 24#include <linux/module.h> 25#include <linux/types.h> 26#include <linux/rtc.h> 27#include <linux/bcd.h> 28#include <linux/platform_device.h> --- 111 unchanged lines hidden (view full) --- 140 * Supports 1 byte read from TWL RTC register. 141 */ 142static int twl_rtc_read_u8(u8 *data, u8 reg) 143{ 144 int ret; 145 146 ret = twl_i2c_read_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); 147 if (ret < 0) | 23#include <linux/kernel.h> 24#include <linux/errno.h> 25#include <linux/init.h> 26#include <linux/module.h> 27#include <linux/types.h> 28#include <linux/rtc.h> 29#include <linux/bcd.h> 30#include <linux/platform_device.h> --- 111 unchanged lines hidden (view full) --- 142 * Supports 1 byte read from TWL RTC register. 143 */ 144static int twl_rtc_read_u8(u8 *data, u8 reg) 145{ 146 int ret; 147 148 ret = twl_i2c_read_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); 149 if (ret < 0) |
148 pr_err("twl_rtc: Could not read TWL" 149 "register %X - error %d\n", reg, ret); | 150 pr_err("Could not read TWL register %X - error %d\n", reg, ret); |
150 return ret; 151} 152 153/* 154 * Supports 1 byte write to TWL RTC registers. 155 */ 156static int twl_rtc_write_u8(u8 data, u8 reg) 157{ 158 int ret; 159 160 ret = twl_i2c_write_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); 161 if (ret < 0) | 151 return ret; 152} 153 154/* 155 * Supports 1 byte write to TWL RTC registers. 156 */ 157static int twl_rtc_write_u8(u8 data, u8 reg) 158{ 159 int ret; 160 161 ret = twl_i2c_write_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); 162 if (ret < 0) |
162 pr_err("twl_rtc: Could not write TWL" 163 "register %X - error %d\n", reg, ret); | 163 pr_err("Could not write TWL register %X - error %d\n", 164 reg, ret); |
164 return ret; 165} 166 167/* 168 * Cache the value for timer/alarm interrupts register; this is 169 * only changed by callers holding rtc ops lock (or resume). 170 */ 171static unsigned char rtc_irq_bits; --- 449 unchanged lines hidden --- | 165 return ret; 166} 167 168/* 169 * Cache the value for timer/alarm interrupts register; this is 170 * only changed by callers holding rtc ops lock (or resume). 171 */ 172static unsigned char rtc_irq_bits; --- 449 unchanged lines hidden --- |