Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reorganized version of GPIO's

All of the GPIO names now refer back to board-smba1002.h
  • Loading branch information...
commit 51ed68056c295da398ac1c245dc2bba0adaa5c6e 1 parent 35c1fc5
@fosser2 authored
View
2  arch/arm/mach-tegra/board-smba1002-bootinfo.c 100644 → 100755
@@ -50,7 +50,7 @@ static int smba1002_was_wakeup(void)
{
unsigned long status =
readl(IO_ADDRESS(TEGRA_PMC_BASE) + PMC_WAKE_STATUS);
- return status & TEGRA_WAKE_GPIO_PV2 ? 1 : 0;
+ return status & SMBA1002_KEY_POWER ? 1 : 0;
}
static int bootinfo_show(struct seq_file *m, void *v)
View
4 arch/arm/mach-tegra/board-smba1002-keyboard.c
@@ -90,7 +90,7 @@ static int smba1002_wakeup_key(void)
{
unsigned long status =
readl(IO_ADDRESS(TEGRA_PMC_BASE) + PMC_WAKE_STATUS);
- return status & TEGRA_WAKE_GPIO_PV2 ? KEY_POWER : KEY_RESERVED;
+ return status & SMBA1002_KEY_POWER ? KEY_POWER : KEY_RESERVED;
}
static struct gpio_keys_platform_data smba1002_keys_platform_data = {
@@ -116,7 +116,7 @@ static struct platform_device *smba1002_pmu_devices[] __initdata = {
/* Register all keyboard devices */
int __init smba1002_keyboard_register_devices(void)
{
- //enable_irq_wake(gpio_to_irq(TEGRA_WAKE_GPIO_PV2));
+ //enable_irq_wake(gpio_to_irq(SMBA1002_KEY_POWER));
return platform_add_devices(smba1002_pmu_devices, ARRAY_SIZE(smba1002_pmu_devices));
}
View
32 arch/arm/mach-tegra/board-smba1002-sensors.c
@@ -33,19 +33,19 @@
static struct i2c_board_info __initdata smba1002_i2c_bus0_sensor_info[] = {
{
I2C_BOARD_INFO("bq20z75-battery", 0x0B),
- .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PH2),
+ .irq = TEGRA_GPIO_TO_IRQ(SMBA1002_BATTERY),
},
{
I2C_BOARD_INFO("so340010_kbd", 0x2c),
- .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6),
+ .irq = TEGRA_GPIO_TO_IRQ(SMBA1002_KEYBOARD),
},
{
I2C_BOARD_INFO("lis3lv02d", 0x1C),
- .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PJ0),
+ .irq = TEGRA_GPIO_TO_IRQ(SMBA1002_LIS3LV02D),
},
{
I2C_BOARD_INFO("isl29023", 0x44),
- .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PQ6),
+ .irq = TEGRA_GPIO_TO_IRQ(SMBA1002_ISL29023),
},
};
@@ -78,21 +78,21 @@ static struct i2c_board_info __initdata smba1002_i2c_bus4_sensor_info[] = {
int __init smba1002_sensors_register_devices(void)
{
- tegra_gpio_enable(TEGRA_GPIO_PQ6);
- gpio_request(TEGRA_GPIO_PQ6, "isl29023_irq");
- gpio_direction_input(TEGRA_GPIO_PQ6);
+ tegra_gpio_enable(SMBA1002_ISL29023);
+ gpio_request(SMBA1002_ISL29023, "isl29023_irq");
+ gpio_direction_input(SMBA1002_ISL29023);
- tegra_gpio_enable(TEGRA_GPIO_PH2);
- gpio_request(TEGRA_GPIO_PH2, "ac_present_irq");
- gpio_direction_input(TEGRA_GPIO_PH2);
+ tegra_gpio_enable(TEGRA_GPIO_AC_PRESENT_IRQ);
+ gpio_request(TEGRA_GPIO_AC_PRESENT_IRQ, "ac_present_irq");
+ gpio_direction_input(TEGRA_GPIO_AC_PRESENT_IRQ);
- tegra_gpio_enable(TEGRA_GPIO_PJ0);
- gpio_request(TEGRA_GPIO_PJ0, "lis33de_irq");
- gpio_direction_input(TEGRA_GPIO_PJ0);
+ tegra_gpio_enable(SMBA1002_LIS3LV02D);
+ gpio_request(SMBA1002_LIS3LV02D, "lis33de_irq");
+ gpio_direction_input(SMBA1002_LIS3LV02D);
- tegra_gpio_enable(TEGRA_GPIO_PV6);
- gpio_request(TEGRA_GPIO_PV6, "so340010_kbd_irq");
- gpio_direction_input(TEGRA_GPIO_PV6);
+ tegra_gpio_enable(SMBA1002_KEYBOARD);
+ gpio_request(SMBA1002_KEYBOARD, "so340010_kbd_irq");
+ gpio_direction_input(SMBA1002_KEYBOARD);
tegra_gpio_enable(SMBA1002_TEMP_ALERT);
gpio_request(SMBA1002_TEMP_ALERT, "adt7461_temp_alert_irq");
View
6 arch/arm/mach-tegra/board-smba1002-touch.c 100644 → 100755
@@ -47,9 +47,9 @@ static struct i2c_board_info __initdata smba1002_i2c_bus0_touch_info_at168[] = {
int __init smba1002_touch_register_devices(void)
{
- tegra_gpio_enable(TEGRA_GPIO_PJ7);
- gpio_request(TEGRA_GPIO_PJ7, "at168_touch");
- gpio_direction_input(TEGRA_GPIO_PJ7);
+ tegra_gpio_enable(SMBA1002_TS_IRQ);
+ gpio_request(SMBA1002_TS_IRQ, "at168_touch");
+ gpio_direction_input(SMBA1002_TS_IRQ);
i2c_register_board_info(0, smba1002_i2c_bus0_touch_info_at168, 1);
View
10 arch/arm/mach-tegra/board-smba1002.h 100755 → 100644
@@ -29,6 +29,10 @@
#define SMBA1002_KEY_POWER TEGRA_GPIO_PV2 /* 0=pressed */
#define SMBA1002_KEY_BACK TEGRA_GPIO_PH0 /* 0=pressed */
#define SMBA1002_KEY_HOMEPAGE TEGRA_GPIO_PS2
+#define SMBA1002_KEYBOARD TEGRA_GPIO_PV6
+
+#define SMBA1002_LIS3LV02D TEGRA_GPIO_PJ0 //Accelerometer
+#define SMBA1002_ISL29023 TEGRA_GPIO_PQ6 //Light Sensor
/* #define SMBA1002_EMC_SAMSUNG */
/* #define SMBA1002_EMC_ELPIDA50NM */
@@ -42,8 +46,8 @@
#define SMBA1002_NAND_WPN TEGRA_GPIO_PC7 /* NAND flash write protect: 0=writeprotected */
-#define SMBA1002_BL_ENB TEGRA_GPIO_PD3
-#define SMBA1002_LVDS_SHUTDOWN TEGRA_GPIO_PB2 // Is this right?
+#define SMBA1002_BL_ENB TEGRA_GPIO_PD3 //LCD Backlight enable
+#define SMBA1002_LVDS_SHUTDOWN TEGRA_GPIO_PB2
#define SMBA1002_EN_VDD_PANEL TEGRA_GPIO_PC6
#define SMBA1002_BL_VDD TEGRA_GPIO_PW0
#define SMBA1002_BL_PWM TEGRA_GPIO_PU3 /* PWM */
@@ -103,7 +107,7 @@
#define SMBA1002_TS_RESET TEGRA_GPIO_PH1
#define SMBA1002_TS_POWER TEGRA_GPIO_PK2
-//#define BATTERY TEGRA_GPIO_PN7
+#define SMBA1002_BATTERY TEGRA_GPIO_PW3
//#define SMBA1002_FB_NONROTATE TEGRA_GPIO_PH1 /*1 = screen rotation locked */
#define SMBA1002_WLAN_POWER TEGRA_GPIO_PK5
Please sign in to comment.
Something went wrong with that request. Please try again.