Commit 187f81b3 authored by Russell King's avatar Russell King Committed by Russell King

Merge branch 'for-rmk' of...

Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
parents 1d89b30c d78ff0a5
...@@ -653,6 +653,8 @@ M: laforge@openezx.org ...@@ -653,6 +653,8 @@ M: laforge@openezx.org
L: openezx-devel@lists.openezx.org (subscribers-only) L: openezx-devel@lists.openezx.org (subscribers-only)
W: http://www.openezx.org/ W: http://www.openezx.org/
S: Maintained S: Maintained
T: topgit git://git.openezx.org/openezx.git
F: arch/arm/mach-pxa/ezx.c
ARM/FARADAY FA526 PORT ARM/FARADAY FA526 PORT
P: Paulius Zaleckas P: Paulius Zaleckas
...@@ -774,6 +776,13 @@ P: Philipp Zabel ...@@ -774,6 +776,13 @@ P: Philipp Zabel
M: philipp.zabel@gmail.com M: philipp.zabel@gmail.com
S: Maintained S: Maintained
ARM/MIOA701 MACHINE SUPPORT
P: Robert Jarzmik
M: robert.jarzmik@free.fr
L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
F: arch/arm/mach-pxa/mioa701.c
S: Maintained
ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
P: Michael Petchkovsky P: Michael Petchkovsky
M: mkpetch@internode.on.net M: mkpetch@internode.on.net
...@@ -792,6 +801,12 @@ M: marek.vasut@gmail.com ...@@ -792,6 +801,12 @@ M: marek.vasut@gmail.com
W: http://hackndev.com W: http://hackndev.com
S: Maintained S: Maintained
ARM/PALM TREO 680 SUPPORT
P: Tomas Cech
M: sleep_walker@suse.cz
W: http://hackndev.com
S: Maintained
ARM/PALMZ72 SUPPORT ARM/PALMZ72 SUPPORT
P: Sergey Lapin P: Sergey Lapin
M: slapin@ossfans.org M: slapin@ossfans.org
......
...@@ -401,6 +401,16 @@ config MACH_PALMZ72 ...@@ -401,6 +401,16 @@ config MACH_PALMZ72
Say Y here if you intend to run this kernel on Palm Zire 72 Say Y here if you intend to run this kernel on Palm Zire 72
handheld computer. handheld computer.
config MACH_TREO680
bool "Palm Treo 680"
default y
depends on ARCH_PXA_PALM
select PXA27x
select IWMMXT
help
Say Y here if you intend to run this kernel on Palm Treo 680
smartphone.
config MACH_PALMLD config MACH_PALMLD
bool "Palm LifeDrive" bool "Palm LifeDrive"
default y default y
......
...@@ -62,6 +62,7 @@ obj-$(CONFIG_MACH_PALMT5) += palmt5.o ...@@ -62,6 +62,7 @@ obj-$(CONFIG_MACH_PALMT5) += palmt5.o
obj-$(CONFIG_MACH_PALMTX) += palmtx.o obj-$(CONFIG_MACH_PALMTX) += palmtx.o
obj-$(CONFIG_MACH_PALMLD) += palmld.o obj-$(CONFIG_MACH_PALMLD) += palmld.o
obj-$(CONFIG_MACH_PALMZ72) += palmz72.o obj-$(CONFIG_MACH_PALMZ72) += palmz72.o
obj-$(CONFIG_MACH_TREO680) += treo680.o
obj-$(CONFIG_ARCH_VIPER) += viper.o obj-$(CONFIG_ARCH_VIPER) += viper.o
ifeq ($(CONFIG_MACH_ZYLONITE),y) ifeq ($(CONFIG_MACH_ZYLONITE),y)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/backlight.h> #include <linux/backlight.h>
#include <linux/i2c.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
...@@ -600,6 +601,10 @@ static struct platform_device *devices[] __initdata = { ...@@ -600,6 +601,10 @@ static struct platform_device *devices[] __initdata = {
&sharpsl_rom_device, &sharpsl_rom_device,
}; };
static struct i2c_board_info __initdata corgi_i2c_devices[] = {
{ I2C_BOARD_INFO("wm8731", 0x1b) },
};
static void corgi_poweroff(void) static void corgi_poweroff(void)
{ {
if (!machine_is_corgi()) if (!machine_is_corgi())
...@@ -634,6 +639,7 @@ static void __init corgi_init(void) ...@@ -634,6 +639,7 @@ static void __init corgi_init(void)
pxa_set_mci_info(&corgi_mci_platform_data); pxa_set_mci_info(&corgi_mci_platform_data);
pxa_set_ficp_info(&corgi_ficp_platform_data); pxa_set_ficp_info(&corgi_ficp_platform_data);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(corgi_i2c_devices));
platform_scoop_config = &corgi_pcmcia_config; platform_scoop_config = &corgi_pcmcia_config;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/apm-emulation.h> #include <linux/apm-emulation.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c/pca953x.h> #include <linux/i2c/pca953x.h>
#include <linux/regulator/userspace-consumer.h>
#include <media/soc_camera.h> #include <media/soc_camera.h>
...@@ -735,6 +736,7 @@ static struct pxa2xx_spi_chip em_x270_libertas_chip = { ...@@ -735,6 +736,7 @@ static struct pxa2xx_spi_chip em_x270_libertas_chip = {
.rx_threshold = 1, .rx_threshold = 1,
.tx_threshold = 1, .tx_threshold = 1,
.timeout = 1000, .timeout = 1000,
.gpio_cs = 14,
}; };
static unsigned long em_x270_libertas_pin_config[] = { static unsigned long em_x270_libertas_pin_config[] = {
...@@ -803,7 +805,6 @@ static int em_x270_libertas_teardown(struct spi_device *spi) ...@@ -803,7 +805,6 @@ static int em_x270_libertas_teardown(struct spi_device *spi)
struct libertas_spi_platform_data em_x270_libertas_pdata = { struct libertas_spi_platform_data em_x270_libertas_pdata = {
.use_dummy_writes = 1, .use_dummy_writes = 1,
.gpio_cs = 14,
.setup = em_x270_libertas_setup, .setup = em_x270_libertas_setup,
.teardown = em_x270_libertas_teardown, .teardown = em_x270_libertas_teardown,
}; };
...@@ -838,10 +839,14 @@ static void __init em_x270_init_spi(void) ...@@ -838,10 +839,14 @@ static void __init em_x270_init_spi(void)
static inline void em_x270_init_spi(void) {} static inline void em_x270_init_spi(void) {}
#endif #endif
#if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE) #if defined(CONFIG_SND_PXA2XX_LIB_AC97)
static pxa2xx_audio_ops_t em_x270_ac97_info = {
.reset_gpio = 113,
};
static void __init em_x270_init_ac97(void) static void __init em_x270_init_ac97(void)
{ {
pxa_set_ac97_info(NULL); pxa_set_ac97_info(&em_x270_ac97_info);
} }
#else #else
static inline void em_x270_init_ac97(void) {} static inline void em_x270_init_ac97(void) {}
...@@ -1038,6 +1043,52 @@ static void __init em_x270_init_camera(void) ...@@ -1038,6 +1043,52 @@ static void __init em_x270_init_camera(void)
static inline void em_x270_init_camera(void) {} static inline void em_x270_init_camera(void) {}
#endif #endif
static struct regulator_bulk_data em_x270_gps_consumer_supply = {
.supply = "vcc gps",
};
static struct regulator_userspace_consumer_data em_x270_gps_consumer_data = {
.name = "vcc gps",
.num_supplies = 1,
.supplies = &em_x270_gps_consumer_supply,
};
static struct platform_device em_x270_gps_userspace_consumer = {
.name = "reg-userspace-consumer",
.id = 0,
.dev = {
.platform_data = &em_x270_gps_consumer_data,
},
};
static struct regulator_bulk_data em_x270_gprs_consumer_supply = {
.supply = "vcc gprs",
};
static struct regulator_userspace_consumer_data em_x270_gprs_consumer_data = {
.name = "vcc gprs",
.num_supplies = 1,
.supplies = &em_x270_gprs_consumer_supply
};
static struct platform_device em_x270_gprs_userspace_consumer = {
.name = "reg-userspace-consumer",
.id = 1,
.dev = {
.platform_data = &em_x270_gprs_consumer_data,
}
};
static struct platform_device *em_x270_userspace_consumers[] = {
&em_x270_gps_userspace_consumer,
&em_x270_gprs_userspace_consumer,
};
static void __init em_x270_userspace_consumers_init(void)
{
platform_add_devices(ARRAY_AND_SIZE(em_x270_userspace_consumers));
}
/* DA9030 related initializations */ /* DA9030 related initializations */
#define REGULATOR_CONSUMER(_name, _dev, _supply) \ #define REGULATOR_CONSUMER(_name, _dev, _supply) \
static struct regulator_consumer_supply _name##_consumers[] = { \ static struct regulator_consumer_supply _name##_consumers[] = { \
...@@ -1047,11 +1098,11 @@ static inline void em_x270_init_camera(void) {} ...@@ -1047,11 +1098,11 @@ static inline void em_x270_init_camera(void) {}
}, \ }, \
} }
REGULATOR_CONSUMER(ldo3, NULL, "vcc gps"); REGULATOR_CONSUMER(ldo3, &em_x270_gps_userspace_consumer.dev, "vcc gps");
REGULATOR_CONSUMER(ldo5, NULL, "vcc cam"); REGULATOR_CONSUMER(ldo5, NULL, "vcc cam");
REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio"); REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio");
REGULATOR_CONSUMER(ldo12, NULL, "vcc usb"); REGULATOR_CONSUMER(ldo12, NULL, "vcc usb");
REGULATOR_CONSUMER(ldo19, NULL, "vcc gprs"); REGULATOR_CONSUMER(ldo19, &em_x270_gprs_userspace_consumer.dev, "vcc gprs");
#define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \ #define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \
static struct regulator_init_data _ldo##_data = { \ static struct regulator_init_data _ldo##_data = { \
...@@ -1062,6 +1113,7 @@ REGULATOR_CONSUMER(ldo19, NULL, "vcc gprs"); ...@@ -1062,6 +1113,7 @@ REGULATOR_CONSUMER(ldo19, NULL, "vcc gprs");
.enabled = 0, \ .enabled = 0, \
}, \ }, \
.valid_ops_mask = _ops_mask, \ .valid_ops_mask = _ops_mask, \
.apply_uV = 1, \
}, \ }, \
.num_consumer_supplies = ARRAY_SIZE(_ldo##_consumers), \ .num_consumer_supplies = ARRAY_SIZE(_ldo##_consumers), \
.consumer_supplies = _ldo##_consumers, \ .consumer_supplies = _ldo##_consumers, \
...@@ -1240,6 +1292,7 @@ static void __init em_x270_init(void) ...@@ -1240,6 +1292,7 @@ static void __init em_x270_init(void)
em_x270_init_spi(); em_x270_init_spi();
em_x270_init_i2c(); em_x270_init_i2c();
em_x270_init_camera(); em_x270_init_camera();
em_x270_userspace_consumers_init();
} }
MACHINE_START(EM_X270, "Compulab EM-X270") MACHINE_START(EM_X270, "Compulab EM-X270")
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/pwm_backlight.h> #include <linux/pwm_backlight.h>
#include <linux/regulator/bq24022.h> #include <linux/regulator/bq24022.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/regulator/max1586.h>
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
...@@ -774,6 +775,45 @@ static struct platform_device strataflash = { ...@@ -774,6 +775,45 @@ static struct platform_device strataflash = {
}, },
}; };
/*
* Maxim MAX1587A on PI2C
*/
static struct regulator_consumer_supply max1587a_consumer = {
.supply = "vcc_core",
};
static struct regulator_init_data max1587a_v3_info = {
.constraints = {
.name = "vcc_core range",
.min_uV = 900000,
.max_uV = 1705000,
.always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
},
.num_consumer_supplies = 1,
.consumer_supplies = &max1587a_consumer,
};
static struct max1586_subdev_data max1587a_subdev = {
.name = "vcc_core",
.id = MAX1586_V3,
.platform_data = &max1587a_v3_info,
};
static struct max1586_platform_data max1587a_info = {
.num_subdevs = 1,
.subdevs = &max1587a_subdev,
.v3_gain = MAX1586_GAIN_R24_3k32, /* 730..1550 mV */
};
static struct i2c_board_info __initdata pi2c_board_info[] = {
{
I2C_BOARD_INFO("max1586", 0x14),
.platform_data = &max1587a_info,
},
};
/* /*
* PCMCIA * PCMCIA
*/ */
...@@ -828,6 +868,7 @@ static void __init hx4700_init(void) ...@@ -828,6 +868,7 @@ static void __init hx4700_init(void)
pxa_set_ficp_info(&ficp_info); pxa_set_ficp_info(&ficp_info);
pxa27x_set_i2c_power_info(NULL); pxa27x_set_i2c_power_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info));
pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));
......
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
/* USB */ /* USB */
#define GPIO_NR_PALMZ72_USB_DETECT_N 15 #define GPIO_NR_PALMZ72_USB_DETECT_N 15
#define GPIO_NR_PALMZ72_USB_POWER 95 #define GPIO_NR_PALMZ72_USB_PULLUP 95
#define GPIO_NR_PALMZ72_USB_PULLUP 12
/* LCD/Backlight */ /* LCD/Backlight */
#define GPIO_NR_PALMZ72_BL_POWER 20 #define GPIO_NR_PALMZ72_BL_POWER 20
......
/*
* GPIOs and interrupts for Palm Treo 680 smartphone
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef _INCLUDE_TREO680_H_
#define _INCLUDE_TREO680_H_
/* GPIOs */
#define GPIO_NR_TREO680_POWER_DETECT 0
#define GPIO_NR_TREO680_AMP_EN 27
#define GPIO_NR_TREO680_KEYB_BL 24
#define GPIO_NR_TREO680_VIBRATE_EN 44
#define GPIO_NR_TREO680_GREEN_LED 20
#define GPIO_NR_TREO680_RED_LED 79
#define GPIO_NR_TREO680_SD_DETECT_N 113
#define GPIO_NR_TREO680_SD_READONLY 33
#define GPIO_NR_TREO680_EP_DETECT_N 116
#define GPIO_NR_TREO680_SD_POWER 42
#define GPIO_NR_TREO680_USB_DETECT 1
#define GPIO_NR_TREO680_USB_PULLUP 114
#define GPIO_NR_TREO680_GSM_POWER 40
#define GPIO_NR_TREO680_GSM_RESET 87
#define GPIO_NR_TREO680_GSM_WAKE 57
#define GPIO_NR_TREO680_GSM_HOST_WAKE 14
#define GPIO_NR_TREO680_GSM_TRIGGER 10
#define GPIO_NR_TREO680_BT_EN 43
#define GPIO_NR_TREO680_IR_EN 115
#define GPIO_NR_TREO680_IR_TXD 47
#define GPIO_NR_TREO680_BL_POWER 38
#define GPIO_NR_TREO680_LCD_POWER 25
/* Various addresses */
#define TREO680_PHYS_RAM_START 0xa0000000
#define TREO680_PHYS_IO_START 0x40000000
#define TREO680_STR_BASE 0xa2000000
/* BACKLIGHT */
#define TREO680_MAX_INTENSITY 254
#define TREO680_DEFAULT_INTENSITY 160
#define TREO680_LIMIT_MASK 0x7F
#define TREO680_PRESCALER 63
#define TREO680_PERIOD_NS 3500
#endif
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <linux/wm97xx_batt.h> #include <linux/wm97xx_batt.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
#include <linux/regulator/max1586.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -716,6 +717,38 @@ static struct wm97xx_batt_info mioa701_battery_data = { ...@@ -716,6 +717,38 @@ static struct wm97xx_batt_info mioa701_battery_data = {
.batt_name = "mioa701_battery", .batt_name = "mioa701_battery",
}; };
/*
* Voltage regulation
*/
static struct regulator_consumer_supply max1586_consumers[] = {
{
.supply = "vcc_core",
}
};
static struct regulator_init_data max1586_v3_info = {
.constraints = {
.name = "vcc_core range",
.min_uV = 1000000,
.max_uV = 1705000,
.always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
},
.num_consumer_supplies = ARRAY_SIZE(max1586_consumers),
.consumer_supplies = max1586_consumers,
};
static struct max1586_subdev_data max1586_subdevs[] = {
{ .name = "vcc_core", .id = MAX1586_V3,
.platform_data = &max1586_v3_info },
};
static struct max1586_platform_data max1586_info = {
.subdevs = max1586_subdevs,
.num_subdevs = ARRAY_SIZE(max1586_subdevs),
.v3_gain = MAX1586_GAIN_NO_R24, /* 700..1475 mV */
};
/* /*
* Camera interface * Camera interface
*/ */
...@@ -725,6 +758,13 @@ struct pxacamera_platform_data mioa701_pxacamera_platform_data = { ...@@ -725,6 +758,13 @@ struct pxacamera_platform_data mioa701_pxacamera_platform_data = {
.mclk_10khz = 5000, .mclk_10khz = 5000,
}; };
static struct i2c_board_info __initdata mioa701_pi2c_devices[] = {
{
I2C_BOARD_INFO("max1586", 0x14),
.platform_data = &max1586_info,
},
};
static struct soc_camera_link iclink = { static struct soc_camera_link iclink = {
.bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */ .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */
}; };
...@@ -825,7 +865,9 @@ static void __init mioa701_machine_init(void) ...@@ -825,7 +865,9 @@ static void __init mioa701_machine_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
gsm_init(); gsm_init();
i2c_register_board_info(1, ARRAY_AND_SIZE(mioa701_pi2c_devices));
pxa_set_i2c_info(&i2c_pdata); pxa_set_i2c_info(&i2c_pdata);
pxa27x_set_i2c_power_info(NULL);
pxa_set_camera_info(&mioa701_pxacamera_platform_data); pxa_set_camera_info(&mioa701_pxacamera_platform_data);
i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices)); i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices));
} }
......
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
#include <linux/pda_power.h> #include <linux/pda_power.h>
#include <linux/pwm_backlight.h> #include <linux/pwm_backlight.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/wm97xx_batt.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -41,6 +43,8 @@ ...@@ -41,6 +43,8 @@
#include <mach/irda.h> #include <mach/irda.h>
#include <mach/pxa27x_keypad.h> #include <mach/pxa27x_keypad.h>
#include <mach/udc.h> #include <mach/udc.h>
#include <mach/palmasoc.h>
#include <mach/pm.h> #include <mach/pm.h>
#include "generic.h" #include "generic.h"
...@@ -66,6 +70,8 @@ static unsigned long palmz72_pin_config[] __initdata = { ...@@ -66,6 +70,8 @@ static unsigned long palmz72_pin_config[] __initdata = {
GPIO29_AC97_SDATA_IN_0, GPIO29_AC97_SDATA_IN_0,
GPIO30_AC97_SDATA_OUT, GPIO30_AC97_SDATA_OUT,
GPIO31_AC97_SYNC, GPIO31_AC97_SYNC,
GPIO89_AC97_SYSCLK,
GPIO113_AC97_nRESET,
/* IrDA */ /* IrDA */
GPIO49_GPIO, /* ir disable */ GPIO49_GPIO, /* ir disable */
...@@ -77,8 +83,7 @@ static unsigned long palmz72_pin_config[] __initdata = { ...@@ -77,8 +83,7 @@ static unsigned long palmz72_pin_config[] __initdata = {
/* USB */ /* USB */
GPIO15_GPIO, /* usb detect */ GPIO15_GPIO, /* usb detect */
GPIO12_GPIO, /* usb pullup */ GPIO95_GPIO, /* usb pullup */
GPIO95_GPIO, /* usb power */
/* Matrix keypad */ /* Matrix keypad */
GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
...@@ -354,6 +359,22 @@ static struct platform_device palmz72_leds = { ...@@ -354,6 +359,22 @@ static struct platform_device palmz72_leds = {
} }
}; };
/******************************************************************************
* UDC
******************************************************************************/
static struct gpio_vbus_mach_info palmz72_udc_info = {
.gpio_vbus = GPIO_NR_PALMZ72_USB_DETECT_N,
.gpio_pullup = GPIO_NR_PALMZ72_USB_PULLUP,
};
static struct platform_device palmz72_gpio_vbus = {
.name = "gpio-vbus",
.id = -1,
.dev = {
.platform_data = &palmz72_udc_info,
},
};
/****************************************************************************** /******************************************************************************
* Power supply * Power supply
******************************************************************************/ ******************************************************************************/
...@@ -421,6 +442,31 @@ static struct platform_device power_supply = { ...@@ -421,6 +442,31 @@ static struct platform_device power_supply = {
}, },
}; };
/******************************************************************************
* WM97xx battery
******************************************************************************/
static struct wm97xx_batt_info wm97xx_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1,
.max_voltage = PALMZ72_BAT_MAX_VOLTAGE,
.min_voltage = PALMZ72_BAT_MIN_VOLTAGE,
.batt_mult = 1000,
.batt_div = 414,
.temp_mult = 1,
.temp_div = 1,
.batt_tech = POWER_SUPPLY_TECHNOLOGY_LIPO,
.batt_name = "main-batt",
};
/******************************************************************************
* aSoC audio
******************************************************************************/
static struct platform_device palmz72_asoc = {
.name = "palm27x-asoc",
.id = -1,
};
/****************************************************************************** /******************************************************************************
* Framebuffer * Framebuffer
******************************************************************************/ ******************************************************************************/
...@@ -527,17 +573,32 @@ device_initcall(palmz72_pm_init); ...@@ -527,17 +573,32 @@ device_initcall(palmz72_pm_init);
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&palmz72_backlight, &palmz72_backlight,
&palmz72_leds, &palmz72_leds,
&palmz72_asoc,
&power_supply, &power_supply,
&palmz72_gpio_vbus,
}; };
/* setup udc GPIOs initial state */
static void __init palmz72_udc_init(void)
{
if (!gpio_request(GPIO_NR_PALMZ72_USB_PULLUP, "USB Pullup")) {
gpio_direction_output(GPIO_NR_PALMZ72_USB_PULLUP, 0);
gpio_free(GPIO_NR_PALMZ72_USB_PULLUP);
}
}
static void __init palmz72_init(void) static void __init palmz72_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmz72_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(palmz72_pin_config));
set_pxa_fb_info(&palmz72_lcd_screen); set_pxa_fb_info(&palmz72_lcd_screen);
pxa_set_mci_info(&palmz72_mci_platform_data); pxa_set_mci_info(&palmz72_mci_platform_data);
palmz72_udc_init();
pxa_set_ac97_info(NULL); pxa_set_ac97_info(NULL);
pxa_set_ficp_info(&palmz72_ficp_platform_data); pxa_set_ficp_info(&palmz72_ficp_platform_data);
pxa_set_keypad_info(&palmz72_keypad_platform_data); pxa_set_keypad_info(&palmz72_keypad_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
#include <linux/mtd/sharpsl.h> #include <linux/mtd/sharpsl.h>
...@@ -486,6 +487,10 @@ static struct platform_device *devices[] __initdata = { ...@@ -486,6 +487,10 @@ static struct platform_device *devices[] __initdata = {
&sharpsl_rom_device, &sharpsl_rom_device,
}; };
static struct i2c_board_info __initdata poodle_i2c_devices[] = {
{ I2C_BOARD_INFO("wm8731", 0x1b) },
};
static void poodle_poweroff(void) static void poodle_poweroff(void)
{ {
arm_machine_restart('h', NULL); arm_machine_restart('h', NULL);
...@@ -519,6 +524,7 @@ static void __init poodle_init(void) ...@@ -519,6 +524,7 @@ static void __init poodle_init(void)
pxa_set_mci_info(&poodle_mci_platform_data); pxa_set_mci_info(&poodle_mci_platform_data);
pxa_set_ficp_info(&poodle_ficp_platform_data); pxa_set_ficp_info(&poodle_ficp_platform_data);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(poodle_i2c_devices));
poodle_init_spi(); poodle_init_spi();
} }
......
This diff is collapsed.
...@@ -836,6 +836,13 @@ void __init reserve_node_zero(pg_data_t *pgdat) ...@@ -836,6 +836,13 @@ void __init reserve_node_zero(pg_data_t *pgdat)
BOOTMEM_EXCLUSIVE); BOOTMEM_EXCLUSIVE);
} }
if (machine_is_treo680()) {
reserve_bootmem_node(pgdat, 0xa0000000, 0x1000,
BOOTMEM_EXCLUSIVE);
reserve_bootmem_node(pgdat, 0xa2000000, 0x1000,
BOOTMEM_EXCLUSIVE);
}
if (machine_is_palmt5()) if (machine_is_palmt5())
reserve_bootmem_node(pgdat, 0xa0200000, 0x1000, reserve_bootmem_node(pgdat, 0xa0200000, 0x1000,
BOOTMEM_EXCLUSIVE); BOOTMEM_EXCLUSIVE);
......
...@@ -320,38 +320,6 @@ static struct snd_soc_device corgi_snd_devdata = { ...@@ -320,38 +320,6 @@ static struct snd_soc_device corgi_snd_devdata = {
.codec_dev = &soc_codec_dev_wm8731, .codec_dev = &soc_codec_dev_wm8731,
}; };
/*
* FIXME: This is a temporary bodge to avoid cross-tree merge issues.
* New drivers should register the wm8731 I2C device in the machine
* setup code (under arch/arm for ARM systems).
*/
static int wm8731_i2c_register(void)
{
struct i2c_board_info info;
struct i2c_adapter *adapter;
struct i2c_client *client;
memset(&info, 0, sizeof(struct i2c_board_info));
info.addr = 0x1b;
strlcpy(info.type, "wm8731", I2C_NAME_SIZE);
adapter = i2c_get_adapter(0);
if (!adapter) {
printk(KERN_ERR "can't get i2c adapter 0\n");
return -ENODEV;
}
client = i2c_new_device(adapter, &info);
i2c_put_adapter(adapter);
if (!client) {
printk(KERN_ERR "can't add i2c device at 0x%x\n",
(unsigned int)info.addr);
return -ENODEV;
}
return 0;
}
static struct platform_device *corgi_snd_device; static struct platform_device *corgi_snd_device;
static int __init corgi_init(void) static int __init corgi_init(void)
...@@ -362,10 +330,6 @@ static int __init corgi_init(void) ...@@ -362,10 +330,6 @@ static int __init corgi_init(void)
machine_is_husky())) machine_is_husky()))
return -ENODEV; return -ENODEV;
ret = wm8731_i2c_register();
if (ret != 0)
return ret;
corgi_snd_device = platform_device_alloc("soc-audio", -1); corgi_snd_device = platform_device_alloc("soc-audio", -1);
if (!corgi_snd_device) if (!corgi_snd_device)
return -ENOMEM; return -ENOMEM;
......
...@@ -280,38 +280,6 @@ static struct snd_soc_card snd_soc_poodle = { ...@@ -280,38 +280,6 @@ static struct snd_soc_card snd_soc_poodle = {
.num_links = 1, .num_links = 1,
}; };
/*
* FIXME: This is a temporary bodge to avoid cross-tree merge issues.
* New drivers should register the wm8731 I2C device in the machine
* setup code (under arch/arm for ARM systems).
*/
static int wm8731_i2c_register(void)
{
struct i2c_board_info info;
struct i2c_adapter *adapter;
struct i2c_client *client;
memset(&info, 0, sizeof(struct i2c_board_info));
info.addr = 0x1b;
strlcpy(info.type, "wm8731", I2C_NAME_SIZE);
adapter = i2c_get_adapter(0);
if (!adapter) {
printk(KERN_ERR "can't get i2c adapter 0\n");
return -ENODEV;
}
client = i2c_new_device(adapter, &info);
i2c_put_adapter(adapter);
if (!client) {
printk(KERN_ERR "can't add i2c device at 0x%x\n",
(unsigned int)info.addr);
return -ENODEV;
}
return 0;
}
/* poodle audio subsystem */ /* poodle audio subsystem */
static struct snd_soc_device poodle_snd_devdata = { static struct snd_soc_device poodle_snd_devdata = {
.card = &snd_soc_poodle, .card = &snd_soc_poodle,
...@@ -327,10 +295,6 @@ static int __init poodle_init(void) ...@@ -327,10 +295,6 @@ static int __init poodle_init(void)
if (!machine_is_poodle()) if (!machine_is_poodle())
return -ENODEV; return -ENODEV;
ret = wm8731_i2c_register();
if (ret != 0)
return ret;
locomo_gpio_set_dir(&poodle_locomo_device.dev, locomo_gpio_set_dir(&poodle_locomo_device.dev,
POODLE_LOCOMO_GPIO_AMP_ON, 0); POODLE_LOCOMO_GPIO_AMP_ON, 0);
/* should we mute HP at startup - burning power ?*/ /* should we mute HP at startup - burning power ?*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment