* [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
@ 2009-08-17 18:48 Candelaria Villareal, Jorge
2009-08-18 4:56 ` Peter Ujfalusi
0 siblings, 1 reply; 9+ messages in thread
From: Candelaria Villareal, Jorge @ 2009-08-17 18:48 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, Peter Ujfalusi
Fix the write to PMBR1 register through I2C. Also, the constant which
holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
name is based on TRM to avoid confusion.
Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
---
sound/soc/omap/sdp3430.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
index f7e5b74..2eb1a69 100644
--- a/sound/soc/omap/sdp3430.c
+++ b/sound/soc/omap/sdp3430.c
@@ -40,8 +40,10 @@
#include "omap-pcm.h"
#include "../codecs/twl4030.h"
-#define TWL4030_INTBR_PMBR1 0x0D
-#define EXTMUTE(value) (value << 2)
+/* TWL4030 PMBR1 Register */
+#define TWL4030_INTBR_PMBR1 0x0D
+/* TWL4030 PMBR1 Register GPIO6 mux bit */
+#define TWL4030_GPIO6_PWM0_MUTE(value) (value << 2)
static struct snd_soc_card snd_soc_sdp3430;
@@ -299,6 +301,7 @@ static struct platform_device *sdp3430_snd_device;
static int __init sdp3430_soc_init(void)
{
int ret;
+ u8 pin_mux;
if (!machine_is_omap_3430sdp()) {
pr_debug("Not SDP3430!\n");
@@ -318,8 +321,12 @@ static int __init sdp3430_soc_init(void)
*(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */
/* Set TWL4030 GPIO6 as EXTMUTE signal */
- twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
- TWL4030_MODULE_INTBR);
+ twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, &pin_mux,
+ TWL4030_INTBR_PMBR1);
+ pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x3);
+ pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x2);
+ twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
+ TWL4030_INTBR_PMBR1);
ret = platform_device_add(sdp3430_snd_device);
if (ret)
--
1.6.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
2009-08-17 18:48 [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request Candelaria Villareal, Jorge
@ 2009-08-18 4:56 ` Peter Ujfalusi
0 siblings, 0 replies; 9+ messages in thread
From: Peter Ujfalusi @ 2009-08-18 4:56 UTC (permalink / raw)
To: ext Candelaria Villareal, Jorge; +Cc: alsa-devel, broonie
On Monday 17 August 2009 21:48:27 ext Candelaria Villareal, Jorge wrote:
> /* Set TWL4030 GPIO6 as EXTMUTE signal */
> - twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
> - TWL4030_MODULE_INTBR);
> + twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, &pin_mux,
^
I'm sure you wanted to have twl4030_i2c_read_u8 here.
> + TWL4030_INTBR_PMBR1);
> + pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x3);
> + pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x2);
Using 0x03 and 0x02 looks better than 0x3/0x2...
> + twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
> + TWL4030_INTBR_PMBR1);
>
> ret = platform_device_add(sdp3430_snd_device);
> if (ret)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
2009-08-25 15:13 Candelaria Villareal, Jorge
@ 2009-08-25 18:30 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2009-08-25 18:30 UTC (permalink / raw)
To: Candelaria Villareal, Jorge; +Cc: alsa-devel, Peter Ujfalusi
On Tue, Aug 25, 2009 at 10:13:25AM -0500, Candelaria Villareal, Jorge wrote:
> Fix the write to PMBR1 register through I2C. Also, the constant which
> holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
> name is based on TRM to avoid confusion.
> Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Applied thanks (with Peter's ack for the previous submission).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
@ 2009-08-25 15:13 Candelaria Villareal, Jorge
2009-08-25 18:30 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Candelaria Villareal, Jorge @ 2009-08-25 15:13 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, Peter Ujfalusi
Fix the write to PMBR1 register through I2C. Also, the constant which
holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
name is based on TRM to avoid confusion.
Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
---
sound/soc/omap/sdp3430.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
index f7e5b74..4a3f62d 100644
--- a/sound/soc/omap/sdp3430.c
+++ b/sound/soc/omap/sdp3430.c
@@ -40,8 +40,10 @@
#include "omap-pcm.h"
#include "../codecs/twl4030.h"
-#define TWL4030_INTBR_PMBR1 0x0D
-#define EXTMUTE(value) (value << 2)
+/* TWL4030 PMBR1 Register */
+#define TWL4030_INTBR_PMBR1 0x0D
+/* TWL4030 PMBR1 Register GPIO6 mux bit */
+#define TWL4030_GPIO6_PWM0_MUTE(value) (value << 2)
static struct snd_soc_card snd_soc_sdp3430;
@@ -299,6 +301,7 @@ static struct platform_device *sdp3430_snd_device;
static int __init sdp3430_soc_init(void)
{
int ret;
+ u8 pin_mux;
if (!machine_is_omap_3430sdp()) {
pr_debug("Not SDP3430!\n");
@@ -318,8 +321,12 @@ static int __init sdp3430_soc_init(void)
*(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */
/* Set TWL4030 GPIO6 as EXTMUTE signal */
- twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
- TWL4030_MODULE_INTBR);
+ twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
+ TWL4030_INTBR_PMBR1);
+ pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03);
+ pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02);
+ twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
+ TWL4030_INTBR_PMBR1);
ret = platform_device_add(sdp3430_snd_device);
if (ret)
--
1.6.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
2009-08-25 9:54 ` Peter Ujfalusi
@ 2009-08-25 15:07 ` Candelaria Villareal, Jorge
0 siblings, 0 replies; 9+ messages in thread
From: Candelaria Villareal, Jorge @ 2009-08-25 15:07 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, broonie
> On Tuesday 25 August 2009 03:04:50 ext Candelaria Villareal,
> Jorge wrote:
> > Fix the write to PMBR1 register through I2C. Also, the
> constant which
> > holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
> > name is based on TRM to avoid confusion.
> >
> > Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
>
> > /* Set TWL4030 GPIO6 as EXTMUTE signal */
> > - twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
> > - TWL4030_MODULE_INTBR);
> > + twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
> > + TWL4030_INTBR_PMBR1);
> > + pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x3);
> > + pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x2);
>
> I still think that using 0x03/0x02 instead of 0x3/0x2 looks better,
> but otherwise I see no problem with the patch.
I had forgot about doing this change. Mark found an issue with my patch,
so I will be resending again with the 0x03/0x02, since it does help code
look cleaner.
>
> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
2009-08-25 10:04 ` Mark Brown
@ 2009-08-25 15:04 ` Candelaria Villareal, Jorge
0 siblings, 0 replies; 9+ messages in thread
From: Candelaria Villareal, Jorge @ 2009-08-25 15:04 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Peter, Ujfalusi
> On Mon, Aug 24, 2009 at 07:04:50PM -0500, Candelaria
> Villareal, Jorge wrote:
> > Fix the write to PMBR1 register through I2C. Also, the
> constant which
> > holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
> > name is based on TRM to avoid confusion.
>
> > Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
>
> Your patch doesn't apply - it looks like your mail program may have
> mangled it in some interesting fashion and replaced all the tabs with
> single spaces but I'm not 100% sure. Could you please look
> into what's
> happened here?
>
>
Yes, it seems all the tabs have been replaced with single spaces. I have
corrected the problem and will resend in a few minutes.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
2009-08-25 0:04 Candelaria Villareal, Jorge
2009-08-25 9:54 ` Peter Ujfalusi
@ 2009-08-25 10:04 ` Mark Brown
2009-08-25 15:04 ` Candelaria Villareal, Jorge
1 sibling, 1 reply; 9+ messages in thread
From: Mark Brown @ 2009-08-25 10:04 UTC (permalink / raw)
To: Candelaria Villareal, Jorge; +Cc: alsa-devel, Peter Ujfalusi
On Mon, Aug 24, 2009 at 07:04:50PM -0500, Candelaria Villareal, Jorge wrote:
> Fix the write to PMBR1 register through I2C. Also, the constant which
> holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
> name is based on TRM to avoid confusion.
> Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Your patch doesn't apply - it looks like your mail program may have
mangled it in some interesting fashion and replaced all the tabs with
single spaces but I'm not 100% sure. Could you please look into what's
happened here?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
2009-08-25 0:04 Candelaria Villareal, Jorge
@ 2009-08-25 9:54 ` Peter Ujfalusi
2009-08-25 15:07 ` Candelaria Villareal, Jorge
2009-08-25 10:04 ` Mark Brown
1 sibling, 1 reply; 9+ messages in thread
From: Peter Ujfalusi @ 2009-08-25 9:54 UTC (permalink / raw)
To: Candelaria Villareal, Jorge; +Cc: alsa-devel, broonie
On Tuesday 25 August 2009 03:04:50 ext Candelaria Villareal, Jorge wrote:
> Fix the write to PMBR1 register through I2C. Also, the constant which
> holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
> name is based on TRM to avoid confusion.
>
> Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
> /* Set TWL4030 GPIO6 as EXTMUTE signal */
> - twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
> - TWL4030_MODULE_INTBR);
> + twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
> + TWL4030_INTBR_PMBR1);
> + pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x3);
> + pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x2);
I still think that using 0x03/0x02 instead of 0x3/0x2 looks better,
but otherwise I see no problem with the patch.
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request
@ 2009-08-25 0:04 Candelaria Villareal, Jorge
2009-08-25 9:54 ` Peter Ujfalusi
2009-08-25 10:04 ` Mark Brown
0 siblings, 2 replies; 9+ messages in thread
From: Candelaria Villareal, Jorge @ 2009-08-25 0:04 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, Peter Ujfalusi
Fix the write to PMBR1 register through I2C. Also, the constant which
holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
name is based on TRM to avoid confusion.
Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
---
sound/soc/omap/sdp3430.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
index f7e5b74..7ad99d2 100644
--- a/sound/soc/omap/sdp3430.c
+++ b/sound/soc/omap/sdp3430.c
@@ -40,8 +40,10 @@
#include "omap-pcm.h"
#include "../codecs/twl4030.h"
-#define TWL4030_INTBR_PMBR1 0x0D
-#define EXTMUTE(value) (value << 2)
+/* TWL4030 PMBR1 Register */
+#define TWL4030_INTBR_PMBR1 0x0D
+/* TWL4030 PMBR1 Register GPIO6 mux bit */
+#define TWL4030_GPIO6_PWM0_MUTE(value) (value << 2)
static struct snd_soc_card snd_soc_sdp3430;
@@ -299,6 +301,7 @@ static struct platform_device *sdp3430_snd_device;
static int __init sdp3430_soc_init(void)
{
int ret;
+ u8 pin_mux;
if (!machine_is_omap_3430sdp()) {
pr_debug("Not SDP3430!\n");
@@ -318,8 +321,12 @@ static int __init sdp3430_soc_init(void)
*(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */
/* Set TWL4030 GPIO6 as EXTMUTE signal */
- twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02),
- TWL4030_MODULE_INTBR);
+ twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux,
+ TWL4030_INTBR_PMBR1);
+ pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x3);
+ pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x2);
+ twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux,
+ TWL4030_INTBR_PMBR1);
ret = platform_device_add(sdp3430_snd_device);
if (ret)
--
1.6.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-08-25 18:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-17 18:48 [PATCH] ASoC: SDP3430: Fix TWL GPIO6 pin mux request Candelaria Villareal, Jorge
2009-08-18 4:56 ` Peter Ujfalusi
2009-08-25 0:04 Candelaria Villareal, Jorge
2009-08-25 9:54 ` Peter Ujfalusi
2009-08-25 15:07 ` Candelaria Villareal, Jorge
2009-08-25 10:04 ` Mark Brown
2009-08-25 15:04 ` Candelaria Villareal, Jorge
2009-08-25 15:13 Candelaria Villareal, Jorge
2009-08-25 18:30 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.