aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/hx4700.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/hx4700.c')
-rw-r--r--arch/arm/mach-pxa/hx4700.c58
1 files changed, 52 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index fb9b62dcf4c..8a1ef2734d5 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -28,7 +28,8 @@
28#include <linux/mtd/physmap.h> 28#include <linux/mtd/physmap.h>
29#include <linux/pda_power.h> 29#include <linux/pda_power.h>
30#include <linux/pwm_backlight.h> 30#include <linux/pwm_backlight.h>
31#include <linux/regulator/bq24022.h> 31#include <linux/regulator/driver.h>
32#include <linux/regulator/gpio-regulator.h>
32#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
33#include <linux/regulator/max1586.h> 34#include <linux/regulator/max1586.h>
34#include <linux/spi/ads7846.h> 35#include <linux/spi/ads7846.h>
@@ -45,6 +46,7 @@
45#include <mach/hx4700.h> 46#include <mach/hx4700.h>
46#include <mach/irda.h> 47#include <mach/irda.h>
47 48
49#include <sound/ak4641.h>
48#include <video/platform_lcd.h> 50#include <video/platform_lcd.h>
49#include <video/w100fb.h> 51#include <video/w100fb.h>
50 52
@@ -681,14 +683,34 @@ static struct regulator_init_data bq24022_init_data = {
681 .consumer_supplies = bq24022_consumers, 683 .consumer_supplies = bq24022_consumers,
682}; 684};
683 685
684static struct bq24022_mach_info bq24022_info = { 686static struct gpio bq24022_gpios[] = {
685 .gpio_nce = GPIO72_HX4700_BQ24022_nCHARGE_EN, 687 { GPIO96_HX4700_BQ24022_ISET2, GPIOF_OUT_INIT_LOW, "bq24022_iset2" },
686 .gpio_iset2 = GPIO96_HX4700_BQ24022_ISET2, 688};
687 .init_data = &bq24022_init_data, 689
690static struct gpio_regulator_state bq24022_states[] = {
691 { .value = 100000, .gpios = (0 << 0) },
692 { .value = 500000, .gpios = (1 << 0) },
693};
694
695static struct gpio_regulator_config bq24022_info = {
696 .supply_name = "bq24022",
697
698 .enable_gpio = GPIO72_HX4700_BQ24022_nCHARGE_EN,
699 .enable_high = 0,
700 .enabled_at_boot = 0,
701
702 .gpios = bq24022_gpios,
703 .nr_gpios = ARRAY_SIZE(bq24022_gpios),
704
705 .states = bq24022_states,
706 .nr_states = ARRAY_SIZE(bq24022_states),
707
708 .type = REGULATOR_CURRENT,
709 .init_data = &bq24022_init_data,
688}; 710};
689 711
690static struct platform_device bq24022 = { 712static struct platform_device bq24022 = {
691 .name = "bq24022", 713 .name = "gpio-regulator",
692 .id = -1, 714 .id = -1,
693 .dev = { 715 .dev = {
694 .platform_data = &bq24022_info, 716 .platform_data = &bq24022_info,
@@ -765,6 +787,28 @@ static struct i2c_board_info __initdata pi2c_board_info[] = {
765}; 787};
766 788
767/* 789/*
790 * Asahi Kasei AK4641 on I2C
791 */
792
793static struct ak4641_platform_data ak4641_info = {
794 .gpio_power = GPIO27_HX4700_CODEC_ON,
795 .gpio_npdn = GPIO109_HX4700_CODEC_nPDN,
796};
797
798static struct i2c_board_info i2c_board_info[] __initdata = {
799 {
800 I2C_BOARD_INFO("ak4641", 0x12),
801 .platform_data = &ak4641_info,
802 },
803};
804
805static struct platform_device audio = {
806 .name = "hx4700-audio",
807 .id = -1,
808};
809
810
811/*
768 * PCMCIA 812 * PCMCIA
769 */ 813 */
770 814
@@ -790,6 +834,7 @@ static struct platform_device *devices[] __initdata = {
790 &gpio_vbus, 834 &gpio_vbus,
791 &power_supply, 835 &power_supply,
792 &strataflash, 836 &strataflash,
837 &audio,
793 &pcmcia, 838 &pcmcia,
794}; 839};
795 840
@@ -827,6 +872,7 @@ static void __init hx4700_init(void)
827 pxa_set_ficp_info(&ficp_info); 872 pxa_set_ficp_info(&ficp_info);
828 pxa27x_set_i2c_power_info(NULL); 873 pxa27x_set_i2c_power_info(NULL);
829 pxa_set_i2c_info(NULL); 874 pxa_set_i2c_info(NULL);
875 i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info));
830 i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); 876 i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info));
831 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); 877 pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
832 spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); 878 spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));