Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
64bd43a0
Commit
64bd43a0
authored
Apr 20, 2009
by
Russell King
Committed by
Russell King
Apr 20, 2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix' of
git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
parents
4a014a24
a48dc30d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
95 additions
and
37 deletions
+95
-37
arch/arm/mach-pxa/include/mach/audio.h
arch/arm/mach-pxa/include/mach/audio.h
+10
-0
arch/arm/mach-pxa/include/mach/palmasoc.h
arch/arm/mach-pxa/include/mach/palmasoc.h
+1
-6
arch/arm/mach-pxa/mioa701.c
arch/arm/mach-pxa/mioa701.c
+5
-1
arch/arm/mach-pxa/palmld.c
arch/arm/mach-pxa/palmld.c
+15
-3
arch/arm/mach-pxa/palmt5.c
arch/arm/mach-pxa/palmt5.c
+15
-3
arch/arm/mach-pxa/palmtx.c
arch/arm/mach-pxa/palmtx.c
+22
-1
arch/arm/mach-pxa/pcm990-baseboard.c
arch/arm/mach-pxa/pcm990-baseboard.c
+3
-3
include/sound/pxa2xx-lib.h
include/sound/pxa2xx-lib.h
+0
-15
sound/arm/pxa2xx-ac97-lib.c
sound/arm/pxa2xx-ac97-lib.c
+1
-1
sound/soc/pxa/palm27x.c
sound/soc/pxa/palm27x.c
+23
-4
No files found.
arch/arm/mach-pxa/include/mach/audio.h
View file @
64bd43a0
...
@@ -4,12 +4,22 @@
...
@@ -4,12 +4,22 @@
#include <sound/core.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm.h>
/*
* @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95)
* a -1 value means no gpio will be used for reset
* reset_gpio should only be specified for pxa27x CPUs where a silicon
* bug prevents correct operation of the reset line. If not specified,
* the default behaviour on these CPUs is to consider gpio 113 as the
* AC97 reset line, which is the default on most boards.
*/
typedef
struct
{
typedef
struct
{
int
(
*
startup
)(
struct
snd_pcm_substream
*
,
void
*
);
int
(
*
startup
)(
struct
snd_pcm_substream
*
,
void
*
);
void
(
*
shutdown
)(
struct
snd_pcm_substream
*
,
void
*
);
void
(
*
shutdown
)(
struct
snd_pcm_substream
*
,
void
*
);
void
(
*
suspend
)(
void
*
);
void
(
*
suspend
)(
void
*
);
void
(
*
resume
)(
void
*
);
void
(
*
resume
)(
void
*
);
void
*
priv
;
void
*
priv
;
int
reset_gpio
;
}
pxa2xx_audio_ops_t
;
}
pxa2xx_audio_ops_t
;
extern
void
pxa_set_ac97_info
(
pxa2xx_audio_ops_t
*
ops
);
extern
void
pxa_set_ac97_info
(
pxa2xx_audio_ops_t
*
ops
);
...
...
arch/arm/mach-pxa/include/mach/palmasoc.h
View file @
64bd43a0
#ifndef _INCLUDE_PALMASOC_H_
#ifndef _INCLUDE_PALMASOC_H_
#define _INCLUDE_PALMASOC_H_
#define _INCLUDE_PALMASOC_H_
struct
palm27x_asoc_info
{
struct
palm27x_asoc_info
{
int
jack_gpio
;
int
jack_gpio
;
};
};
#ifdef CONFIG_SND_PXA2XX_SOC_PALM27X
void
__init
palm27x_asoc_set_pdata
(
struct
palm27x_asoc_info
*
data
);
#else
static
inline
void
palm27x_asoc_set_pdata
(
struct
palm27x_asoc_info
*
data
)
{}
#endif
#endif
#endif
arch/arm/mach-pxa/mioa701.c
View file @
64bd43a0
...
@@ -742,6 +742,10 @@ struct i2c_pxa_platform_data i2c_pdata = {
...
@@ -742,6 +742,10 @@ struct i2c_pxa_platform_data i2c_pdata = {
.
fast_mode
=
1
,
.
fast_mode
=
1
,
};
};
static
pxa2xx_audio_ops_t
mioa701_ac97_info
=
{
.
reset_gpio
=
95
,
};
/*
/*
* Mio global
* Mio global
*/
*/
...
@@ -815,7 +819,7 @@ static void __init mioa701_machine_init(void)
...
@@ -815,7 +819,7 @@ static void __init mioa701_machine_init(void)
pxa_set_keypad_info
(
&
mioa701_keypad_info
);
pxa_set_keypad_info
(
&
mioa701_keypad_info
);
wm97xx_bat_set_pdata
(
&
mioa701_battery_data
);
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
(
NULL
);
pxa_set_ac97_info
(
&
mioa701_ac97_info
);
pm_power_off
=
mioa701_poweroff
;
pm_power_off
=
mioa701_poweroff
;
arm_pm_restart
=
mioa701_restart
;
arm_pm_restart
=
mioa701_restart
;
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
...
...
arch/arm/mach-pxa/palmld.c
View file @
64bd43a0
...
@@ -477,10 +477,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
...
@@ -477,10 +477,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
/******************************************************************************
/******************************************************************************
* aSoC audio
* aSoC audio
******************************************************************************/
******************************************************************************/
static
struct
palm27x_asoc_info
palm
27x
_asoc_pdata
=
{
static
struct
palm27x_asoc_info
palm
ld
_asoc_pdata
=
{
.
jack_gpio
=
GPIO_NR_PALMLD_EARPHONE_DETECT
,
.
jack_gpio
=
GPIO_NR_PALMLD_EARPHONE_DETECT
,
};
};
static
pxa2xx_audio_ops_t
palmld_ac97_pdata
=
{
.
reset_gpio
=
95
,
};
static
struct
platform_device
palmld_asoc
=
{
.
name
=
"palm27x-asoc"
,
.
id
=
-
1
,
.
dev
=
{
.
platform_data
=
&
palmld_asoc_pdata
,
},
};
/******************************************************************************
/******************************************************************************
* Framebuffer
* Framebuffer
******************************************************************************/
******************************************************************************/
...
@@ -544,6 +556,7 @@ static struct platform_device *devices[] __initdata = {
...
@@ -544,6 +556,7 @@ static struct platform_device *devices[] __initdata = {
&
palmld_backlight
,
&
palmld_backlight
,
&
palmld_leds
,
&
palmld_leds
,
&
power_supply
,
&
power_supply
,
&
palmld_asoc
,
};
};
static
struct
map_desc
palmld_io_desc
[]
__initdata
=
{
static
struct
map_desc
palmld_io_desc
[]
__initdata
=
{
...
@@ -573,11 +586,10 @@ static void __init palmld_init(void)
...
@@ -573,11 +586,10 @@ static void __init palmld_init(void)
set_pxa_fb_info
(
&
palmld_lcd_screen
);
set_pxa_fb_info
(
&
palmld_lcd_screen
);
pxa_set_mci_info
(
&
palmld_mci_platform_data
);
pxa_set_mci_info
(
&
palmld_mci_platform_data
);
pxa_set_ac97_info
(
NULL
);
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
);
wm97xx_bat_set_pdata
(
&
wm97xx_batt_pdata
);
palm27x_asoc_set_pdata
(
&
palm27x_asoc_pdata
);
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
}
}
...
...
arch/arm/mach-pxa/palmt5.c
View file @
64bd43a0
...
@@ -420,10 +420,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
...
@@ -420,10 +420,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
/******************************************************************************
/******************************************************************************
* aSoC audio
* aSoC audio
******************************************************************************/
******************************************************************************/
static
struct
palm27x_asoc_info
palm
27x
_asoc_pdata
=
{
static
struct
palm27x_asoc_info
palm
t5
_asoc_pdata
=
{
.
jack_gpio
=
GPIO_NR_PALMT5_EARPHONE_DETECT
,
.
jack_gpio
=
GPIO_NR_PALMT5_EARPHONE_DETECT
,
};
};
static
pxa2xx_audio_ops_t
palmt5_ac97_pdata
=
{
.
reset_gpio
=
95
,
};
static
struct
platform_device
palmt5_asoc
=
{
.
name
=
"palm27x-asoc"
,
.
id
=
-
1
,
.
dev
=
{
.
platform_data
=
&
palmt5_asoc_pdata
,
},
};
/******************************************************************************
/******************************************************************************
* Framebuffer
* Framebuffer
******************************************************************************/
******************************************************************************/
...
@@ -486,6 +498,7 @@ static struct platform_device *devices[] __initdata = {
...
@@ -486,6 +498,7 @@ static struct platform_device *devices[] __initdata = {
#endif
#endif
&
palmt5_backlight
,
&
palmt5_backlight
,
&
power_supply
,
&
power_supply
,
&
palmt5_asoc
,
};
};
/* setup udc GPIOs initial state */
/* setup udc GPIOs initial state */
...
@@ -504,12 +517,11 @@ static void __init palmt5_init(void)
...
@@ -504,12 +517,11 @@ static void __init palmt5_init(void)
set_pxa_fb_info
(
&
palmt5_lcd_screen
);
set_pxa_fb_info
(
&
palmt5_lcd_screen
);
pxa_set_mci_info
(
&
palmt5_mci_platform_data
);
pxa_set_mci_info
(
&
palmt5_mci_platform_data
);
palmt5_udc_init
();
palmt5_udc_init
();
pxa_set_ac97_info
(
&
palmt5_ac97_pdata
);
pxa_set_udc_info
(
&
palmt5_udc_info
);
pxa_set_udc_info
(
&
palmt5_udc_info
);
pxa_set_ac97_info
(
NULL
);
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
);
wm97xx_bat_set_pdata
(
&
wm97xx_batt_pdata
);
palm27x_asoc_set_pdata
(
&
palm27x_asoc_pdata
);
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
}
}
...
...
arch/arm/mach-pxa/palmtx.c
View file @
64bd43a0
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#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 "generic.h"
#include "generic.h"
#include "devices.h"
#include "devices.h"
...
@@ -433,6 +434,25 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
...
@@ -433,6 +434,25 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
.
batt_name
=
"main-batt"
,
.
batt_name
=
"main-batt"
,
};
};
/******************************************************************************
* aSoC audio
******************************************************************************/
static
struct
palm27x_asoc_info
palmtx_asoc_pdata
=
{
.
jack_gpio
=
GPIO_NR_PALMTX_EARPHONE_DETECT
,
};
static
pxa2xx_audio_ops_t
palmtx_ac97_pdata
=
{
.
reset_gpio
=
95
,
};
static
struct
platform_device
palmtx_asoc
=
{
.
name
=
"palm27x-asoc"
,
.
id
=
-
1
,
.
dev
=
{
.
platform_data
=
&
palmtx_asoc_pdata
,
},
};
/******************************************************************************
/******************************************************************************
* Framebuffer
* Framebuffer
******************************************************************************/
******************************************************************************/
...
@@ -495,6 +515,7 @@ static struct platform_device *devices[] __initdata = {
...
@@ -495,6 +515,7 @@ static struct platform_device *devices[] __initdata = {
#endif
#endif
&
palmtx_backlight
,
&
palmtx_backlight
,
&
power_supply
,
&
power_supply
,
&
palmtx_asoc
,
};
};
static
struct
map_desc
palmtx_io_desc
[]
__initdata
=
{
static
struct
map_desc
palmtx_io_desc
[]
__initdata
=
{
...
@@ -529,8 +550,8 @@ static void __init palmtx_init(void)
...
@@ -529,8 +550,8 @@ static void __init palmtx_init(void)
set_pxa_fb_info
(
&
palmtx_lcd_screen
);
set_pxa_fb_info
(
&
palmtx_lcd_screen
);
pxa_set_mci_info
(
&
palmtx_mci_platform_data
);
pxa_set_mci_info
(
&
palmtx_mci_platform_data
);
palmtx_udc_init
();
palmtx_udc_init
();
pxa_set_ac97_info
(
&
palmtx_ac97_pdata
);
pxa_set_udc_info
(
&
palmtx_udc_info
);
pxa_set_udc_info
(
&
palmtx_udc_info
);
pxa_set_ac97_info
(
NULL
);
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
);
wm97xx_bat_set_pdata
(
&
wm97xx_batt_pdata
);
...
...
arch/arm/mach-pxa/pcm990-baseboard.c
View file @
64bd43a0
...
@@ -377,7 +377,7 @@ struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
...
@@ -377,7 +377,7 @@ struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
#include <linux/i2c/pca953x.h>
#include <linux/i2c/pca953x.h>
static
struct
pca953x_platform_data
pca9536_data
=
{
static
struct
pca953x_platform_data
pca9536_data
=
{
.
gpio_base
=
NR_BUILTIN_GPIO
+
1
,
.
gpio_base
=
NR_BUILTIN_GPIO
,
};
};
static
int
gpio_bus_switch
;
static
int
gpio_bus_switch
;
...
@@ -405,9 +405,9 @@ static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link)
...
@@ -405,9 +405,9 @@ static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link)
int
ret
;
int
ret
;
if
(
!
gpio_bus_switch
)
{
if
(
!
gpio_bus_switch
)
{
ret
=
gpio_request
(
NR_BUILTIN_GPIO
+
1
,
"camera"
);
ret
=
gpio_request
(
NR_BUILTIN_GPIO
,
"camera"
);
if
(
!
ret
)
{
if
(
!
ret
)
{
gpio_bus_switch
=
NR_BUILTIN_GPIO
+
1
;
gpio_bus_switch
=
NR_BUILTIN_GPIO
;
gpio_direction_output
(
gpio_bus_switch
,
0
);
gpio_direction_output
(
gpio_bus_switch
,
0
);
}
else
}
else
gpio_bus_switch
=
-
EINVAL
;
gpio_bus_switch
=
-
EINVAL
;
...
...
include/sound/pxa2xx-lib.h
View file @
64bd43a0
...
@@ -42,19 +42,4 @@ extern int pxa2xx_ac97_hw_resume(void);
...
@@ -42,19 +42,4 @@ extern int pxa2xx_ac97_hw_resume(void);
extern
int
pxa2xx_ac97_hw_probe
(
struct
platform_device
*
dev
);
extern
int
pxa2xx_ac97_hw_probe
(
struct
platform_device
*
dev
);
extern
void
pxa2xx_ac97_hw_remove
(
struct
platform_device
*
dev
);
extern
void
pxa2xx_ac97_hw_remove
(
struct
platform_device
*
dev
);
/* AC97 platform_data */
/**
* struct pxa2xx_ac97_platform_data - pxa ac97 platform data
* @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95)
* a -1 value means no gpio will be used for reset
*
* Platform data should only be specified for pxa27x CPUs where a silicon bug
* prevents correct operation of the reset line. If not specified, the default
* behaviour is to consider gpio 113 as the AC97 reset line, which is the
* default on most boards.
*/
struct
pxa2xx_ac97_platform_data
{
int
reset_gpio
;
};
#endif
#endif
sound/arm/pxa2xx-ac97-lib.c
View file @
64bd43a0
...
@@ -364,7 +364,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_resume);
...
@@ -364,7 +364,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_resume);
int
__devinit
pxa2xx_ac97_hw_probe
(
struct
platform_device
*
dev
)
int
__devinit
pxa2xx_ac97_hw_probe
(
struct
platform_device
*
dev
)
{
{
int
ret
;
int
ret
;
struct
pxa2xx_ac97_platform_data
*
pdata
=
dev
->
dev
.
platform_data
;
pxa2xx_audio_ops_t
*
pdata
=
dev
->
dev
.
platform_data
;
if
(
pdata
)
{
if
(
pdata
)
{
switch
(
pdata
->
reset_gpio
)
{
switch
(
pdata
->
reset_gpio
)
{
...
...
sound/soc/pxa/palm27x.c
View file @
64bd43a0
...
@@ -200,7 +200,7 @@ static struct snd_soc_device palm27x_snd_devdata = {
...
@@ -200,7 +200,7 @@ static struct snd_soc_device palm27x_snd_devdata = {
static
struct
platform_device
*
palm27x_snd_device
;
static
struct
platform_device
*
palm27x_snd_device
;
static
int
__init
palm27x_asoc_init
(
void
)
static
int
palm27x_asoc_probe
(
struct
platform_device
*
pdev
)
{
{
int
ret
;
int
ret
;
...
@@ -208,6 +208,10 @@ static int __init palm27x_asoc_init(void)
...
@@ -208,6 +208,10 @@ static int __init palm27x_asoc_init(void)
machine_is_palmld
()))
machine_is_palmld
()))
return
-
ENODEV
;
return
-
ENODEV
;
if
(
pdev
->
dev
.
platform_data
)
palm27x_ep_gpio
=
((
struct
palm27x_asoc_info
*
)
(
pdev
->
dev
.
platform_data
))
->
jack_gpio
;
ret
=
gpio_request
(
palm27x_ep_gpio
,
"Headphone Jack"
);
ret
=
gpio_request
(
palm27x_ep_gpio
,
"Headphone Jack"
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -245,16 +249,31 @@ err_alloc:
...
@@ -245,16 +249,31 @@ err_alloc:
return
ret
;
return
ret
;
}
}
static
void
__exit
palm27x_asoc_exit
(
void
)
static
int
__devexit
palm27x_asoc_remove
(
struct
platform_device
*
pdev
)
{
{
free_irq
(
gpio_to_irq
(
palm27x_ep_gpio
),
NULL
);
free_irq
(
gpio_to_irq
(
palm27x_ep_gpio
),
NULL
);
gpio_free
(
palm27x_ep_gpio
);
gpio_free
(
palm27x_ep_gpio
);
platform_device_unregister
(
palm27x_snd_device
);
platform_device_unregister
(
palm27x_snd_device
);
return
0
;
}
}
void
__init
palm27x_asoc_set_pdata
(
struct
palm27x_asoc_info
*
data
)
static
struct
platform_driver
palm27x_wm9712_driver
=
{
.
probe
=
palm27x_asoc_probe
,
.
remove
=
__devexit_p
(
palm27x_asoc_remove
),
.
driver
=
{
.
name
=
"palm27x-asoc"
,
.
owner
=
THIS_MODULE
,
},
};
static
int
__init
palm27x_asoc_init
(
void
)
{
return
platform_driver_register
(
&
palm27x_wm9712_driver
);
}
static
void
__exit
palm27x_asoc_exit
(
void
)
{
{
p
alm27x_ep_gpio
=
data
->
jack_gpio
;
p
latform_driver_unregister
(
&
palm27x_wm9712_driver
)
;
}
}
module_init
(
palm27x_asoc_init
);
module_init
(
palm27x_asoc_init
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment