2222#include <linux/gpio.h>
2323#include <linux/gpio_keys.h>
2424#include <linux/input.h>
25+ #include <linux/input/navpoint.h>
2526#include <linux/lcd.h>
2627#include <linux/mfd/htc-egpio.h>
2728#include <linux/mfd/asic3.h>
@@ -117,7 +118,7 @@ static unsigned long hx4700_pin_config[] __initdata = {
117118 GPIO113_I2S_SYSCLK ,
118119
119120 /* SSP 1 (NavPoint) */
120- GPIO23_SSP1_SCLK ,
121+ GPIO23_SSP1_SCLK_IN ,
121122 GPIO24_SSP1_SFRM ,
122123 GPIO25_SSP1_TXD ,
123124 GPIO26_SSP1_RXD ,
@@ -133,6 +134,9 @@ static unsigned long hx4700_pin_config[] __initdata = {
133134 GPIO13_GPIO , /* W3220_IRQ */
134135 GPIO14_GPIO , /* nWLAN_IRQ */
135136
137+ /* HX4700 specific output GPIOs */
138+ GPIO102_GPIO | MFP_LPM_DRIVE_LOW , /* SYNAPTICS_POWER_ON */
139+
136140 GPIO10_GPIO , /* GSM_IRQ */
137141 GPIO13_GPIO , /* CPLD_IRQ */
138142 GPIO107_GPIO , /* DS1WM_IRQ */
@@ -186,6 +190,23 @@ static struct platform_device gpio_keys = {
186190 .id = -1 ,
187191};
188192
193+ /*
194+ * Synaptics NavPoint connected to SSP1
195+ */
196+
197+ static struct navpoint_platform_data navpoint_platform_data = {
198+ .port = 1 ,
199+ .gpio = GPIO102_HX4700_SYNAPTICS_POWER_ON ,
200+ };
201+
202+ static struct platform_device navpoint = {
203+ .name = "navpoint" ,
204+ .id = -1 ,
205+ .dev = {
206+ .platform_data = & navpoint_platform_data ,
207+ },
208+ };
209+
189210/*
190211 * ASIC3
191212 */
@@ -685,12 +706,8 @@ static struct platform_device power_supply = {
685706 */
686707
687708static struct regulator_consumer_supply bq24022_consumers [] = {
688- {
689- .supply = "vbus_draw" ,
690- },
691- {
692- .supply = "ac_draw" ,
693- },
709+ REGULATOR_SUPPLY ("vbus_draw" , NULL ),
710+ REGULATOR_SUPPLY ("ac_draw" , NULL ),
694711};
695712
696713static struct regulator_init_data bq24022_init_data = {
@@ -769,9 +786,8 @@ static struct platform_device strataflash = {
769786 * Maxim MAX1587A on PI2C
770787 */
771788
772- static struct regulator_consumer_supply max1587a_consumer = {
773- .supply = "vcc_core" ,
774- };
789+ static struct regulator_consumer_supply max1587a_consumer =
790+ REGULATOR_SUPPLY ("vcc_core" , NULL );
775791
776792static struct regulator_init_data max1587a_v3_info = {
777793 .constraints = {
@@ -833,6 +849,7 @@ static struct platform_device audio = {
833849static struct platform_device * devices [] __initdata = {
834850 & asic3 ,
835851 & gpio_keys ,
852+ & navpoint ,
836853 & backlight ,
837854 & w3220 ,
838855 & hx4700_lcd ,
0 commit comments