Commit 241cf473 authored by Marek Vasut's avatar Marek Vasut Committed by Eric Miao

[ARM] pxa: fix all devices using wm97xx_batt.h

This file is scheduled for removal, therefore fix all devices that use this
file to use the suggested wm97xx.h and pass platform data properly.
Signed-off-by: default avatarMarek Vasut <marek.vasut@gmail.com>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Acked-by: default avatarTomas Cech <sleep_walker@suse.cz>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 8499ded8
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/pda_power.h> #include <linux/pda_power.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/wm97xx_batt.h> #include <linux/wm97xx.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 <linux/regulator/max1586.h>
...@@ -636,7 +636,7 @@ static struct platform_device power_dev = { ...@@ -636,7 +636,7 @@ static struct platform_device power_dev = {
}, },
}; };
static struct wm97xx_batt_info mioa701_battery_data = { static struct wm97xx_batt_pdata mioa701_battery_data = {
.batt_aux = WM97XX_AUX_ID1, .batt_aux = WM97XX_AUX_ID1,
.temp_aux = -1, .temp_aux = -1,
.charge_gpio = -1, .charge_gpio = -1,
...@@ -648,6 +648,10 @@ static struct wm97xx_batt_info mioa701_battery_data = { ...@@ -648,6 +648,10 @@ static struct wm97xx_batt_info mioa701_battery_data = {
.batt_name = "mioa701_battery", .batt_name = "mioa701_battery",
}; };
static struct wm97xx_pdata mioa701_wm97xx_pdata = {
.batt_pdata = &mioa701_battery_data,
};
/* /*
* Voltage regulation * Voltage regulation
*/ */
...@@ -716,6 +720,7 @@ struct i2c_pxa_platform_data i2c_pdata = { ...@@ -716,6 +720,7 @@ struct i2c_pxa_platform_data i2c_pdata = {
static pxa2xx_audio_ops_t mioa701_ac97_info = { static pxa2xx_audio_ops_t mioa701_ac97_info = {
.reset_gpio = 95, .reset_gpio = 95,
.codec_pdata = { &mioa701_wm97xx_pdata, },
}; };
/* /*
...@@ -794,7 +799,6 @@ static void __init mioa701_machine_init(void) ...@@ -794,7 +799,6 @@ static void __init mioa701_machine_init(void)
set_pxa_fb_info(&mioa701_pxafb_info); set_pxa_fb_info(&mioa701_pxafb_info);
pxa_set_mci_info(&mioa701_mci_info); pxa_set_mci_info(&mioa701_mci_info);
pxa_set_keypad_info(&mioa701_keypad_info); pxa_set_keypad_info(&mioa701_keypad_info);
wm97xx_bat_set_pdata(&mioa701_battery_data);
pxa_set_udc_info(&mioa701_udc_info); pxa_set_udc_info(&mioa701_udc_info);
pxa_set_ac97_info(&mioa701_ac97_info); pxa_set_ac97_info(&mioa701_ac97_info);
pm_power_off = mioa701_poweroff; pm_power_off = mioa701_poweroff;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#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/wm97xx.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
...@@ -387,9 +387,9 @@ static struct platform_device power_supply = { ...@@ -387,9 +387,9 @@ static struct platform_device power_supply = {
}; };
/****************************************************************************** /******************************************************************************
* WM97xx battery * WM97xx audio, battery
******************************************************************************/ ******************************************************************************/
static struct wm97xx_batt_info wm97xx_batt_pdata = { static struct wm97xx_batt_pdata palmld_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3, .batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2, .temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1, .charge_gpio = -1,
...@@ -403,15 +403,17 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = { ...@@ -403,15 +403,17 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
.batt_name = "main-batt", .batt_name = "main-batt",
}; };
/****************************************************************************** static struct wm97xx_pdata palmld_wm97xx_pdata = {
* aSoC audio .batt_pdata = &palmld_batt_pdata,
******************************************************************************/
static struct palm27x_asoc_info palmld_asoc_pdata = {
.jack_gpio = GPIO_NR_PALMLD_EARPHONE_DETECT,
}; };
static pxa2xx_audio_ops_t palmld_ac97_pdata = { static pxa2xx_audio_ops_t palmld_ac97_pdata = {
.reset_gpio = 95, .reset_gpio = 95,
.codec_pdata = { &palmld_wm97xx_pdata, },
};
static struct palm27x_asoc_info palmld_asoc_pdata = {
.jack_gpio = GPIO_NR_PALMLD_EARPHONE_DETECT,
}; };
static struct platform_device palmld_asoc = { static struct platform_device palmld_asoc = {
...@@ -521,7 +523,6 @@ static void __init palmld_init(void) ...@@ -521,7 +523,6 @@ static void __init palmld_init(void)
pxa_set_ac97_info(&palmld_ac97_pdata); pxa_set_ac97_info(&palmld_ac97_pdata);
pxa_set_ficp_info(&palmld_ficp_platform_data); pxa_set_ficp_info(&palmld_ficp_platform_data);
pxa_set_keypad_info(&palmld_keypad_platform_data); pxa_set_keypad_info(&palmld_keypad_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#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/wm97xx.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
...@@ -298,9 +298,9 @@ static struct platform_device power_supply = { ...@@ -298,9 +298,9 @@ static struct platform_device power_supply = {
}; };
/****************************************************************************** /******************************************************************************
* WM97xx battery * WM97xx audio, battery
******************************************************************************/ ******************************************************************************/
static struct wm97xx_batt_info wm97xx_batt_pdata = { static struct wm97xx_batt_pdata palmt5_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3, .batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2, .temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1, .charge_gpio = -1,
...@@ -314,15 +314,17 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = { ...@@ -314,15 +314,17 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
.batt_name = "main-batt", .batt_name = "main-batt",
}; };
/****************************************************************************** static struct wm97xx_pdata palmt5_wm97xx_pdata = {
* aSoC audio .batt_pdata = &palmt5_batt_pdata,
******************************************************************************/
static struct palm27x_asoc_info palmt5_asoc_pdata = {
.jack_gpio = GPIO_NR_PALMT5_EARPHONE_DETECT,
}; };
static pxa2xx_audio_ops_t palmt5_ac97_pdata = { static pxa2xx_audio_ops_t palmt5_ac97_pdata = {
.reset_gpio = 95, .reset_gpio = 95,
.codec_pdata = { &palmt5_wm97xx_pdata, },
};
static struct palm27x_asoc_info palmt5_asoc_pdata = {
.jack_gpio = GPIO_NR_PALMT5_EARPHONE_DETECT,
}; };
static struct platform_device palmt5_asoc = { static struct platform_device palmt5_asoc = {
...@@ -411,7 +413,6 @@ static void __init palmt5_init(void) ...@@ -411,7 +413,6 @@ static void __init palmt5_init(void)
pxa_set_ac97_info(&palmt5_ac97_pdata); pxa_set_ac97_info(&palmt5_ac97_pdata);
pxa_set_ficp_info(&palmt5_ficp_platform_data); pxa_set_ficp_info(&palmt5_ficp_platform_data);
pxa_set_keypad_info(&palmt5_keypad_platform_data); pxa_set_keypad_info(&palmt5_keypad_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#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/wm97xx.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
...@@ -271,9 +271,9 @@ static struct platform_device power_supply = { ...@@ -271,9 +271,9 @@ static struct platform_device power_supply = {
}; };
/****************************************************************************** /******************************************************************************
* WM97xx battery * WM97xx audio, battery
******************************************************************************/ ******************************************************************************/
static struct wm97xx_batt_info wm97xx_batt_pdata = { static struct wm97xx_batt_pdata palmte2_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3, .batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2, .temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1, .charge_gpio = -1,
...@@ -287,9 +287,14 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = { ...@@ -287,9 +287,14 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
.batt_name = "main-batt", .batt_name = "main-batt",
}; };
/****************************************************************************** static struct wm97xx_pdata palmte2_wm97xx_pdata = {
* aSoC audio .batt_pdata = &palmte2_batt_pdata,
******************************************************************************/ };
static pxa2xx_audio_ops_t palmte2_ac97_pdata = {
.codec_pdata = { &palmte2_wm97xx_pdata, },
};
static struct palm27x_asoc_info palmte2_asoc_pdata = { static struct palm27x_asoc_info palmte2_asoc_pdata = {
.jack_gpio = GPIO_NR_PALMTE2_EARPHONE_DETECT, .jack_gpio = GPIO_NR_PALMTE2_EARPHONE_DETECT,
}; };
...@@ -361,9 +366,8 @@ static void __init palmte2_init(void) ...@@ -361,9 +366,8 @@ static void __init palmte2_init(void)
set_pxa_fb_info(&palmte2_lcd_screen); set_pxa_fb_info(&palmte2_lcd_screen);
pxa_set_mci_info(&palmte2_mci_platform_data); pxa_set_mci_info(&palmte2_mci_platform_data);
palmte2_udc_init(); palmte2_udc_init();
pxa_set_ac97_info(NULL); pxa_set_ac97_info(&palmte2_ac97_pdata);
pxa_set_ficp_info(&palmte2_ficp_platform_data); pxa_set_ficp_info(&palmte2_ficp_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#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/sysdev.h> #include <linux/sysdev.h>
#include <linux/w1-gpio.h> #include <linux/w1-gpio.h>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#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/wm97xx.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
...@@ -359,9 +359,9 @@ static struct platform_device power_supply = { ...@@ -359,9 +359,9 @@ static struct platform_device power_supply = {
}; };
/****************************************************************************** /******************************************************************************
* WM97xx battery * WM97xx audio, battery
******************************************************************************/ ******************************************************************************/
static struct wm97xx_batt_info wm97xx_batt_pdata = { static struct wm97xx_batt_pdata palmtx_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3, .batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2, .temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1, .charge_gpio = -1,
...@@ -375,15 +375,17 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = { ...@@ -375,15 +375,17 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
.batt_name = "main-batt", .batt_name = "main-batt",
}; };
/****************************************************************************** static struct wm97xx_pdata palmtx_wm97xx_pdata = {
* aSoC audio .batt_pdata = &palmtx_batt_pdata,
******************************************************************************/
static struct palm27x_asoc_info palmtx_asoc_pdata = {
.jack_gpio = GPIO_NR_PALMTX_EARPHONE_DETECT,
}; };
static pxa2xx_audio_ops_t palmtx_ac97_pdata = { static pxa2xx_audio_ops_t palmtx_ac97_pdata = {
.reset_gpio = 95, .reset_gpio = 95,
.codec_pdata = { &palmtx_wm97xx_pdata, },
};
static struct palm27x_asoc_info palmtx_asoc_pdata = {
.jack_gpio = GPIO_NR_PALMTX_EARPHONE_DETECT,
}; };
static struct platform_device palmtx_asoc = { static struct platform_device palmtx_asoc = {
...@@ -562,7 +564,6 @@ static void __init palmtx_init(void) ...@@ -562,7 +564,6 @@ static void __init palmtx_init(void)
pxa_set_ac97_info(&palmtx_ac97_pdata); pxa_set_ac97_info(&palmtx_ac97_pdata);
pxa_set_ficp_info(&palmtx_ficp_platform_data); pxa_set_ficp_info(&palmtx_ficp_platform_data);
pxa_set_keypad_info(&palmtx_keypad_platform_data); pxa_set_keypad_info(&palmtx_keypad_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#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/wm97xx.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
...@@ -325,9 +325,9 @@ static struct platform_device power_supply = { ...@@ -325,9 +325,9 @@ static struct platform_device power_supply = {
}; };
/****************************************************************************** /******************************************************************************
* WM97xx battery * WM97xx audio, battery
******************************************************************************/ ******************************************************************************/
static struct wm97xx_batt_info wm97xx_batt_pdata = { static struct wm97xx_batt_pdata palmz72_batt_pdata = {
.batt_aux = WM97XX_AUX_ID3, .batt_aux = WM97XX_AUX_ID3,
.temp_aux = WM97XX_AUX_ID2, .temp_aux = WM97XX_AUX_ID2,
.charge_gpio = -1, .charge_gpio = -1,
...@@ -341,9 +341,14 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = { ...@@ -341,9 +341,14 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
.batt_name = "main-batt", .batt_name = "main-batt",
}; };
/****************************************************************************** static struct wm97xx_pdata palmz72_wm97xx_pdata = {
* aSoC audio .batt_pdata = &palmz72_batt_pdata,
******************************************************************************/ };
static pxa2xx_audio_ops_t palmz72_ac97_pdata = {
.codec_pdata = { &palmz72_wm97xx_pdata, },
};
static struct platform_device palmz72_asoc = { static struct platform_device palmz72_asoc = {
.name = "palm27x-asoc", .name = "palm27x-asoc",
.id = -1, .id = -1,
...@@ -480,10 +485,9 @@ static void __init palmz72_init(void) ...@@ -480,10 +485,9 @@ static void __init palmz72_init(void)
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(); palmz72_udc_init();
pxa_set_ac97_info(NULL); pxa_set_ac97_info(&palmz72_ac97_pdata);
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));
} }
......
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