* [PATCH 0/2] MFD: twl6040: Version support fixes, additions
@ 2012-07-16 9:49 Peter Ujfalusi
2012-07-16 9:49 ` [PATCH 1/2] MFD: twl6040: Fix revision information Peter Ujfalusi
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2012-07-16 9:49 UTC (permalink / raw)
To: Samuel Ortiz, Liam Girdwood, Mark Brown; +Cc: alsa-devel, linux-kernel
Hello,
The following series fixes the revision information for twl6040 and adds support
for twl6041.
While the first patch is changing a driver in sound/soc/codecs the series can go
via MFD since we do not have pending patches for twl6040 audio part for 3.6.
Regards,
Peter
---
Peter Ujfalusi (2):
MFD: twl6040: Fix revision information
MFD: twl6040: Add support for twl6041
Documentation/devicetree/bindings/mfd/twl6040.txt | 2 +-
drivers/mfd/twl6040-core.c | 1 +
include/linux/mfd/twl6040.h | 5 +++--
sound/soc/codecs/twl6040.c | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)
--
1.7.8.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] MFD: twl6040: Fix revision information
2012-07-16 9:49 [PATCH 0/2] MFD: twl6040: Version support fixes, additions Peter Ujfalusi
@ 2012-07-16 9:49 ` Peter Ujfalusi
2012-07-17 6:39 ` Rajeev kumar
2012-07-16 9:49 ` [PATCH 2/2] MFD: twl6040: Add support for twl6041 Peter Ujfalusi
2012-07-24 22:27 ` [PATCH 0/2] MFD: twl6040: Version support fixes, additions Samuel Ortiz
2 siblings, 1 reply; 7+ messages in thread
From: Peter Ujfalusi @ 2012-07-16 9:49 UTC (permalink / raw)
To: Samuel Ortiz, Liam Girdwood, Mark Brown; +Cc: linux-kernel, alsa-devel
twl6040 ES1.1 and ES1.2 have the same revid (0x01).
ES1.3 of twl6040 REVID is 0x02.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
include/linux/mfd/twl6040.h | 4 ++--
sound/soc/codecs/twl6040.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
index 6659487..e002097 100644
--- a/include/linux/mfd/twl6040.h
+++ b/include/linux/mfd/twl6040.h
@@ -161,8 +161,8 @@
#define TWL6040_CELLS 2
#define TWL6040_REV_ES1_0 0x00
-#define TWL6040_REV_ES1_1 0x01
-#define TWL6040_REV_ES1_2 0x02
+#define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */
+#define TWL6040_REV_ES1_3 0x02
#define TWL6040_IRQ_TH 0
#define TWL6040_IRQ_PLUG 1
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index a36e9fc..2786de2 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -653,7 +653,7 @@ int twl6040_get_hs_step_size(struct snd_soc_codec *codec)
{
struct twl6040 *twl6040 = codec->control_data;
- if (twl6040_get_revid(twl6040) < TWL6040_REV_ES1_2)
+ if (twl6040_get_revid(twl6040) < TWL6040_REV_ES1_3)
/* For ES under ES_1.3 HS step is 2 mV */
return 2;
else
--
1.7.8.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] MFD: twl6040: Add support for twl6041
2012-07-16 9:49 [PATCH 0/2] MFD: twl6040: Version support fixes, additions Peter Ujfalusi
2012-07-16 9:49 ` [PATCH 1/2] MFD: twl6040: Fix revision information Peter Ujfalusi
@ 2012-07-16 9:49 ` Peter Ujfalusi
2012-07-24 22:27 ` [PATCH 0/2] MFD: twl6040: Version support fixes, additions Samuel Ortiz
2 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2012-07-16 9:49 UTC (permalink / raw)
To: Samuel Ortiz, Liam Girdwood, Mark Brown; +Cc: alsa-devel, linux-kernel
The delta between twl6040 and twl6041 is small, the main difference is in
the number of GPOs (3 on twl6040, 1 on twl6041).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Documentation/devicetree/bindings/mfd/twl6040.txt | 2 +-
drivers/mfd/twl6040-core.c | 1 +
include/linux/mfd/twl6040.h | 1 +
3 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt
index bc67c6f..c855240 100644
--- a/Documentation/devicetree/bindings/mfd/twl6040.txt
+++ b/Documentation/devicetree/bindings/mfd/twl6040.txt
@@ -6,7 +6,7 @@ They are connected ot the host processor via i2c for commands, McPDM for audio
data and commands.
Required properties:
-- compatible : Must be "ti,twl6040";
+- compatible : "ti,twl6040" for twl6040, "ti,twl6041" for twl6041
- reg: must be 0x4b for i2c address
- interrupts: twl6040 has one interrupt line connecteded to the main SoC
- interrupt-parent: The parent interrupt controller
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c
index 4ded9e7..8b4c03b 100644
--- a/drivers/mfd/twl6040-core.c
+++ b/drivers/mfd/twl6040-core.c
@@ -696,6 +696,7 @@ static int __devexit twl6040_remove(struct i2c_client *client)
static const struct i2c_device_id twl6040_i2c_id[] = {
{ "twl6040", 0, },
+ { "twl6041", 0, },
{ },
};
MODULE_DEVICE_TABLE(i2c, twl6040_i2c_id);
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
index e002097..761c99c 100644
--- a/include/linux/mfd/twl6040.h
+++ b/include/linux/mfd/twl6040.h
@@ -163,6 +163,7 @@
#define TWL6040_REV_ES1_0 0x00
#define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */
#define TWL6040_REV_ES1_3 0x02
+#define TWL6041_REV_ES2_0 0x10
#define TWL6040_IRQ_TH 0
#define TWL6040_IRQ_PLUG 1
--
1.7.8.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] MFD: twl6040: Fix revision information
2012-07-16 9:49 ` [PATCH 1/2] MFD: twl6040: Fix revision information Peter Ujfalusi
@ 2012-07-17 6:39 ` Rajeev kumar
2012-07-17 11:55 ` Gabriel M. Beddingfield
2012-07-17 13:01 ` Peter Ujfalusi
0 siblings, 2 replies; 7+ messages in thread
From: Rajeev kumar @ 2012-07-17 6:39 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
Mark Brown, Samuel Ortiz, Liam Girdwood
Hello Peter,
On 7/16/2012 3:19 PM, Peter Ujfalusi wrote:
> twl6040 ES1.1 and ES1.2 have the same revid (0x01).
> ES1.3 of twl6040 REVID is 0x02.
>
> Signed-off-by: Peter Ujfalusi<peter.ujfalusi@ti.com>
> ---
> include/linux/mfd/twl6040.h | 4 ++--
> sound/soc/codecs/twl6040.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
> index 6659487..e002097 100644
> --- a/include/linux/mfd/twl6040.h
> +++ b/include/linux/mfd/twl6040.h
> @@ -161,8 +161,8 @@
> #define TWL6040_CELLS 2
>
> #define TWL6040_REV_ES1_0 0x00
> -#define TWL6040_REV_ES1_1 0x01
> -#define TWL6040_REV_ES1_2 0x02
> +#define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */
> +#define TWL6040_REV_ES1_3 0x02
>
> #define TWL6040_IRQ_TH 0
> #define TWL6040_IRQ_PLUG 1
> diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
> index a36e9fc..2786de2 100644
> --- a/sound/soc/codecs/twl6040.c
> +++ b/sound/soc/codecs/twl6040.c
> @@ -653,7 +653,7 @@ int twl6040_get_hs_step_size(struct snd_soc_codec *codec)
> {
> struct twl6040 *twl6040 = codec->control_data;
>
> - if (twl6040_get_revid(twl6040)< TWL6040_REV_ES1_2)
> + if (twl6040_get_revid(twl6040)< TWL6040_REV_ES1_3)
Instead of doing this change why not you take a #define for revision and
do
if (twl6040_get_revid(twl6040)< TWL6040_REV)
~Rajeev
> /* For ES under ES_1.3 HS step is 2 mV */
> return 2;
> else
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] MFD: twl6040: Fix revision information
2012-07-17 6:39 ` Rajeev kumar
@ 2012-07-17 11:55 ` Gabriel M. Beddingfield
2012-07-17 13:01 ` Peter Ujfalusi
1 sibling, 0 replies; 7+ messages in thread
From: Gabriel M. Beddingfield @ 2012-07-17 11:55 UTC (permalink / raw)
To: Rajeev kumar
Cc: alsa-devel@alsa-project.org, Samuel Ortiz, Mark Brown,
linux-kernel@vger.kernel.org, Peter Ujfalusi, Liam Girdwood
On 07/17/2012 01:39 AM, Rajeev kumar wrote:
>> diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
>> index a36e9fc..2786de2 100644
>> --- a/sound/soc/codecs/twl6040.c
>> +++ b/sound/soc/codecs/twl6040.c
>> @@ -653,7 +653,7 @@ int twl6040_get_hs_step_size(struct snd_soc_codec
>> *codec)
>> {
>> struct twl6040 *twl6040 = codec->control_data;
>>
>> - if (twl6040_get_revid(twl6040)< TWL6040_REV_ES1_2)
>> + if (twl6040_get_revid(twl6040)< TWL6040_REV_ES1_3)
>
>
> Instead of doing this change why not you take a #define for revision and
> do
> if (twl6040_get_revid(twl6040)< TWL6040_REV)
I disagree. The driver isn't just for one revision... it's for all of
them. Peter's code is pretty clear as to what the situation is. Your
suggestion hides it.
-gabriel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] MFD: twl6040: Fix revision information
2012-07-17 6:39 ` Rajeev kumar
2012-07-17 11:55 ` Gabriel M. Beddingfield
@ 2012-07-17 13:01 ` Peter Ujfalusi
1 sibling, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2012-07-17 13:01 UTC (permalink / raw)
To: Rajeev kumar
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
Mark Brown, Samuel Ortiz, Liam Girdwood
On 07/17/2012 08:39 AM, Rajeev kumar wrote:
>> #define TWL6040_REV_ES1_0 0x00
>> -#define TWL6040_REV_ES1_1 0x01
>> -#define TWL6040_REV_ES1_2 0x02
>> +#define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */
>> +#define TWL6040_REV_ES1_3 0x02
>>
>> #define TWL6040_IRQ_TH 0
>> #define TWL6040_IRQ_PLUG 1
>> diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
>> index a36e9fc..2786de2 100644
>> --- a/sound/soc/codecs/twl6040.c
>> +++ b/sound/soc/codecs/twl6040.c
>> @@ -653,7 +653,7 @@ int twl6040_get_hs_step_size(struct snd_soc_codec *codec)
>> {
>> struct twl6040 *twl6040 = codec->control_data;
>>
>> - if (twl6040_get_revid(twl6040)< TWL6040_REV_ES1_2)
>> + if (twl6040_get_revid(twl6040)< TWL6040_REV_ES1_3)
>
>
> Instead of doing this change why not you take a #define for revision and do
> if (twl6040_get_revid(twl6040)< TWL6040_REV)
ES1.1, ES1.2 of twl6040 have 2mV HS step. Newer revisions (ES1.3 of twl6040
and twl6041) have 1mV HS step.
Here the comment was correct, but the define name was incorrect.
>
> ~Rajeev
>
>> /* For ES under ES_1.3 HS step is 2 mV */
>> return 2;
>> else
>
--
Péter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] MFD: twl6040: Version support fixes, additions
2012-07-16 9:49 [PATCH 0/2] MFD: twl6040: Version support fixes, additions Peter Ujfalusi
2012-07-16 9:49 ` [PATCH 1/2] MFD: twl6040: Fix revision information Peter Ujfalusi
2012-07-16 9:49 ` [PATCH 2/2] MFD: twl6040: Add support for twl6041 Peter Ujfalusi
@ 2012-07-24 22:27 ` Samuel Ortiz
2 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2012-07-24 22:27 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: Liam Girdwood, Mark Brown, linux-kernel, alsa-devel
Hi Peter,
On Mon, Jul 16, 2012 at 11:49:42AM +0200, Peter Ujfalusi wrote:
> Hello,
>
> The following series fixes the revision information for twl6040 and adds support
> for twl6041.
>
Both patches applied to my for-next branch, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-07-24 22:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16 9:49 [PATCH 0/2] MFD: twl6040: Version support fixes, additions Peter Ujfalusi
2012-07-16 9:49 ` [PATCH 1/2] MFD: twl6040: Fix revision information Peter Ujfalusi
2012-07-17 6:39 ` Rajeev kumar
2012-07-17 11:55 ` Gabriel M. Beddingfield
2012-07-17 13:01 ` Peter Ujfalusi
2012-07-16 9:49 ` [PATCH 2/2] MFD: twl6040: Add support for twl6041 Peter Ujfalusi
2012-07-24 22:27 ` [PATCH 0/2] MFD: twl6040: Version support fixes, additions Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).