Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
em-x270.c File Reference
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/dm9000.h>
#include <linux/rtc-v3020.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/gpio.h>
#include <linux/mfd/da903x.h>
#include <linux/regulator/machine.h>
#include <linux/spi/spi.h>
#include <linux/spi/tdo24m.h>
#include <linux/spi/libertas_spi.h>
#include <linux/spi/pxa2xx_spi.h>
#include <linux/power_supply.h>
#include <linux/apm-emulation.h>
#include <linux/i2c.h>
#include <linux/i2c/pca953x.h>
#include <linux/i2c/pxa-i2c.h>
#include <linux/regulator/userspace-consumer.h>
#include <media/soc_camera.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/pxa27x.h>
#include <mach/pxa27x-udc.h>
#include <mach/audio.h>
#include <linux/platform_data/video-pxafb.h>
#include <linux/platform_data/usb-ohci-pxa27x.h>
#include <linux/platform_data/mmc-pxamci.h>
#include <linux/platform_data/keypad-pxa27x.h>
#include <linux/platform_data/camera-pxa.h>
#include "generic.h"
#include "devices.h"

Go to the source code of this file.

Macros

#define GPIO13_MMC_CD   (13)
 
#define GPIO95_MMC_WP   (95)
 
#define GPIO56_NAND_RB   (56)
 
#define GPIO93_CAM_RESET   (93)
 
#define GPIO16_USB_HUB_RESET   (16)
 
#define GPIO114_MMC_CD   (114)
 
#define GPIO20_NAND_RB   (20)
 
#define GPIO38_SD_PWEN   (38)
 
#define GPIO37_WLAN_RST   (37)
 
#define GPIO95_TOUCHPAD_INT   (95)
 
#define GPIO130_CAM_RESET   (130)
 
#define GPIO10_USB_HUB_RESET   (10)
 
#define GPIO11_NAND_CS   (11)
 
#define GPIO41_ETHIRQ   (41)
 
#define EM_X270_ETHIRQ   PXA_GPIO_TO_IRQ(GPIO41_ETHIRQ)
 
#define GPIO115_WLAN_PWEN   (115)
 
#define GPIO19_WLAN_STRAP   (19)
 
#define GPIO9_USB_VBUS_EN   (9)
 
#define REGULATOR_CONSUMER(_name, _dev_name, _supply)
 
#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask)
 
#define DA9030_SUBDEV(_name, _id, _pdata)
 
#define DA9030_LDO(num)   DA9030_SUBDEV(regulator, LDO##num, &ldo##num##_data)
 

Functions

 REGULATOR_CONSUMER (ldo3,"reg-userspace-consumer.0","vcc gps")
 
 REGULATOR_CONSUMER (ldo5, NULL,"vcc cam")
 
 REGULATOR_CONSUMER (ldo10,"pxa2xx-mci","vcc sdio")
 
 REGULATOR_CONSUMER (ldo12, NULL,"vcc usb")
 
 REGULATOR_CONSUMER (ldo19,"reg-userspace-consumer.1","vcc gprs")
 
 REGULATOR_CONSUMER (buck2, NULL,"vcc_core")
 
 REGULATOR_INIT (ldo3, 3200000, 3200000, REGULATOR_CHANGE_STATUS)
 
 REGULATOR_INIT (ldo5, 3000000, 3000000, REGULATOR_CHANGE_STATUS)
 
 REGULATOR_INIT (ldo10, 2000000, 3200000, REGULATOR_CHANGE_STATUS|REGULATOR_CHANGE_VOLTAGE)
 
 REGULATOR_INIT (ldo12, 3000000, 3000000, REGULATOR_CHANGE_STATUS)
 
 REGULATOR_INIT (ldo19, 3200000, 3200000, REGULATOR_CHANGE_STATUS)
 
 REGULATOR_INIT (buck2, 1000000, 1650000, REGULATOR_CHANGE_VOLTAGE)
 

Variables

struct led_info em_x270_led_info
 
struct power_supply_info em_x270_psy_info
 
struct da9030_battery_info em_x270_batterty_info
 
struct da903x_subdev_info em_x270_da9030_subdevs []
 
 atag_offset = 0x100
 
 map_io = pxa27x_map_io
 
 nr_irqs = PXA_NR_IRQS
 
 init_irq = pxa27x_init_irq
 
 handle_irq = pxa27x_handle_irq
 
 timer = &pxa_timer
 
 init_machine = em_x270_init
 
 restart = pxa_restart
 

Macro Definition Documentation

#define DA9030_LDO (   num)    DA9030_SUBDEV(regulator, LDO##num, &ldo##num##_data)

Definition at line 1177 of file em-x270.c.

#define DA9030_SUBDEV (   _name,
  _id,
  _pdata 
)
Value:
{ \
.name = "da903x-" #_name, \
.id = DA9030_ID_##_id, \
.platform_data = _pdata, \
}

Definition at line 1170 of file em-x270.c.

#define EM_X270_ETHIRQ   PXA_GPIO_TO_IRQ(GPIO41_ETHIRQ)

Definition at line 73 of file em-x270.c.

#define GPIO10_USB_HUB_RESET   (10)

Definition at line 68 of file em-x270.c.

#define GPIO114_MMC_CD   (114)

Definition at line 62 of file em-x270.c.

#define GPIO115_WLAN_PWEN   (115)

Definition at line 74 of file em-x270.c.

#define GPIO11_NAND_CS   (11)

Definition at line 71 of file em-x270.c.

#define GPIO130_CAM_RESET   (130)

Definition at line 67 of file em-x270.c.

#define GPIO13_MMC_CD   (13)

Definition at line 55 of file em-x270.c.

#define GPIO16_USB_HUB_RESET   (16)

Definition at line 59 of file em-x270.c.

#define GPIO19_WLAN_STRAP   (19)

Definition at line 75 of file em-x270.c.

#define GPIO20_NAND_RB   (20)

Definition at line 63 of file em-x270.c.

#define GPIO37_WLAN_RST   (37)

Definition at line 65 of file em-x270.c.

#define GPIO38_SD_PWEN   (38)

Definition at line 64 of file em-x270.c.

#define GPIO41_ETHIRQ   (41)

Definition at line 72 of file em-x270.c.

#define GPIO56_NAND_RB   (56)

Definition at line 57 of file em-x270.c.

#define GPIO93_CAM_RESET   (93)

Definition at line 58 of file em-x270.c.

#define GPIO95_MMC_WP   (95)

Definition at line 56 of file em-x270.c.

#define GPIO95_TOUCHPAD_INT   (95)

Definition at line 66 of file em-x270.c.

#define GPIO9_USB_VBUS_EN   (9)

Definition at line 76 of file em-x270.c.

#define REGULATOR_CONSUMER (   _name,
  _dev_name,
  _supply 
)
Value:
static struct regulator_consumer_supply _name##_consumers[] = { \
REGULATOR_SUPPLY(_supply, _dev_name), \
}

Definition at line 1083 of file em-x270.c.

#define REGULATOR_INIT (   _ldo,
  _min_uV,
  _max_uV,
  _ops_mask 
)
Value:
static struct regulator_init_data _ldo##_data = { \
.constraints = { \
.min_uV = _min_uV, \
.max_uV = _max_uV, \
.state_mem = { \
.enabled = 0, \
}, \
.valid_ops_mask = _ops_mask, \
.apply_uV = 1, \
}, \
.num_consumer_supplies = ARRAY_SIZE(_ldo##_consumers), \
.consumer_supplies = _ldo##_consumers, \
};

Definition at line 1095 of file em-x270.c.

Function Documentation

REGULATOR_CONSUMER ( ldo3  ,
"reg-userspace-consumer.0"  ,
"vcc gps"   
)
REGULATOR_CONSUMER ( ldo5  ,
NULL  ,
"vcc cam  
)
REGULATOR_CONSUMER ( ldo10  ,
"pxa2xx-mci ,
"vcc sdio"   
)
REGULATOR_CONSUMER ( ldo12  ,
NULL  ,
"vcc usb  
)
REGULATOR_CONSUMER ( ldo19  ,
"reg-userspace-consumer.1"  ,
"vcc gprs"   
)
REGULATOR_CONSUMER ( buck2  ,
NULL  ,
"vcc_core"   
)
REGULATOR_INIT ( ldo3  ,
3200000  ,
3200000  ,
REGULATOR_CHANGE_STATUS   
)
REGULATOR_INIT ( ldo5  ,
3000000  ,
3000000  ,
REGULATOR_CHANGE_STATUS   
)
REGULATOR_INIT ( ldo10  ,
2000000  ,
3200000  ,
REGULATOR_CHANGE_STATUS REGULATOR_CHANGE_VOLTAGE 
)
REGULATOR_INIT ( ldo12  ,
3000000  ,
3000000  ,
REGULATOR_CHANGE_STATUS   
)
REGULATOR_INIT ( ldo19  ,
3200000  ,
3200000  ,
REGULATOR_CHANGE_STATUS   
)
REGULATOR_INIT ( buck2  ,
1000000  ,
1650000  ,
REGULATOR_CHANGE_VOLTAGE   
)

Variable Documentation

MACHINE_END atag_offset = 0x100

Definition at line 1296 of file em-x270.c.

struct da9030_battery_info em_x270_batterty_info
Initial value:
= {
.battery_info = &em_x270_psy_info,
.charge_milliamp = 1000,
.charge_millivolt = 4200,
.vbat_low = 3600,
.vbat_crit = 3400,
.vbat_charge_start = 4100,
.vbat_charge_stop = 4200,
.vbat_charge_restart = 4000,
.vcharge_min = 3200,
.vcharge_max = 5500,
.tbat_low = 197,
.tbat_high = 78,
.tbat_restart = 100,
.batmon_interval = 0,
.battery_low = em_x270_battery_low,
.battery_critical = em_x270_battery_critical,
}

Definition at line 1145 of file em-x270.c.

struct da903x_subdev_info em_x270_da9030_subdevs[]
Initial value:

Definition at line 1179 of file em-x270.c.

struct led_info em_x270_led_info
Initial value:
= {
.name = "em-x270:orange",
.default_trigger = "battery-charging-or-full",
}

Definition at line 1118 of file em-x270.c.

struct power_supply_info em_x270_psy_info
Initial value:
= {
.name = "battery",
.voltage_max_design = 4200000,
.voltage_min_design = 3000000,
.use_for_apm = 1,
}

Definition at line 1123 of file em-x270.c.

Definition at line 1300 of file em-x270.c.

Definition at line 1299 of file em-x270.c.

MACHINE_END init_machine = em_x270_init

Definition at line 1302 of file em-x270.c.

Definition at line 1297 of file em-x270.c.

Definition at line 1298 of file em-x270.c.

Definition at line 1303 of file em-x270.c.

Definition at line 1301 of file em-x270.c.