aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/hx4700.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index 7fff467e84fc..81359d574f88 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -30,6 +30,7 @@
30#include <linux/pwm_backlight.h> 30#include <linux/pwm_backlight.h>
31#include <linux/regulator/bq24022.h> 31#include <linux/regulator/bq24022.h>
32#include <linux/regulator/machine.h> 32#include <linux/regulator/machine.h>
33#include <linux/regulator/max1586.h>
33#include <linux/spi/ads7846.h> 34#include <linux/spi/ads7846.h>
34#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
35#include <linux/usb/gpio_vbus.h> 36#include <linux/usb/gpio_vbus.h>
@@ -775,6 +776,45 @@ static struct platform_device strataflash = {
775}; 776};
776 777
777/* 778/*
779 * Maxim MAX1587A on PI2C
780 */
781
782static struct regulator_consumer_supply max1587a_consumer = {
783 .supply = "vcc_core",
784};
785
786static struct regulator_init_data max1587a_v3_info = {
787 .constraints = {
788 .name = "vcc_core range",
789 .min_uV = 900000,
790 .max_uV = 1705000,
791 .always_on = 1,
792 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
793 },
794 .num_consumer_supplies = 1,
795 .consumer_supplies = &max1587a_consumer,
796};
797
798static struct max1586_subdev_data max1587a_subdev = {
799 .name = "vcc_core",
800 .id = MAX1586_V3,
801 .platform_data = &max1587a_v3_info,
802};
803
804static struct max1586_platform_data max1587a_info = {
805 .num_subdevs = 1,
806 .subdevs = &max1587a_subdev,
807 .v3_gain = MAX1586_GAIN_R24_3k32, /* 730..1550 mV */
808};
809
810static struct i2c_board_info __initdata pi2c_board_info[] = {
811 {
812 I2C_BOARD_INFO("max1586", 0x14),
813 .platform_data = &max1587a_info,
814 },
815};
816
817/*
778 * PCMCIA 818 * PCMCIA
779 */ 819 */
780 820
@@ -828,6 +868,7 @@ static void __init hx4700_init(void)
828 pxa_set_ficp_info(&ficp_info); 868 pxa_set_ficp_info(&ficp_info);
829 pxa27x_set_i2c_power_info(NULL); 869 pxa27x_set_i2c_power_info(NULL);
830 pxa_set_i2c_info(NULL); 870 pxa_set_i2c_info(NULL);
871 i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info));
831 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); 872 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
832 spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); 873 spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));
833 874