* [PATCH v4 02/11] ep93xx: Don't use system controller defines in audio drivers
@ 2012-03-12 22:48 Ryan Mallon
2012-03-13 12:09 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Mallon @ 2012-03-12 22:48 UTC (permalink / raw)
To: linux-arm-kernel
Both the Snapper CL15 and EDB93xx audio drivers set the same audio
configuration in ep93xx_i2s_acquire. Remove the arguments to
ep93xx_i2s_acquire so that the audio drivers no longer need the
EP93XX_SYSCON defines exported.
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
---
This patch has already been applied in Mark's tree. It is posted
for inclusion here because this series is against v3.3-rc7 and
will cause build failures without it. There have been no changes
to the patch since Mark applied it, so it should be okay to
merge into both his tree and the arm-soc tree.
arch/arm/mach-ep93xx/core.c | 19 ++++---------------
arch/arm/mach-ep93xx/include/mach/platform.h | 2 +-
sound/soc/ep93xx/edb93xx.c | 4 +---
sound/soc/ep93xx/snappercl15.c | 4 +---
4 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 24203f9..b5c1dae 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -817,23 +817,12 @@ void __init ep93xx_register_i2s(void)
#define EP93XX_I2SCLKDIV_MASK (EP93XX_SYSCON_I2SCLKDIV_ORIDE | \
EP93XX_SYSCON_I2SCLKDIV_SPOL)
-int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
+int ep93xx_i2s_acquire(void)
{
unsigned val;
- /* Sanity check */
- if (i2s_pins & ~EP93XX_SYSCON_DEVCFG_I2S_MASK)
- return -EINVAL;
- if (i2s_config & ~EP93XX_I2SCLKDIV_MASK)
- return -EINVAL;
-
- /* Must have only one of I2SONSSP/I2SONAC97 set */
- if ((i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONSSP) ==
- (i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONAC97))
- return -EINVAL;
-
- ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2S_MASK);
- ep93xx_devcfg_set_bits(i2s_pins);
+ ep93xx_devcfg_set_clear(EP93XX_SYSCON_DEVCFG_I2SONAC97,
+ EP93XX_SYSCON_DEVCFG_I2S_MASK);
/*
* This is potentially racy with the clock api for i2s_mclk, sclk and
@@ -843,7 +832,7 @@ int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
*/
val = __raw_readl(EP93XX_SYSCON_I2SCLKDIV);
val &= ~EP93XX_I2SCLKDIV_MASK;
- val |= i2s_config;
+ val |= EP93XX_SYSCON_I2SCLKDIV_ORIDE | EP93XX_SYSCON_I2SCLKDIV_SPOL;
ep93xx_syscon_swlocked_write(val, EP93XX_SYSCON_I2SCLKDIV);
return 0;
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index d4c9349..ad63d4b 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -59,7 +59,7 @@ void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data);
int ep93xx_keypad_acquire_gpio(struct platform_device *pdev);
void ep93xx_keypad_release_gpio(struct platform_device *pdev);
void ep93xx_register_i2s(void);
-int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config);
+int ep93xx_i2s_acquire(void);
void ep93xx_i2s_release(void);
void ep93xx_register_ac97(void);
diff --git a/sound/soc/ep93xx/edb93xx.c b/sound/soc/ep93xx/edb93xx.c
index bae5cbb..e01cb02 100644
--- a/sound/soc/ep93xx/edb93xx.c
+++ b/sound/soc/ep93xx/edb93xx.c
@@ -85,9 +85,7 @@ static int __devinit edb93xx_probe(struct platform_device *pdev)
struct snd_soc_card *card = &snd_soc_edb93xx;
int ret;
- ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
- EP93XX_SYSCON_I2SCLKDIV_ORIDE |
- EP93XX_SYSCON_I2SCLKDIV_SPOL);
+ ret = ep93xx_i2s_acquire();
if (ret)
return ret;
diff --git a/sound/soc/ep93xx/snappercl15.c b/sound/soc/ep93xx/snappercl15.c
index ccae34a..a193cea 100644
--- a/sound/soc/ep93xx/snappercl15.c
+++ b/sound/soc/ep93xx/snappercl15.c
@@ -103,9 +103,7 @@ static int __devinit snappercl15_probe(struct platform_device *pdev)
struct snd_soc_card *card = &snd_soc_snappercl15;
int ret;
- ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
- EP93XX_SYSCON_I2SCLKDIV_ORIDE |
- EP93XX_SYSCON_I2SCLKDIV_SPOL);
+ ret = ep93xx_i2s_acquire();
if (ret)
return ret;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v4 02/11] ep93xx: Don't use system controller defines in audio drivers
2012-03-12 22:48 [PATCH v4 02/11] ep93xx: Don't use system controller defines in audio drivers Ryan Mallon
@ 2012-03-13 12:09 ` Arnd Bergmann
2012-03-14 1:18 ` Ryan Mallon
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2012-03-13 12:09 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 12 March 2012, Ryan Mallon wrote:
> This patch has already been applied in Mark's tree. It is posted
> for inclusion here because this series is against v3.3-rc7 and
> will cause build failures without it. There have been no changes
> to the patch since Mark applied it, so it should be okay to
> merge into both his tree and the arm-soc tree.
Ok, that should work. However, in the future when you anticipate
having to do something like this, I would suggest you do any patches
that you want to see applied to multiple branches as git-pull
requests, because that allows us to use the same changeset ids.
When we apply one patch separately to two branches, we end up
with multiple changesets in the git history, which is something
we normally try to avoid.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4 02/11] ep93xx: Don't use system controller defines in audio drivers
2012-03-13 12:09 ` Arnd Bergmann
@ 2012-03-14 1:18 ` Ryan Mallon
2012-03-14 11:28 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Mallon @ 2012-03-14 1:18 UTC (permalink / raw)
To: linux-arm-kernel
On 13/03/12 23:09, Arnd Bergmann wrote:
> On Monday 12 March 2012, Ryan Mallon wrote:
>> This patch has already been applied in Mark's tree. It is posted
>> for inclusion here because this series is against v3.3-rc7 and
>> will cause build failures without it. There have been no changes
>> to the patch since Mark applied it, so it should be okay to
>> merge into both his tree and the arm-soc tree.
>
> Ok, that should work. However, in the future when you anticipate
> having to do something like this, I would suggest you do any patches
> that you want to see applied to multiple branches as git-pull
> requests, because that allows us to use the same changeset ids.
Okay, the patches still need to be posted as a series for review before
doing a pull request though right? Should I just put a note on such
patches (below the changelog) that I am expecting to send them all via
arm-soc so that other maintainers don't grab individual patches for
driver support?
> When we apply one patch separately to two branches, we end up
> with multiple changesets in the git history, which is something
> we normally try to avoid.
Okay, thanks for the heads up.
~Ryan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4 02/11] ep93xx: Don't use system controller defines in audio drivers
2012-03-14 1:18 ` Ryan Mallon
@ 2012-03-14 11:28 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-03-14 11:28 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 14, 2012 at 12:18:21PM +1100, Ryan Mallon wrote:
> Okay, the patches still need to be posted as a series for review before
> doing a pull request though right? Should I just put a note on such
> patches (below the changelog) that I am expecting to send them all via
> arm-soc so that other maintainers don't grab individual patches for
> driver support?
You should always say if there's some dependency. With things like this
it's possibly easier to leave the defines hanging around for a while and
then send a followup patch which removes them, that way there's no
dependencies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120314/9fc3e756/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-14 11:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 22:48 [PATCH v4 02/11] ep93xx: Don't use system controller defines in audio drivers Ryan Mallon
2012-03-13 12:09 ` Arnd Bergmann
2012-03-14 1:18 ` Ryan Mallon
2012-03-14 11:28 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox