linux/drivers/rtc/rtc-em3027.c
<<
>>
Prefs
   1/*
   2 * An rtc/i2c driver for the EM Microelectronic EM3027
   3 * Copyright 2011 CompuLab, Ltd.
   4 *
   5 * Author: Mike Rapoport <mike@compulab.co.il>
   6 *
   7 * Based on rtc-ds1672.c by Alessandro Zummo <a.zummo@towertech.it>
   8 *
   9 * This program is free software; you can redistribute it and/or modify
  10 * it under the terms of the GNU General Public License version 2 as
  11 * published by the Free Software Foundation.
  12 */
  13
  14#include <linux/i2c.h>
  15#include <linux/rtc.h>
  16#include <linux/bcd.h>
  17#include <linux/module.h>
  18
  19/* Registers */
  20#define EM3027_REG_ON_OFF_CTRL  0x00
  21#define EM3027_REG_IRQ_CTRL     0x01
  22#define EM3027_REG_IRQ_FLAGS    0x02
  23#define EM3027_REG_STATUS       0x03
  24#define EM3027_REG_RST_CTRL     0x04
  25
  26#define EM3027_REG_WATCH_SEC    0x08
  27#define EM3027_REG_WATCH_MIN    0x09
  28#define EM3027_REG_WATCH_HOUR   0x0c
EM3DATEREG_WATCH_HOUR   0x0c
  20#define   21#define     0x09
  22#define    3  24#define     0x08
ALARM027_drivers/rt1/rtc-em3027.c#L21" id="L21" class="li3e" name=3L25">  25
    0x09
ALARM027_drivers/rt1/rtc-em3027.c#L22" id="L22" class="li3e" name=3L26">  26#define   27#define   28#define   20#define   21#define   22#define    3   4  25
  26#define   27#define   28#define EM3027_REG_WATCH_SEC    0x08
  20#define   21#define   22#define 
   3   4   5  26#define   27#define 
  28#define   20#define   21#define   22#define    3   4   5   6  27#define "%s:aread er4or\n"rs/rtc/, REG_ON_OFF_CTRL__func__REG_WATCH_HOUR<__func__rive)/rtc-em3027.c#L18" id="L18" class="li6e" name=6L28">  28#define   20#define   21#define   22#define    3   4   5   6   7  28#define   20#define   21#define   22#define    3   4   5   6   7   8  20#define 
  21#define   22#define    3EM3027_REG_WATCH_SEC    0x08
   4   5   6   7   8   9  10  11  12
  13
  14#include &l04refs=4f="drivers/         REG_ON_OFF_CTRLdev_er4REG_WATCH_HOUR"%s:awrite er4or\n"rs/rtc/, REG_ON_OFF_CTRL__func__REG_WATCH_HOUR<__func__rive)/rtc-em3027.c#L18" id="L18" class="li10e" name="0L15">  15#include &l05refs=5f="drivers/         t type=-REG_ON_OFF_CTRLcIOREG_WATCH_SEC  16#include &l06refs=6f="drivers/ }rtc-em3027.c#L7" id="L7" class="line10e" name="0L17">  17#include &l07refs=7rtc/rtc-em3027.c#L14" id="L14" class="li10e" name="0L18">  18
  19  10  11alt="& const struct_REG_ON_OFF_CTRLL14_">  1_opsnEG_WATCH_HOUR  1_opsriverREG_ON_OFF_CTRL class_L14_opsnEG_WATCH_HOUR< class_L14_opsriver=_{rtc-em3027.c#L14" id="L14" class="li1ne" name=""L12">  12  13
  14#include &llt;  15#include &llt;  16#include &llt;  17#include &llt;  18
  19  20#define   21#define   22#define   23#define   24#define   25
  26#define   27#define   28#define   20#define   21#define   22#define    3  24#define   25
  26#define   27#define   28#define   20#define   21#define   22#define    3   4  25
" class"rs/rtc/, 0 },rtc-em3027.c#L20" id="L20" class="li14e" name=14L26">  26#define   27#define   28#define   20#define   21#define "L14" class"rs/rtc/,rtc-em3027.c#L14" id="L14" class="li15e" name=15L22">  22#define    3   4   5  26#define   27#define   28#define   20#define "@compulab.co.il>
  21#define "027
  22#define "GPL"rs/rtc/)/rtc-em3027.c#L18" id="L18" class="li16" name="16L3">   3

3 The original LXRistributeFoundatitc-em3027http://sourceforge.net/proj LXRi*/lxd@l 3 lxd.lRedpill L