Merge branch 'board-specific' of git://github.com/hzhuang1/linux into next/boards
authorOlof Johansson <olof@lixom.net>
Sat, 19 May 2012 06:46:36 +0000 (23:46 -0700)
committerOlof Johansson <olof@lixom.net>
Sat, 19 May 2012 06:46:36 +0000 (23:46 -0700)
* 'board-specific' of git://github.com/hzhuang1/linux:
  ARM: pxa: hx4700: Add Synaptics NavPoint touchpad
  ARM: pxa: Use REGULATOR_SUPPLY macro

1  2 
arch/arm/mach-pxa/hx4700.c
arch/arm/mach-pxa/mioa701.c

@@@ -22,6 -22,7 +22,7 @@@
  #include <linux/gpio.h>
  #include <linux/gpio_keys.h>
  #include <linux/input.h>
+ #include <linux/input/navpoint.h>
  #include <linux/lcd.h>
  #include <linux/mfd/htc-egpio.h>
  #include <linux/mfd/asic3.h>
@@@ -102,10 -103,6 +103,10 @@@ static unsigned long hx4700_pin_config[
        GPIO44_BTUART_CTS,
        GPIO45_BTUART_RTS_LPM_LOW,
  
 +      /* STUART (IRDA) */
 +      GPIO46_STUART_RXD,
 +      GPIO47_STUART_TXD,
 +
        /* PWM 1 (Backlight) */
        GPIO17_PWM1_OUT,
  
        GPIO113_I2S_SYSCLK,
  
        /* SSP 1 (NavPoint) */
-       GPIO23_SSP1_SCLK,
+       GPIO23_SSP1_SCLK_IN,
        GPIO24_SSP1_SFRM,
        GPIO25_SSP1_TXD,
        GPIO26_SSP1_RXD,
        GPIO88_GPIO,
  
        /* HX4700 specific input GPIOs */
 -      GPIO12_GPIO,    /* ASIC3_IRQ */
 +      GPIO12_GPIO | WAKEUP_ON_EDGE_RISE,      /* ASIC3_IRQ */
        GPIO13_GPIO,    /* W3220_IRQ */
        GPIO14_GPIO,    /* nWLAN_IRQ */
  
+       /* HX4700 specific output GPIOs */
+       GPIO102_GPIO | MFP_LPM_DRIVE_LOW,       /* SYNAPTICS_POWER_ON */
        GPIO10_GPIO,    /* GSM_IRQ */
        GPIO13_GPIO,    /* CPLD_IRQ */
        GPIO107_GPIO,   /* DS1WM_IRQ */
@@@ -187,6 -187,23 +191,23 @@@ static struct platform_device gpio_key
  };
  
  /*
+  * Synaptics NavPoint connected to SSP1
+  */
+ static struct navpoint_platform_data navpoint_platform_data = {
+       .port   = 1,
+       .gpio   = GPIO102_HX4700_SYNAPTICS_POWER_ON,
+ };
+ static struct platform_device navpoint = {
+       .name   = "navpoint",
+       .id     = -1,
+       .dev = {
+               .platform_data = &navpoint_platform_data,
+       },
+ };
+ /*
   * ASIC3
   */
  
@@@ -231,6 -248,7 +252,6 @@@ static u16 asic3_gpio_config[] = 
        ASIC3_GPIOC0_LED0,              /* red */
        ASIC3_GPIOC1_LED1,              /* green */
        ASIC3_GPIOC2_LED2,              /* blue */
 -      ASIC3_GPIOC4_CF_nCD,
        ASIC3_GPIOC5_nCIOW,
        ASIC3_GPIOC6_nCIOR,
        ASIC3_GPIOC7_nPCE_1,
        ASIC3_GPIOC15_nPIOR,
  
        /* GPIOD: input GPIOs, CF */
 +      ASIC3_GPIOD4_CF_nCD,
        ASIC3_GPIOD11_nCIOIS16,
        ASIC3_GPIOD12_nCWAIT,
        ASIC3_GPIOD15_nPIOW,
@@@ -295,7 -312,6 +316,7 @@@ static struct asic3_platform_data asic3
        .gpio_config_num = ARRAY_SIZE(asic3_gpio_config),
        .irq_base        = IRQ_BOARD_START,
        .gpio_base       = HX4700_ASIC3_GPIO_BASE,
 +      .clock_rate      = 4000000,
        .leds            = asic3_leds,
  };
  
@@@ -685,12 -701,8 +706,8 @@@ static struct platform_device power_sup
   */
  
  static struct regulator_consumer_supply bq24022_consumers[] = {
-       {
-               .supply = "vbus_draw",
-       },
-       {
-               .supply = "ac_draw",
-       },
+       REGULATOR_SUPPLY("vbus_draw", NULL),
+       REGULATOR_SUPPLY("ac_draw", NULL),
  };
  
  static struct regulator_init_data bq24022_init_data = {
@@@ -769,9 -781,8 +786,8 @@@ static struct platform_device stratafla
   * Maxim MAX1587A on PI2C
   */
  
- static struct regulator_consumer_supply max1587a_consumer = {
-       .supply = "vcc_core",
- };
+ static struct regulator_consumer_supply max1587a_consumer =
+       REGULATOR_SUPPLY("vcc_core", NULL);
  
  static struct regulator_init_data max1587a_v3_info = {
        .constraints = {
@@@ -833,6 -844,7 +849,7 @@@ static struct platform_device audio = 
  static struct platform_device *devices[] __initdata = {
        &asic3,
        &gpio_keys,
+       &navpoint,
        &backlight,
        &w3220,
        &hx4700_lcd,
@@@ -864,7 -876,6 +881,7 @@@ static void __init hx4700_init(void
        int ret;
  
        pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
 +      gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1);
        ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
        if (ret)
                pr_err ("hx4700: Failed to request GPIOs.\n");
@@@ -103,7 -103,6 +103,7 @@@ static unsigned long mioa701_pin_config
        GPIO82_CIF_DD_5,
        GPIO84_CIF_FV,
        GPIO85_CIF_LV,
 +      MIO_CFG_OUT(GPIO56_MT9M111_nOE, AF0, DRIVE_LOW),
  
        /* Bluetooth */
        MIO_CFG_IN(GPIO14_BT_nACTIVITY, AF0),
@@@ -582,9 -581,7 +582,7 @@@ static struct wm97xx_pdata mioa701_wm97
   * Voltage regulation
   */
  static struct regulator_consumer_supply max1586_consumers[] = {
-       {
-               .supply = "vcc_core",
-       }
+       REGULATOR_SUPPLY("vcc_core", NULL),
  };
  
  static struct regulator_init_data max1586_v3_info = {
@@@ -706,7 -703,6 +704,7 @@@ static struct gpio global_gpios[] = 
        { GPIO9_CHARGE_EN, GPIOF_OUT_INIT_HIGH, "Charger enable" },
        { GPIO18_POWEROFF, GPIOF_OUT_INIT_LOW, "Power Off" },
        { GPIO87_LCD_POWER, GPIOF_OUT_INIT_LOW, "LCD Power" },
 +      { GPIO56_MT9M111_nOE, GPIOF_OUT_INIT_LOW, "Camera nOE" },
  };
  
  static void __init mioa701_machine_init(void)