Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
88pm800.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/mfd/core.h>
#include <linux/mfd/88pm80x.h>
#include <linux/slab.h>

Go to the source code of this file.

Macros

#define PM800_CHIP_ID   (0x00)
 
#define PM800_INT_STATUS1   (0x05)
 
#define PM800_ONKEY_INT_STS1   (1 << 0)
 
#define PM800_EXTON_INT_STS1   (1 << 1)
 
#define PM800_CHG_INT_STS1   (1 << 2)
 
#define PM800_BAT_INT_STS1   (1 << 3)
 
#define PM800_RTC_INT_STS1   (1 << 4)
 
#define PM800_CLASSD_OC_INT_STS1   (1 << 5)
 
#define PM800_INT_STATUS2   (0x06)
 
#define PM800_VBAT_INT_STS2   (1 << 0)
 
#define PM800_VSYS_INT_STS2   (1 << 1)
 
#define PM800_VCHG_INT_STS2   (1 << 2)
 
#define PM800_TINT_INT_STS2   (1 << 3)
 
#define PM800_GPADC0_INT_STS2   (1 << 4)
 
#define PM800_TBAT_INT_STS2   (1 << 5)
 
#define PM800_GPADC2_INT_STS2   (1 << 6)
 
#define PM800_GPADC3_INT_STS2   (1 << 7)
 
#define PM800_INT_STATUS3   (0x07)
 
#define PM800_INT_STATUS4   (0x08)
 
#define PM800_GPIO0_INT_STS4   (1 << 0)
 
#define PM800_GPIO1_INT_STS4   (1 << 1)
 
#define PM800_GPIO2_INT_STS4   (1 << 2)
 
#define PM800_GPIO3_INT_STS4   (1 << 3)
 
#define PM800_GPIO4_INT_STS4   (1 << 4)
 
#define PM800_INT_ENA_1   (0x09)
 
#define PM800_ONKEY_INT_ENA1   (1 << 0)
 
#define PM800_EXTON_INT_ENA1   (1 << 1)
 
#define PM800_CHG_INT_ENA1   (1 << 2)
 
#define PM800_BAT_INT_ENA1   (1 << 3)
 
#define PM800_RTC_INT_ENA1   (1 << 4)
 
#define PM800_CLASSD_OC_INT_ENA1   (1 << 5)
 
#define PM800_INT_ENA_2   (0x0A)
 
#define PM800_VBAT_INT_ENA2   (1 << 0)
 
#define PM800_VSYS_INT_ENA2   (1 << 1)
 
#define PM800_VCHG_INT_ENA2   (1 << 2)
 
#define PM800_TINT_INT_ENA2   (1 << 3)
 
#define PM800_INT_ENA_3   (0x0B)
 
#define PM800_GPADC0_INT_ENA3   (1 << 0)
 
#define PM800_GPADC1_INT_ENA3   (1 << 1)
 
#define PM800_GPADC2_INT_ENA3   (1 << 2)
 
#define PM800_GPADC3_INT_ENA3   (1 << 3)
 
#define PM800_GPADC4_INT_ENA3   (1 << 4)
 
#define PM800_INT_ENA_4   (0x0C)
 
#define PM800_GPIO0_INT_ENA4   (1 << 0)
 
#define PM800_GPIO1_INT_ENA4   (1 << 1)
 
#define PM800_GPIO2_INT_ENA4   (1 << 2)
 
#define PM800_GPIO3_INT_ENA4   (1 << 3)
 
#define PM800_GPIO4_INT_ENA4   (1 << 4)
 
#define PM800_INT_REG_NUM   (4)
 

Enumerations

enum  {
  PM800_IRQ_ONKEY, PM800_IRQ_EXTON, PM800_IRQ_CHG, PM800_IRQ_BAT,
  PM800_IRQ_RTC, PM800_IRQ_CLASSD, PM800_IRQ_VBAT, PM800_IRQ_VSYS,
  PM800_IRQ_VCHG, PM800_IRQ_TINT, PM800_IRQ_GPADC0, PM800_IRQ_GPADC1,
  PM800_IRQ_GPADC2, PM800_IRQ_GPADC3, PM800_IRQ_GPADC4, PM800_IRQ_GPIO0,
  PM800_IRQ_GPIO1, PM800_IRQ_GPIO2, PM800_IRQ_GPIO3, PM800_IRQ_GPIO4,
  PM800_MAX_IRQ
}
 
enum  {
  PM800_CHIP_A0 = 0x60, PM800_CHIP_A1 = 0x61, PM800_CHIP_B0 = 0x62, PM800_CHIP_C0 = 0x63,
  PM800_CHIP_END = PM800_CHIP_C0, PM8XXX_CHIP_END = PM800_CHIP_END
}
 

Functions

 MODULE_DEVICE_TABLE (i2c, pm80x_id_table)
 
 subsys_initcall (pm800_i2c_init)
 
 module_exit (pm800_i2c_exit)
 
 MODULE_DESCRIPTION ("PMIC Driver for Marvell 88PM800")
 
 MODULE_AUTHOR ("Qiao Zhou <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define PM800_BAT_INT_ENA1   (1 << 3)

Definition at line 64 of file 88pm800.c.

#define PM800_BAT_INT_STS1   (1 << 3)

Definition at line 37 of file 88pm800.c.

#define PM800_CHG_INT_ENA1   (1 << 2)

Definition at line 63 of file 88pm800.c.

#define PM800_CHG_INT_STS1   (1 << 2)

Definition at line 36 of file 88pm800.c.

#define PM800_CHIP_ID   (0x00)

Definition at line 30 of file 88pm800.c.

#define PM800_CLASSD_OC_INT_ENA1   (1 << 5)

Definition at line 66 of file 88pm800.c.

#define PM800_CLASSD_OC_INT_STS1   (1 << 5)

Definition at line 39 of file 88pm800.c.

#define PM800_EXTON_INT_ENA1   (1 << 1)

Definition at line 62 of file 88pm800.c.

#define PM800_EXTON_INT_STS1   (1 << 1)

Definition at line 35 of file 88pm800.c.

#define PM800_GPADC0_INT_ENA3   (1 << 0)

Definition at line 75 of file 88pm800.c.

#define PM800_GPADC0_INT_STS2   (1 << 4)

Definition at line 46 of file 88pm800.c.

#define PM800_GPADC1_INT_ENA3   (1 << 1)

Definition at line 76 of file 88pm800.c.

#define PM800_GPADC2_INT_ENA3   (1 << 2)

Definition at line 77 of file 88pm800.c.

#define PM800_GPADC2_INT_STS2   (1 << 6)

Definition at line 48 of file 88pm800.c.

#define PM800_GPADC3_INT_ENA3   (1 << 3)

Definition at line 78 of file 88pm800.c.

#define PM800_GPADC3_INT_STS2   (1 << 7)

Definition at line 49 of file 88pm800.c.

#define PM800_GPADC4_INT_ENA3   (1 << 4)

Definition at line 79 of file 88pm800.c.

#define PM800_GPIO0_INT_ENA4   (1 << 0)

Definition at line 82 of file 88pm800.c.

#define PM800_GPIO0_INT_STS4   (1 << 0)

Definition at line 54 of file 88pm800.c.

#define PM800_GPIO1_INT_ENA4   (1 << 1)

Definition at line 83 of file 88pm800.c.

#define PM800_GPIO1_INT_STS4   (1 << 1)

Definition at line 55 of file 88pm800.c.

#define PM800_GPIO2_INT_ENA4   (1 << 2)

Definition at line 84 of file 88pm800.c.

#define PM800_GPIO2_INT_STS4   (1 << 2)

Definition at line 56 of file 88pm800.c.

#define PM800_GPIO3_INT_ENA4   (1 << 3)

Definition at line 85 of file 88pm800.c.

#define PM800_GPIO3_INT_STS4   (1 << 3)

Definition at line 57 of file 88pm800.c.

#define PM800_GPIO4_INT_ENA4   (1 << 4)

Definition at line 86 of file 88pm800.c.

#define PM800_GPIO4_INT_STS4   (1 << 4)

Definition at line 58 of file 88pm800.c.

#define PM800_INT_ENA_1   (0x09)

Definition at line 60 of file 88pm800.c.

#define PM800_INT_ENA_2   (0x0A)

Definition at line 68 of file 88pm800.c.

#define PM800_INT_ENA_3   (0x0B)

Definition at line 74 of file 88pm800.c.

#define PM800_INT_ENA_4   (0x0C)

Definition at line 81 of file 88pm800.c.

#define PM800_INT_REG_NUM   (4)

Definition at line 89 of file 88pm800.c.

#define PM800_INT_STATUS1   (0x05)

Definition at line 33 of file 88pm800.c.

#define PM800_INT_STATUS2   (0x06)

Definition at line 41 of file 88pm800.c.

#define PM800_INT_STATUS3   (0x07)

Definition at line 51 of file 88pm800.c.

#define PM800_INT_STATUS4   (0x08)

Definition at line 53 of file 88pm800.c.

#define PM800_ONKEY_INT_ENA1   (1 << 0)

Definition at line 61 of file 88pm800.c.

#define PM800_ONKEY_INT_STS1   (1 << 0)

Definition at line 34 of file 88pm800.c.

#define PM800_RTC_INT_ENA1   (1 << 4)

Definition at line 65 of file 88pm800.c.

#define PM800_RTC_INT_STS1   (1 << 4)

Definition at line 38 of file 88pm800.c.

#define PM800_TBAT_INT_STS2   (1 << 5)

Definition at line 47 of file 88pm800.c.

#define PM800_TINT_INT_ENA2   (1 << 3)

Definition at line 72 of file 88pm800.c.

#define PM800_TINT_INT_STS2   (1 << 3)

Definition at line 45 of file 88pm800.c.

#define PM800_VBAT_INT_ENA2   (1 << 0)

Definition at line 69 of file 88pm800.c.

#define PM800_VBAT_INT_STS2   (1 << 0)

Definition at line 42 of file 88pm800.c.

#define PM800_VCHG_INT_ENA2   (1 << 2)

Definition at line 71 of file 88pm800.c.

#define PM800_VCHG_INT_STS2   (1 << 2)

Definition at line 44 of file 88pm800.c.

#define PM800_VSYS_INT_ENA2   (1 << 1)

Definition at line 70 of file 88pm800.c.

#define PM800_VSYS_INT_STS2   (1 << 1)

Definition at line 43 of file 88pm800.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
PM800_IRQ_ONKEY 
PM800_IRQ_EXTON 
PM800_IRQ_CHG 
PM800_IRQ_BAT 
PM800_IRQ_RTC 
PM800_IRQ_CLASSD 
PM800_IRQ_VBAT 
PM800_IRQ_VSYS 
PM800_IRQ_VCHG 
PM800_IRQ_TINT 
PM800_IRQ_GPADC0 
PM800_IRQ_GPADC1 
PM800_IRQ_GPADC2 
PM800_IRQ_GPADC3 
PM800_IRQ_GPADC4 
PM800_IRQ_GPIO0 
PM800_IRQ_GPIO1 
PM800_IRQ_GPIO2 
PM800_IRQ_GPIO3 
PM800_IRQ_GPIO4 
PM800_MAX_IRQ 

Definition at line 92 of file 88pm800.c.

anonymous enum
Enumerator:
PM800_CHIP_A0 
PM800_CHIP_A1 
PM800_CHIP_B0 
PM800_CHIP_C0 
PM800_CHIP_END 
PM8XXX_CHIP_END 

Definition at line 116 of file 88pm800.c.

Function Documentation

MODULE_AUTHOR ( "Qiao Zhou <[email protected]>"  )
MODULE_DESCRIPTION ( "PMIC Driver for Marvell 88PM800"  )
MODULE_DEVICE_TABLE ( i2c  ,
pm80x_id_table   
)
module_exit ( pm800_i2c_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( pm800_i2c_init  )