Skip to content

Commit 48a5765

Browse files
committed
Merge branch 'board-specific' of git://github.com/hzhuang1/linux into next/boards
* 'board-specific' of git://github.com/hzhuang1/linux: ARM: pxa: hx4700: Add Synaptics NavPoint touchpad ARM: pxa: Use REGULATOR_SUPPLY macro
2 parents 0e6ce5f + b2596c6 commit 48a5765

12 files changed

Lines changed: 39 additions & 45 deletions

File tree

‎arch/arm/mach-pxa/balloon3.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,9 +732,7 @@ static inline void balloon3_nand_init(void) {}
732732
#if defined(CONFIG_REGULATOR_MAX1586) || \
733733
defined(CONFIG_REGULATOR_MAX1586_MODULE)
734734
static struct regulator_consumer_supply balloon3_max1587a_consumers[] = {
735-
{
736-
.supply = "vcc_core",
737-
}
735+
REGULATOR_SUPPLY("vcc_core", NULL),
738736
};
739737

740738
static struct regulator_init_data balloon3_max1587a_v3_info = {

‎arch/arm/mach-pxa/cm-x300.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,9 +713,7 @@ struct da9030_battery_info cm_x300_battery_info = {
713713
};
714714

715715
static struct regulator_consumer_supply buck2_consumers[] = {
716-
{
717-
.supply = "vcc_core",
718-
},
716+
REGULATOR_SUPPLY("vcc_core", NULL),
719717
};
720718

721719
static struct regulator_init_data buck2_data = {

‎arch/arm/mach-pxa/em-x270.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,10 +1085,7 @@ static void __init em_x270_userspace_consumers_init(void)
10851085
/* DA9030 related initializations */
10861086
#define REGULATOR_CONSUMER(_name, _dev_name, _supply) \
10871087
static struct regulator_consumer_supply _name##_consumers[] = { \
1088-
{ \
1089-
.dev_name = _dev_name, \
1090-
.supply = _supply, \
1091-
}, \
1088+
REGULATOR_SUPPLY(_supply, _dev_name), \
10921089
}
10931090

10941091
REGULATOR_CONSUMER(ldo3, "reg-userspace-consumer.0", "vcc gps");

‎arch/arm/mach-pxa/hx4700.c‎

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
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

687708
static 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

696713
static 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

776792
static struct regulator_init_data max1587a_v3_info = {
777793
.constraints = {
@@ -833,6 +849,7 @@ static struct platform_device audio = {
833849
static struct platform_device *devices[] __initdata = {
834850
&asic3,
835851
&gpio_keys,
852+
&navpoint,
836853
&backlight,
837854
&w3220,
838855
&hx4700_lcd,

‎arch/arm/mach-pxa/include/mach/mfp-pxa27x.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
#define GPIO113_I2S_SYSCLK MFP_CFG_OUT(GPIO113, AF1, DRIVE_LOW)
209209

210210
/* SSP 1 */
211+
#define GPIO23_SSP1_SCLK_IN MFP_CFG_IN(GPIO23, AF2)
211212
#define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW)
212213
#define GPIO29_SSP1_SCLK MFP_CFG_IN(GPIO29, AF3)
213214
#define GPIO27_SSP1_SYSCLK MFP_CFG_OUT(GPIO27, AF1, DRIVE_LOW)

‎arch/arm/mach-pxa/magician.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -579,12 +579,8 @@ static struct platform_device power_supply = {
579579
*/
580580

581581
static struct regulator_consumer_supply bq24022_consumers[] = {
582-
{
583-
.supply = "vbus_draw",
584-
},
585-
{
586-
.supply = "ac_draw",
587-
},
582+
REGULATOR_SUPPLY("vbus_draw", NULL),
583+
REGULATOR_SUPPLY("ac_draw", NULL),
588584
};
589585

590586
static struct regulator_init_data bq24022_init_data = {

‎arch/arm/mach-pxa/mioa701.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,7 @@ static struct wm97xx_pdata mioa701_wm97xx_pdata = {
582582
* Voltage regulation
583583
*/
584584
static struct regulator_consumer_supply max1586_consumers[] = {
585-
{
586-
.supply = "vcc_core",
587-
}
585+
REGULATOR_SUPPLY("vcc_core", NULL),
588586
};
589587

590588
static struct regulator_init_data max1586_v3_info = {

‎arch/arm/mach-pxa/palm27x.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,7 @@ void __init palm27x_power_init(int ac, int usb)
429429
#if defined(CONFIG_REGULATOR_MAX1586) || \
430430
defined(CONFIG_REGULATOR_MAX1586_MODULE)
431431
static struct regulator_consumer_supply palm27x_max1587a_consumers[] = {
432-
{
433-
.supply = "vcc_core",
434-
}
432+
REGULATOR_SUPPLY("vcc_core", NULL),
435433
};
436434

437435
static struct regulator_init_data palm27x_max1587a_v3_info = {

‎arch/arm/mach-pxa/spitz.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -877,9 +877,7 @@ static struct i2c_board_info spitz_i2c_devs[] = {
877877
};
878878

879879
static struct regulator_consumer_supply isl6271a_consumers[] = {
880-
{
881-
.supply = "vcc_core",
882-
}
880+
REGULATOR_SUPPLY("vcc_core", NULL),
883881
};
884882

885883
static struct regulator_init_data isl6271a_info[] = {

‎arch/arm/mach-pxa/stargate2.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,7 @@ static struct platform_device sht15 = {
151151
};
152152

153153
static struct regulator_consumer_supply stargate2_sensor_3_con[] = {
154-
{
155-
.dev_name = "sht15",
156-
.supply = "vcc",
157-
},
154+
REGULATOR_SUPPLY("vcc", "sht15"),
158155
};
159156

160157
enum stargate2_ldos{

0 commit comments

Comments
 (0)