Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
core.h File Reference
#include <linux/i2c.h>
#include <linux/workqueue.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/power_supply.h>
#include <linux/mfd/pcf50633/backlight.h>

Go to the source code of this file.

Data Structures

struct  pcf50633_platform_data
 
struct  pcf50633_irq
 
struct  pcf50633
 

Macros

#define PCF50633_NUM_REGULATORS   11
 
#define PCF50633_REG_INT1   0x02
 
#define PCF50633_REG_INT2   0x03
 
#define PCF50633_REG_INT3   0x04
 
#define PCF50633_REG_INT4   0x05
 
#define PCF50633_REG_INT5   0x06
 
#define PCF50633_REG_INT1M   0x07
 
#define PCF50633_REG_INT2M   0x08
 
#define PCF50633_REG_INT3M   0x09
 
#define PCF50633_REG_INT4M   0x0a
 
#define PCF50633_REG_INT5M   0x0b
 
#define PCF50633_REG_OOCSHDWN   0x0c
 
#define PCF50633_REG_LEDOUT   0x28
 
#define PCF50633_REG_LEDENA   0x29
 
#define PCF50633_REG_LEDCTL   0x2a
 
#define PCF50633_REG_LEDDIM   0x2b
 

Enumerations

enum  {
  PCF50633_IRQ_ADPINS, PCF50633_IRQ_ADPREM, PCF50633_IRQ_USBINS, PCF50633_IRQ_USBREM,
  PCF50633_IRQ_RESERVED1, PCF50633_IRQ_RESERVED2, PCF50633_IRQ_ALARM, PCF50633_IRQ_SECOND,
  PCF50633_IRQ_ONKEYR, PCF50633_IRQ_ONKEYF, PCF50633_IRQ_EXTON1R, PCF50633_IRQ_EXTON1F,
  PCF50633_IRQ_EXTON2R, PCF50633_IRQ_EXTON2F, PCF50633_IRQ_EXTON3R, PCF50633_IRQ_EXTON3F,
  PCF50633_IRQ_BATFULL, PCF50633_IRQ_CHGHALT, PCF50633_IRQ_THLIMON, PCF50633_IRQ_THLIMOFF,
  PCF50633_IRQ_USBLIMON, PCF50633_IRQ_USBLIMOFF, PCF50633_IRQ_ADCRDY, PCF50633_IRQ_ONKEY1S,
  PCF50633_IRQ_LOWSYS, PCF50633_IRQ_LOWBAT, PCF50633_IRQ_HIGHTMP, PCF50633_IRQ_AUTOPWRFAIL,
  PCF50633_IRQ_DWN1PWRFAIL, PCF50633_IRQ_DWN2PWRFAIL, PCF50633_IRQ_LEDPWRFAIL, PCF50633_IRQ_LEDOVP,
  PCF50633_IRQ_LDO1PWRFAIL, PCF50633_IRQ_LDO2PWRFAIL, PCF50633_IRQ_LDO3PWRFAIL, PCF50633_IRQ_LDO4PWRFAIL,
  PCF50633_IRQ_LDO5PWRFAIL, PCF50633_IRQ_LDO6PWRFAIL, PCF50633_IRQ_HCLDOPWRFAIL, PCF50633_IRQ_HCLDOOVL,
  PCF50633_NUM_IRQ
}
 
enum  pcf50633_reg_int1 {
  PCF50633_INT1_ADPINS = 0x01, PCF50633_INT1_ADPREM = 0x02, PCF50633_INT1_USBINS = 0x04, PCF50633_INT1_USBREM = 0x08,
  PCF50633_INT1_ALARM = 0x40, PCF50633_INT1_SECOND = 0x80
}
 
enum  pcf50633_reg_int2 {
  PCF50633_INT2_ONKEYR = 0x01, PCF50633_INT2_ONKEYF = 0x02, PCF50633_INT2_EXTON1R = 0x04, PCF50633_INT2_EXTON1F = 0x08,
  PCF50633_INT2_EXTON2R = 0x10, PCF50633_INT2_EXTON2F = 0x20, PCF50633_INT2_EXTON3R = 0x40, PCF50633_INT2_EXTON3F = 0x80
}
 
enum  pcf50633_reg_int3 {
  PCF50633_INT3_BATFULL = 0x01, PCF50633_INT3_CHGHALT = 0x02, PCF50633_INT3_THLIMON = 0x04, PCF50633_INT3_THLIMOFF = 0x08,
  PCF50633_INT3_USBLIMON = 0x10, PCF50633_INT3_USBLIMOFF = 0x20, PCF50633_INT3_ADCRDY = 0x40, PCF50633_INT3_ONKEY1S = 0x80
}
 
enum  pcf50633_reg_int4 {
  PCF50633_INT4_LOWSYS = 0x01, PCF50633_INT4_LOWBAT = 0x02, PCF50633_INT4_HIGHTMP = 0x04, PCF50633_INT4_AUTOPWRFAIL = 0x08,
  PCF50633_INT4_DWN1PWRFAIL = 0x10, PCF50633_INT4_DWN2PWRFAIL = 0x20, PCF50633_INT4_LEDPWRFAIL = 0x40, PCF50633_INT4_LEDOVP = 0x80
}
 
enum  pcf50633_reg_int5 {
  PCF50633_INT5_LDO1PWRFAIL = 0x01, PCF50633_INT5_LDO2PWRFAIL = 0x02, PCF50633_INT5_LDO3PWRFAIL = 0x04, PCF50633_INT5_LDO4PWRFAIL = 0x08,
  PCF50633_INT5_LDO5PWRFAIL = 0x10, PCF50633_INT5_LDO6PWRFAIL = 0x20, PCF50633_INT5_HCLDOPWRFAIL = 0x40, PCF50633_INT5_HCLDOOVL = 0x80
}
 

Functions

int pcf50633_register_irq (struct pcf50633 *pcf, int irq, void(*handler)(int, void *), void *data)
 
int pcf50633_free_irq (struct pcf50633 *pcf, int irq)
 
int pcf50633_irq_mask (struct pcf50633 *pcf, int irq)
 
int pcf50633_irq_unmask (struct pcf50633 *pcf, int irq)
 
int pcf50633_irq_mask_get (struct pcf50633 *pcf, int irq)
 
int pcf50633_read_block (struct pcf50633 *, u8 reg, int nr_regs, u8 *data)
 
int pcf50633_write_block (struct pcf50633 *pcf, u8 reg, int nr_regs, u8 *data)
 
u8 pcf50633_reg_read (struct pcf50633 *, u8 reg)
 
int pcf50633_reg_write (struct pcf50633 *pcf, u8 reg, u8 val)
 
int pcf50633_reg_set_bit_mask (struct pcf50633 *pcf, u8 reg, u8 mask, u8 val)
 
int pcf50633_reg_clear_bits (struct pcf50633 *pcf, u8 reg, u8 bits)
 
int pcf50633_irq_init (struct pcf50633 *pcf, int irq)
 
void pcf50633_irq_free (struct pcf50633 *pcf)
 

Macro Definition Documentation

#define PCF50633_NUM_REGULATORS   11

Definition at line 26 of file core.h.

#define PCF50633_REG_INT1   0x02

Definition at line 77 of file core.h.

#define PCF50633_REG_INT1M   0x07

Definition at line 83 of file core.h.

#define PCF50633_REG_INT2   0x03

Definition at line 78 of file core.h.

#define PCF50633_REG_INT2M   0x08

Definition at line 84 of file core.h.

#define PCF50633_REG_INT3   0x04

Definition at line 79 of file core.h.

#define PCF50633_REG_INT3M   0x09

Definition at line 85 of file core.h.

#define PCF50633_REG_INT4   0x05

Definition at line 80 of file core.h.

#define PCF50633_REG_INT4M   0x0a

Definition at line 86 of file core.h.

#define PCF50633_REG_INT5   0x06

Definition at line 81 of file core.h.

#define PCF50633_REG_INT5M   0x0b

Definition at line 87 of file core.h.

#define PCF50633_REG_LEDCTL   0x2a

Definition at line 223 of file core.h.

#define PCF50633_REG_LEDDIM   0x2b

Definition at line 224 of file core.h.

#define PCF50633_REG_LEDENA   0x29

Definition at line 222 of file core.h.

#define PCF50633_REG_LEDOUT   0x28

Definition at line 221 of file core.h.

#define PCF50633_REG_OOCSHDWN   0x0c

Definition at line 218 of file core.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
PCF50633_IRQ_ADPINS 
PCF50633_IRQ_ADPREM 
PCF50633_IRQ_USBINS 
PCF50633_IRQ_USBREM 
PCF50633_IRQ_RESERVED1 
PCF50633_IRQ_RESERVED2 
PCF50633_IRQ_ALARM 
PCF50633_IRQ_SECOND 
PCF50633_IRQ_ONKEYR 
PCF50633_IRQ_ONKEYF 
PCF50633_IRQ_EXTON1R 
PCF50633_IRQ_EXTON1F 
PCF50633_IRQ_EXTON2R 
PCF50633_IRQ_EXTON2F 
PCF50633_IRQ_EXTON3R 
PCF50633_IRQ_EXTON3F 
PCF50633_IRQ_BATFULL 
PCF50633_IRQ_CHGHALT 
PCF50633_IRQ_THLIMON 
PCF50633_IRQ_THLIMOFF 
PCF50633_IRQ_USBLIMON 
PCF50633_IRQ_USBLIMOFF 
PCF50633_IRQ_ADCRDY 
PCF50633_IRQ_ONKEY1S 
PCF50633_IRQ_LOWSYS 
PCF50633_IRQ_LOWBAT 
PCF50633_IRQ_HIGHTMP 
PCF50633_IRQ_AUTOPWRFAIL 
PCF50633_IRQ_DWN1PWRFAIL 
PCF50633_IRQ_DWN2PWRFAIL 
PCF50633_IRQ_LEDPWRFAIL 
PCF50633_IRQ_LEDOVP 
PCF50633_IRQ_LDO1PWRFAIL 
PCF50633_IRQ_LDO2PWRFAIL 
PCF50633_IRQ_LDO3PWRFAIL 
PCF50633_IRQ_LDO4PWRFAIL 
PCF50633_IRQ_LDO5PWRFAIL 
PCF50633_IRQ_LDO6PWRFAIL 
PCF50633_IRQ_HCLDOPWRFAIL 
PCF50633_IRQ_HCLDOOVL 
PCF50633_NUM_IRQ 

Definition at line 89 of file core.h.

Enumerator:
PCF50633_INT1_ADPINS 
PCF50633_INT1_ADPREM 
PCF50633_INT1_USBINS 
PCF50633_INT1_USBREM 
PCF50633_INT1_ALARM 
PCF50633_INT1_SECOND 

Definition at line 163 of file core.h.

Enumerator:
PCF50633_INT2_ONKEYR 
PCF50633_INT2_ONKEYF 
PCF50633_INT2_EXTON1R 
PCF50633_INT2_EXTON1F 
PCF50633_INT2_EXTON2R 
PCF50633_INT2_EXTON2F 
PCF50633_INT2_EXTON3R 
PCF50633_INT2_EXTON3F 

Definition at line 173 of file core.h.

Enumerator:
PCF50633_INT3_BATFULL 
PCF50633_INT3_CHGHALT 
PCF50633_INT3_THLIMON 
PCF50633_INT3_THLIMOFF 
PCF50633_INT3_USBLIMON 
PCF50633_INT3_USBLIMOFF 
PCF50633_INT3_ADCRDY 
PCF50633_INT3_ONKEY1S 

Definition at line 184 of file core.h.

Enumerator:
PCF50633_INT4_LOWSYS 
PCF50633_INT4_LOWBAT 
PCF50633_INT4_HIGHTMP 
PCF50633_INT4_AUTOPWRFAIL 
PCF50633_INT4_DWN1PWRFAIL 
PCF50633_INT4_DWN2PWRFAIL 
PCF50633_INT4_LEDPWRFAIL 
PCF50633_INT4_LEDOVP 

Definition at line 195 of file core.h.

Enumerator:
PCF50633_INT5_LDO1PWRFAIL 
PCF50633_INT5_LDO2PWRFAIL 
PCF50633_INT5_LDO3PWRFAIL 
PCF50633_INT5_LDO4PWRFAIL 
PCF50633_INT5_LDO5PWRFAIL 
PCF50633_INT5_LDO6PWRFAIL 
PCF50633_INT5_HCLDOPWRFAIL 
PCF50633_INT5_HCLDOOVL 

Definition at line 206 of file core.h.

Function Documentation

int pcf50633_free_irq ( struct pcf50633 pcf,
int  irq 
)

Definition at line 42 of file pcf50633-irq.c.

void pcf50633_irq_free ( struct pcf50633 pcf)

Definition at line 311 of file pcf50633-irq.c.

int pcf50633_irq_init ( struct pcf50633 pcf,
int  irq 
)

Definition at line 283 of file pcf50633-irq.c.

int pcf50633_irq_mask ( struct pcf50633 pcf,
int  irq 
)

Definition at line 78 of file pcf50633-irq.c.

int pcf50633_irq_mask_get ( struct pcf50633 pcf,
int  irq 
)

Definition at line 94 of file pcf50633-irq.c.

int pcf50633_irq_unmask ( struct pcf50633 pcf,
int  irq 
)

Definition at line 86 of file pcf50633-irq.c.

int pcf50633_read_block ( struct pcf50633 ,
u8  reg,
int  nr_regs,
u8 data 
)

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

int pcf50633_reg_clear_bits ( struct pcf50633 pcf,
u8  reg,
u8  bits 
)

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

u8 pcf50633_reg_read ( struct pcf50633 ,
u8  reg 
)

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

int pcf50633_reg_set_bit_mask ( struct pcf50633 pcf,
u8  reg,
u8  mask,
u8  val 
)

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

int pcf50633_reg_write ( struct pcf50633 pcf,
u8  reg,
u8  val 
)

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

int pcf50633_register_irq ( struct pcf50633 pcf,
int  irq,
void(*)(int, void *)  handler,
void data 
)

Definition at line 24 of file pcf50633-irq.c.

int pcf50633_write_block ( struct pcf50633 pcf,
u8  reg,
int  nr_regs,
u8 data 
)

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