Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mc13xxx-core.c File Reference
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/mfd/core.h>
#include <linux/mfd/mc13xxx.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include "mc13xxx.h"

Go to the source code of this file.

Data Structures

struct  mc13xxx_adcdone_data
 

Macros

#define MC13XXX_IRQSTAT0   0
 
#define MC13XXX_IRQSTAT0_ADCDONEI   (1 << 0)
 
#define MC13XXX_IRQSTAT0_ADCBISDONEI   (1 << 1)
 
#define MC13XXX_IRQSTAT0_TSI   (1 << 2)
 
#define MC13783_IRQSTAT0_WHIGHI   (1 << 3)
 
#define MC13783_IRQSTAT0_WLOWI   (1 << 4)
 
#define MC13XXX_IRQSTAT0_CHGDETI   (1 << 6)
 
#define MC13783_IRQSTAT0_CHGOVI   (1 << 7)
 
#define MC13XXX_IRQSTAT0_CHGREVI   (1 << 8)
 
#define MC13XXX_IRQSTAT0_CHGSHORTI   (1 << 9)
 
#define MC13XXX_IRQSTAT0_CCCVI   (1 << 10)
 
#define MC13XXX_IRQSTAT0_CHGCURRI   (1 << 11)
 
#define MC13XXX_IRQSTAT0_BPONI   (1 << 12)
 
#define MC13XXX_IRQSTAT0_LOBATLI   (1 << 13)
 
#define MC13XXX_IRQSTAT0_LOBATHI   (1 << 14)
 
#define MC13783_IRQSTAT0_UDPI   (1 << 15)
 
#define MC13783_IRQSTAT0_USBI   (1 << 16)
 
#define MC13783_IRQSTAT0_IDI   (1 << 19)
 
#define MC13783_IRQSTAT0_SE1I   (1 << 21)
 
#define MC13783_IRQSTAT0_CKDETI   (1 << 22)
 
#define MC13783_IRQSTAT0_UDMI   (1 << 23)
 
#define MC13XXX_IRQMASK0   1
 
#define MC13XXX_IRQMASK0_ADCDONEM   MC13XXX_IRQSTAT0_ADCDONEI
 
#define MC13XXX_IRQMASK0_ADCBISDONEM   MC13XXX_IRQSTAT0_ADCBISDONEI
 
#define MC13XXX_IRQMASK0_TSM   MC13XXX_IRQSTAT0_TSI
 
#define MC13783_IRQMASK0_WHIGHM   MC13783_IRQSTAT0_WHIGHI
 
#define MC13783_IRQMASK0_WLOWM   MC13783_IRQSTAT0_WLOWI
 
#define MC13XXX_IRQMASK0_CHGDETM   MC13XXX_IRQSTAT0_CHGDETI
 
#define MC13783_IRQMASK0_CHGOVM   MC13783_IRQSTAT0_CHGOVI
 
#define MC13XXX_IRQMASK0_CHGREVM   MC13XXX_IRQSTAT0_CHGREVI
 
#define MC13XXX_IRQMASK0_CHGSHORTM   MC13XXX_IRQSTAT0_CHGSHORTI
 
#define MC13XXX_IRQMASK0_CCCVM   MC13XXX_IRQSTAT0_CCCVI
 
#define MC13XXX_IRQMASK0_CHGCURRM   MC13XXX_IRQSTAT0_CHGCURRI
 
#define MC13XXX_IRQMASK0_BPONM   MC13XXX_IRQSTAT0_BPONI
 
#define MC13XXX_IRQMASK0_LOBATLM   MC13XXX_IRQSTAT0_LOBATLI
 
#define MC13XXX_IRQMASK0_LOBATHM   MC13XXX_IRQSTAT0_LOBATHI
 
#define MC13783_IRQMASK0_UDPM   MC13783_IRQSTAT0_UDPI
 
#define MC13783_IRQMASK0_USBM   MC13783_IRQSTAT0_USBI
 
#define MC13783_IRQMASK0_IDM   MC13783_IRQSTAT0_IDI
 
#define MC13783_IRQMASK0_SE1M   MC13783_IRQSTAT0_SE1I
 
#define MC13783_IRQMASK0_CKDETM   MC13783_IRQSTAT0_CKDETI
 
#define MC13783_IRQMASK0_UDMM   MC13783_IRQSTAT0_UDMI
 
#define MC13XXX_IRQSTAT1   3
 
#define MC13XXX_IRQSTAT1_1HZI   (1 << 0)
 
#define MC13XXX_IRQSTAT1_TODAI   (1 << 1)
 
#define MC13783_IRQSTAT1_ONOFD1I   (1 << 3)
 
#define MC13783_IRQSTAT1_ONOFD2I   (1 << 4)
 
#define MC13783_IRQSTAT1_ONOFD3I   (1 << 5)
 
#define MC13XXX_IRQSTAT1_SYSRSTI   (1 << 6)
 
#define MC13XXX_IRQSTAT1_RTCRSTI   (1 << 7)
 
#define MC13XXX_IRQSTAT1_PCI   (1 << 8)
 
#define MC13XXX_IRQSTAT1_WARMI   (1 << 9)
 
#define MC13XXX_IRQSTAT1_MEMHLDI   (1 << 10)
 
#define MC13783_IRQSTAT1_PWRRDYI   (1 << 11)
 
#define MC13XXX_IRQSTAT1_THWARNLI   (1 << 12)
 
#define MC13XXX_IRQSTAT1_THWARNHI   (1 << 13)
 
#define MC13XXX_IRQSTAT1_CLKI   (1 << 14)
 
#define MC13783_IRQSTAT1_SEMAFI   (1 << 15)
 
#define MC13783_IRQSTAT1_MC2BI   (1 << 17)
 
#define MC13783_IRQSTAT1_HSDETI   (1 << 18)
 
#define MC13783_IRQSTAT1_HSLI   (1 << 19)
 
#define MC13783_IRQSTAT1_ALSPTHI   (1 << 20)
 
#define MC13783_IRQSTAT1_AHSSHORTI   (1 << 21)
 
#define MC13XXX_IRQMASK1   4
 
#define MC13XXX_IRQMASK1_1HZM   MC13XXX_IRQSTAT1_1HZI
 
#define MC13XXX_IRQMASK1_TODAM   MC13XXX_IRQSTAT1_TODAI
 
#define MC13783_IRQMASK1_ONOFD1M   MC13783_IRQSTAT1_ONOFD1I
 
#define MC13783_IRQMASK1_ONOFD2M   MC13783_IRQSTAT1_ONOFD2I
 
#define MC13783_IRQMASK1_ONOFD3M   MC13783_IRQSTAT1_ONOFD3I
 
#define MC13XXX_IRQMASK1_SYSRSTM   MC13XXX_IRQSTAT1_SYSRSTI
 
#define MC13XXX_IRQMASK1_RTCRSTM   MC13XXX_IRQSTAT1_RTCRSTI
 
#define MC13XXX_IRQMASK1_PCM   MC13XXX_IRQSTAT1_PCI
 
#define MC13XXX_IRQMASK1_WARMM   MC13XXX_IRQSTAT1_WARMI
 
#define MC13XXX_IRQMASK1_MEMHLDM   MC13XXX_IRQSTAT1_MEMHLDI
 
#define MC13783_IRQMASK1_PWRRDYM   MC13783_IRQSTAT1_PWRRDYI
 
#define MC13XXX_IRQMASK1_THWARNLM   MC13XXX_IRQSTAT1_THWARNLI
 
#define MC13XXX_IRQMASK1_THWARNHM   MC13XXX_IRQSTAT1_THWARNHI
 
#define MC13XXX_IRQMASK1_CLKM   MC13XXX_IRQSTAT1_CLKI
 
#define MC13783_IRQMASK1_SEMAFM   MC13783_IRQSTAT1_SEMAFI
 
#define MC13783_IRQMASK1_MC2BM   MC13783_IRQSTAT1_MC2BI
 
#define MC13783_IRQMASK1_HSDETM   MC13783_IRQSTAT1_HSDETI
 
#define MC13783_IRQMASK1_HSLM   MC13783_IRQSTAT1_HSLI
 
#define MC13783_IRQMASK1_ALSPTHM   MC13783_IRQSTAT1_ALSPTHI
 
#define MC13783_IRQMASK1_AHSSHORTM   MC13783_IRQSTAT1_AHSSHORTI
 
#define MC13XXX_REVISION   7
 
#define MC13XXX_REVISION_REVMETAL   (0x07 << 0)
 
#define MC13XXX_REVISION_REVFULL   (0x03 << 3)
 
#define MC13XXX_REVISION_ICID   (0x07 << 6)
 
#define MC13XXX_REVISION_FIN   (0x03 << 9)
 
#define MC13XXX_REVISION_FAB   (0x03 << 11)
 
#define MC13XXX_REVISION_ICIDCODE   (0x3f << 13)
 
#define MC13XXX_ADC1   44
 
#define MC13XXX_ADC1_ADEN   (1 << 0)
 
#define MC13XXX_ADC1_RAND   (1 << 1)
 
#define MC13XXX_ADC1_ADSEL   (1 << 3)
 
#define MC13XXX_ADC1_ASC   (1 << 20)
 
#define MC13XXX_ADC1_ADTRIGIGN   (1 << 21)
 
#define MC13XXX_ADC2   45
 
#define maskval(reg, mask)   (((reg) & (mask)) >> __ffs(mask))
 
#define MC13XXX_ADC1_CHAN0_SHIFT   5
 
#define MC13XXX_ADC1_CHAN1_SHIFT   8
 
#define MC13783_ADC1_ATO_SHIFT   11
 
#define MC13783_ADC1_ATOX   (1 << 19)
 
#define MC13XXX_ADC_WORKING   (1 << 0)
 

Functions

void mc13xxx_lock (struct mc13xxx *mc13xxx)
 
 EXPORT_SYMBOL (mc13xxx_lock)
 
void mc13xxx_unlock (struct mc13xxx *mc13xxx)
 
 EXPORT_SYMBOL (mc13xxx_unlock)
 
int mc13xxx_reg_read (struct mc13xxx *mc13xxx, unsigned int offset, u32 *val)
 
 EXPORT_SYMBOL (mc13xxx_reg_read)
 
int mc13xxx_reg_write (struct mc13xxx *mc13xxx, unsigned int offset, u32 val)
 
 EXPORT_SYMBOL (mc13xxx_reg_write)
 
int mc13xxx_reg_rmw (struct mc13xxx *mc13xxx, unsigned int offset, u32 mask, u32 val)
 
 EXPORT_SYMBOL (mc13xxx_reg_rmw)
 
int mc13xxx_irq_mask (struct mc13xxx *mc13xxx, int irq)
 
 EXPORT_SYMBOL (mc13xxx_irq_mask)
 
int mc13xxx_irq_unmask (struct mc13xxx *mc13xxx, int irq)
 
 EXPORT_SYMBOL (mc13xxx_irq_unmask)
 
int mc13xxx_irq_status (struct mc13xxx *mc13xxx, int irq, int *enabled, int *pending)
 
 EXPORT_SYMBOL (mc13xxx_irq_status)
 
int mc13xxx_irq_ack (struct mc13xxx *mc13xxx, int irq)
 
 EXPORT_SYMBOL (mc13xxx_irq_ack)
 
int mc13xxx_irq_request_nounmask (struct mc13xxx *mc13xxx, int irq, irq_handler_t handler, const char *name, void *dev)
 
 EXPORT_SYMBOL (mc13xxx_irq_request_nounmask)
 
int mc13xxx_irq_request (struct mc13xxx *mc13xxx, int irq, irq_handler_t handler, const char *name, void *dev)
 
 EXPORT_SYMBOL (mc13xxx_irq_request)
 
int mc13xxx_irq_free (struct mc13xxx *mc13xxx, int irq, void *dev)
 
 EXPORT_SYMBOL (mc13xxx_irq_free)
 
int mc13xxx_get_flags (struct mc13xxx *mc13xxx)
 
 EXPORT_SYMBOL (mc13xxx_get_flags)
 
int mc13xxx_adc_do_conversion (struct mc13xxx *mc13xxx, unsigned int mode, unsigned int channel, u8 ato, bool atox, unsigned int *sample)
 
 EXPORT_SYMBOL_GPL (mc13xxx_adc_do_conversion)
 
int mc13xxx_common_init (struct mc13xxx *mc13xxx, struct mc13xxx_platform_data *pdata, int irq)
 
 EXPORT_SYMBOL_GPL (mc13xxx_common_init)
 
void mc13xxx_common_cleanup (struct mc13xxx *mc13xxx)
 
 EXPORT_SYMBOL_GPL (mc13xxx_common_cleanup)
 
 MODULE_DESCRIPTION ("Core driver for Freescale MC13XXX PMIC")
 
 MODULE_AUTHOR ("Uwe Kleine-Koenig <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define maskval (   reg,
  mask 
)    (((reg) & (mask)) >> __ffs(mask))

Definition at line 418 of file mc13xxx-core.c.

#define MC13783_ADC1_ATO_SHIFT   11

Definition at line 479 of file mc13xxx-core.c.

#define MC13783_ADC1_ATOX   (1 << 19)

Definition at line 480 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_CHGOVM   MC13783_IRQSTAT0_CHGOVI

Definition at line 55 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_CKDETM   MC13783_IRQSTAT0_CKDETI

Definition at line 67 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_IDM   MC13783_IRQSTAT0_IDI

Definition at line 65 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_SE1M   MC13783_IRQSTAT0_SE1I

Definition at line 66 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_UDMM   MC13783_IRQSTAT0_UDMI

Definition at line 68 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_UDPM   MC13783_IRQSTAT0_UDPI

Definition at line 63 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_USBM   MC13783_IRQSTAT0_USBI

Definition at line 64 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_WHIGHM   MC13783_IRQSTAT0_WHIGHI

Definition at line 52 of file mc13xxx-core.c.

#define MC13783_IRQMASK0_WLOWM   MC13783_IRQSTAT0_WLOWI

Definition at line 53 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_AHSSHORTM   MC13783_IRQSTAT1_AHSSHORTI

Definition at line 112 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_ALSPTHM   MC13783_IRQSTAT1_ALSPTHI

Definition at line 111 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_HSDETM   MC13783_IRQSTAT1_HSDETI

Definition at line 109 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_HSLM   MC13783_IRQSTAT1_HSLI

Definition at line 110 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_MC2BM   MC13783_IRQSTAT1_MC2BI

Definition at line 108 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_ONOFD1M   MC13783_IRQSTAT1_ONOFD1I

Definition at line 95 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_ONOFD2M   MC13783_IRQSTAT1_ONOFD2I

Definition at line 96 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_ONOFD3M   MC13783_IRQSTAT1_ONOFD3I

Definition at line 97 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_PWRRDYM   MC13783_IRQSTAT1_PWRRDYI

Definition at line 103 of file mc13xxx-core.c.

#define MC13783_IRQMASK1_SEMAFM   MC13783_IRQSTAT1_SEMAFI

Definition at line 107 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_CHGOVI   (1 << 7)

Definition at line 33 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_CKDETI   (1 << 22)

Definition at line 45 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_IDI   (1 << 19)

Definition at line 43 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_SE1I   (1 << 21)

Definition at line 44 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_UDMI   (1 << 23)

Definition at line 46 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_UDPI   (1 << 15)

Definition at line 41 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_USBI   (1 << 16)

Definition at line 42 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_WHIGHI   (1 << 3)

Definition at line 30 of file mc13xxx-core.c.

#define MC13783_IRQSTAT0_WLOWI   (1 << 4)

Definition at line 31 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_AHSSHORTI   (1 << 21)

Definition at line 90 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_ALSPTHI   (1 << 20)

Definition at line 89 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_HSDETI   (1 << 18)

Definition at line 87 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_HSLI   (1 << 19)

Definition at line 88 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_MC2BI   (1 << 17)

Definition at line 86 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_ONOFD1I   (1 << 3)

Definition at line 73 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_ONOFD2I   (1 << 4)

Definition at line 74 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_ONOFD3I   (1 << 5)

Definition at line 75 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_PWRRDYI   (1 << 11)

Definition at line 81 of file mc13xxx-core.c.

#define MC13783_IRQSTAT1_SEMAFI   (1 << 15)

Definition at line 85 of file mc13xxx-core.c.

#define MC13XXX_ADC1   44

Definition at line 122 of file mc13xxx-core.c.

#define MC13XXX_ADC1_ADEN   (1 << 0)

Definition at line 123 of file mc13xxx-core.c.

#define MC13XXX_ADC1_ADSEL   (1 << 3)

Definition at line 125 of file mc13xxx-core.c.

#define MC13XXX_ADC1_ADTRIGIGN   (1 << 21)

Definition at line 127 of file mc13xxx-core.c.

#define MC13XXX_ADC1_ASC   (1 << 20)

Definition at line 126 of file mc13xxx-core.c.

#define MC13XXX_ADC1_CHAN0_SHIFT   5

Definition at line 477 of file mc13xxx-core.c.

#define MC13XXX_ADC1_CHAN1_SHIFT   8

Definition at line 478 of file mc13xxx-core.c.

#define MC13XXX_ADC1_RAND   (1 << 1)

Definition at line 124 of file mc13xxx-core.c.

#define MC13XXX_ADC2   45

Definition at line 129 of file mc13xxx-core.c.

#define MC13XXX_ADC_WORKING   (1 << 0)

Definition at line 498 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0   1

Definition at line 48 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_ADCBISDONEM   MC13XXX_IRQSTAT0_ADCBISDONEI

Definition at line 50 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_ADCDONEM   MC13XXX_IRQSTAT0_ADCDONEI

Definition at line 49 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_BPONM   MC13XXX_IRQSTAT0_BPONI

Definition at line 60 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_CCCVM   MC13XXX_IRQSTAT0_CCCVI

Definition at line 58 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_CHGCURRM   MC13XXX_IRQSTAT0_CHGCURRI

Definition at line 59 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_CHGDETM   MC13XXX_IRQSTAT0_CHGDETI

Definition at line 54 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_CHGREVM   MC13XXX_IRQSTAT0_CHGREVI

Definition at line 56 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_CHGSHORTM   MC13XXX_IRQSTAT0_CHGSHORTI

Definition at line 57 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_LOBATHM   MC13XXX_IRQSTAT0_LOBATHI

Definition at line 62 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_LOBATLM   MC13XXX_IRQSTAT0_LOBATLI

Definition at line 61 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK0_TSM   MC13XXX_IRQSTAT0_TSI

Definition at line 51 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1   4

Definition at line 92 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_1HZM   MC13XXX_IRQSTAT1_1HZI

Definition at line 93 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_CLKM   MC13XXX_IRQSTAT1_CLKI

Definition at line 106 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_MEMHLDM   MC13XXX_IRQSTAT1_MEMHLDI

Definition at line 102 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_PCM   MC13XXX_IRQSTAT1_PCI

Definition at line 100 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_RTCRSTM   MC13XXX_IRQSTAT1_RTCRSTI

Definition at line 99 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_SYSRSTM   MC13XXX_IRQSTAT1_SYSRSTI

Definition at line 98 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_THWARNHM   MC13XXX_IRQSTAT1_THWARNHI

Definition at line 105 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_THWARNLM   MC13XXX_IRQSTAT1_THWARNLI

Definition at line 104 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_TODAM   MC13XXX_IRQSTAT1_TODAI

Definition at line 94 of file mc13xxx-core.c.

#define MC13XXX_IRQMASK1_WARMM   MC13XXX_IRQSTAT1_WARMI

Definition at line 101 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0   0

Definition at line 26 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_ADCBISDONEI   (1 << 1)

Definition at line 28 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_ADCDONEI   (1 << 0)

Definition at line 27 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_BPONI   (1 << 12)

Definition at line 38 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_CCCVI   (1 << 10)

Definition at line 36 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_CHGCURRI   (1 << 11)

Definition at line 37 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_CHGDETI   (1 << 6)

Definition at line 32 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_CHGREVI   (1 << 8)

Definition at line 34 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_CHGSHORTI   (1 << 9)

Definition at line 35 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_LOBATHI   (1 << 14)

Definition at line 40 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_LOBATLI   (1 << 13)

Definition at line 39 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT0_TSI   (1 << 2)

Definition at line 29 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1   3

Definition at line 70 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_1HZI   (1 << 0)

Definition at line 71 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_CLKI   (1 << 14)

Definition at line 84 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_MEMHLDI   (1 << 10)

Definition at line 80 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_PCI   (1 << 8)

Definition at line 78 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_RTCRSTI   (1 << 7)

Definition at line 77 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_SYSRSTI   (1 << 6)

Definition at line 76 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_THWARNHI   (1 << 13)

Definition at line 83 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_THWARNLI   (1 << 12)

Definition at line 82 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_TODAI   (1 << 1)

Definition at line 72 of file mc13xxx-core.c.

#define MC13XXX_IRQSTAT1_WARMI   (1 << 9)

Definition at line 79 of file mc13xxx-core.c.

#define MC13XXX_REVISION   7

Definition at line 114 of file mc13xxx-core.c.

#define MC13XXX_REVISION_FAB   (0x03 << 11)

Definition at line 119 of file mc13xxx-core.c.

#define MC13XXX_REVISION_FIN   (0x03 << 9)

Definition at line 118 of file mc13xxx-core.c.

#define MC13XXX_REVISION_ICID   (0x07 << 6)

Definition at line 117 of file mc13xxx-core.c.

#define MC13XXX_REVISION_ICIDCODE   (0x3f << 13)

Definition at line 120 of file mc13xxx-core.c.

#define MC13XXX_REVISION_REVFULL   (0x03 << 3)

Definition at line 116 of file mc13xxx-core.c.

#define MC13XXX_REVISION_REVMETAL   (0x07 << 0)

Definition at line 115 of file mc13xxx-core.c.

Function Documentation

EXPORT_SYMBOL ( mc13xxx_lock  )
EXPORT_SYMBOL ( mc13xxx_unlock  )
EXPORT_SYMBOL ( mc13xxx_reg_read  )
EXPORT_SYMBOL ( mc13xxx_reg_write  )
EXPORT_SYMBOL ( mc13xxx_reg_rmw  )
EXPORT_SYMBOL ( mc13xxx_irq_mask  )
EXPORT_SYMBOL ( mc13xxx_irq_unmask  )
EXPORT_SYMBOL ( mc13xxx_irq_status  )
EXPORT_SYMBOL ( mc13xxx_irq_ack  )
EXPORT_SYMBOL ( mc13xxx_irq_request_nounmask  )
EXPORT_SYMBOL ( mc13xxx_irq_request  )
EXPORT_SYMBOL ( mc13xxx_irq_free  )
EXPORT_SYMBOL ( mc13xxx_get_flags  )
EXPORT_SYMBOL_GPL ( mc13xxx_adc_do_conversion  )
EXPORT_SYMBOL_GPL ( mc13xxx_common_init  )
EXPORT_SYMBOL_GPL ( mc13xxx_common_cleanup  )
int mc13xxx_adc_do_conversion ( struct mc13xxx mc13xxx,
unsigned int  mode,
unsigned int  channel,
u8  ato,
bool  atox,
unsigned int sample 
)

Definition at line 500 of file mc13xxx-core.c.

void mc13xxx_common_cleanup ( struct mc13xxx mc13xxx)

Definition at line 720 of file mc13xxx-core.c.

int mc13xxx_common_init ( struct mc13xxx mc13xxx,
struct mc13xxx_platform_data pdata,
int  irq 
)

Definition at line 652 of file mc13xxx-core.c.

int mc13xxx_get_flags ( struct mc13xxx mc13xxx)

Definition at line 471 of file mc13xxx-core.c.

int mc13xxx_irq_ack ( struct mc13xxx mc13xxx,
int  irq 
)

Definition at line 272 of file mc13xxx-core.c.

int mc13xxx_irq_free ( struct mc13xxx mc13xxx,
int  irq,
void dev 
)

Definition at line 322 of file mc13xxx-core.c.

int mc13xxx_irq_mask ( struct mc13xxx mc13xxx,
int  irq 
)

Definition at line 193 of file mc13xxx-core.c.

int mc13xxx_irq_request ( struct mc13xxx mc13xxx,
int  irq,
irq_handler_t  handler,
const char name,
void dev 
)

Definition at line 302 of file mc13xxx-core.c.

int mc13xxx_irq_request_nounmask ( struct mc13xxx mc13xxx,
int  irq,
irq_handler_t  handler,
const char name,
void dev 
)

Definition at line 283 of file mc13xxx-core.c.

int mc13xxx_irq_status ( struct mc13xxx mc13xxx,
int  irq,
int enabled,
int pending 
)

Definition at line 237 of file mc13xxx-core.c.

int mc13xxx_irq_unmask ( struct mc13xxx mc13xxx,
int  irq 
)

Definition at line 215 of file mc13xxx-core.c.

void mc13xxx_lock ( struct mc13xxx mc13xxx)

Definition at line 131 of file mc13xxx-core.c.

int mc13xxx_reg_read ( struct mc13xxx mc13xxx,
unsigned int  offset,
u32 val 
)

Definition at line 152 of file mc13xxx-core.c.

int mc13xxx_reg_rmw ( struct mc13xxx mc13xxx,
unsigned int  offset,
u32  mask,
u32  val 
)

Definition at line 181 of file mc13xxx-core.c.

int mc13xxx_reg_write ( struct mc13xxx mc13xxx,
unsigned int  offset,
u32  val 
)

Definition at line 168 of file mc13xxx-core.c.

void mc13xxx_unlock ( struct mc13xxx mc13xxx)

Definition at line 144 of file mc13xxx-core.c.

MODULE_AUTHOR ( "Uwe Kleine-Koenig <[email protected]>"  )
MODULE_DESCRIPTION ( "Core driver for Freescale MC13XXX PMIC"  )
MODULE_LICENSE ( "GPL v2 )