* [PATCH v2 0/4] ASoC: Convert to module_i2c/spi_driver()
@ 2016-11-17 1:10 Kuninori Morimoto
2016-11-17 1:12 ` [PATCH v2 1/4] ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C) Kuninori Morimoto
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 1:10 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon, Charles Keepax, patches
Hi Mark
These are v2 of "ASoC: Convert to module_i2c/spi_driver()" patch series.
Mainly, it updated Subject and commit comment, and doesn't have I2C/SPI side patches.
It includes I2C side only.
Kuninori Morimoto (4):
ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)
ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)
ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)
sound/soc/codecs/Kconfig | 2 ++
sound/soc/codecs/uda1380.c | 22 +---------------------
sound/soc/codecs/wm8523.c | 24 +-----------------------
sound/soc/codecs/wm8580.c | 25 +------------------------
sound/soc/codecs/wm9081.c | 2 --
5 files changed, 5 insertions(+), 70 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 1/4] ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-17 1:10 [PATCH v2 0/4] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
@ 2016-11-17 1:12 ` Kuninori Morimoto
2016-11-17 1:13 ` [PATCH v2 2/4] ASoC: wm9081: " Kuninori Morimoto
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 1:12 UTC (permalink / raw)
To: Mark Brown, patches; +Cc: Linux-ALSA, Simon, Charles Keepax
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
uda1380 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
And, this patch adds "depends on I2C" to Kconfig
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
- title, commit message were updated
sound/soc/codecs/Kconfig | 1 +
sound/soc/codecs/uda1380.c | 22 +---------------------
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 50d2deb..764be36a 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -874,6 +874,7 @@ config SND_SOC_UDA134X
config SND_SOC_UDA1380
tristate
+ depends on I2C
config SND_SOC_WL1273
tristate
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 533e3bb..8e52439 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -775,7 +775,6 @@ static int uda1380_remove(struct snd_soc_codec *codec)
},
};
-#if IS_ENABLED(CONFIG_I2C)
static int uda1380_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -815,27 +814,8 @@ static int uda1380_i2c_remove(struct i2c_client *i2c)
.remove = uda1380_i2c_remove,
.id_table = uda1380_i2c_id,
};
-#endif
-static int __init uda1380_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&uda1380_i2c_driver);
- if (ret != 0)
- pr_err("Failed to register UDA1380 I2C driver: %d\n", ret);
-#endif
- return ret;
-}
-module_init(uda1380_modinit);
-
-static void __exit uda1380_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&uda1380_i2c_driver);
-#endif
-}
-module_exit(uda1380_exit);
+module_i2c_driver(uda1380_i2c_driver);
MODULE_AUTHOR("Giorgio Padrin");
MODULE_DESCRIPTION("Audio support for codec Philips UDA1380");
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 2/4] ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-17 1:10 [PATCH v2 0/4] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-17 1:12 ` [PATCH v2 1/4] ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C) Kuninori Morimoto
@ 2016-11-17 1:13 ` Kuninori Morimoto
2016-11-17 1:13 ` [PATCH v2 3/4] ASoC: wm8580: " Kuninori Morimoto
2016-11-17 1:13 ` [PATCH v2 4/4] ASoC: wm8523: " Kuninori Morimoto
3 siblings, 0 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 1:13 UTC (permalink / raw)
To: Mark Brown, patches; +Cc: Linux-ALSA, Simon, Charles Keepax
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
wm9081 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C)
And, this patch adds "depends on I2C" to Kconfig
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
v1 -> v2
- title, commit message were updated
sound/soc/codecs/Kconfig | 1 +
sound/soc/codecs/wm9081.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 764be36a..f6a710a 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1060,6 +1060,7 @@ config SND_SOC_WM8998
config SND_SOC_WM9081
tristate
+ depends on I2C
config SND_SOC_WM9090
tristate
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 856867e..6febef3 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1304,7 +1304,6 @@ static int wm9081_probe(struct snd_soc_codec *codec)
.cache_type = REGCACHE_RBTREE,
};
-#if IS_ENABLED(CONFIG_I2C)
static int wm9081_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -1384,7 +1383,6 @@ static int wm9081_i2c_remove(struct i2c_client *client)
.remove = wm9081_i2c_remove,
.id_table = wm9081_i2c_id,
};
-#endif
module_i2c_driver(wm9081_i2c_driver);
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 3/4] ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-17 1:10 [PATCH v2 0/4] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-17 1:12 ` [PATCH v2 1/4] ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C) Kuninori Morimoto
2016-11-17 1:13 ` [PATCH v2 2/4] ASoC: wm9081: " Kuninori Morimoto
@ 2016-11-17 1:13 ` Kuninori Morimoto
2016-11-17 9:29 ` Charles Keepax
2016-11-21 19:26 ` Mark Brown
2016-11-17 1:13 ` [PATCH v2 4/4] ASoC: wm8523: " Kuninori Morimoto
3 siblings, 2 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 1:13 UTC (permalink / raw)
To: Mark Brown, patches; +Cc: Linux-ALSA, Simon, Charles Keepax
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
wm8580 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
- title, commit message were updated
sound/soc/codecs/wm8580.c | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index faa7287..243451f 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -932,7 +932,6 @@ static int wm8580_remove(struct snd_soc_codec *codec)
.volatile_reg = wm8580_volatile,
};
-#if IS_ENABLED(CONFIG_I2C)
static int wm8580_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -987,30 +986,8 @@ static int wm8580_i2c_remove(struct i2c_client *client)
.remove = wm8580_i2c_remove,
.id_table = wm8580_i2c_id,
};
-#endif
-static int __init wm8580_modinit(void)
-{
- int ret = 0;
-
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8580_i2c_driver);
- if (ret != 0) {
- pr_err("Failed to register WM8580 I2C driver: %d\n", ret);
- }
-#endif
-
- return ret;
-}
-module_init(wm8580_modinit);
-
-static void __exit wm8580_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8580_i2c_driver);
-#endif
-}
-module_exit(wm8580_exit);
+module_i2c_driver(wm8580_i2c_driver);
MODULE_DESCRIPTION("ASoC WM8580 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 4/4] ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-17 1:10 [PATCH v2 0/4] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (2 preceding siblings ...)
2016-11-17 1:13 ` [PATCH v2 3/4] ASoC: wm8580: " Kuninori Morimoto
@ 2016-11-17 1:13 ` Kuninori Morimoto
2016-11-17 9:29 ` Charles Keepax
3 siblings, 1 reply; 11+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 1:13 UTC (permalink / raw)
To: Mark Brown, patches; +Cc: Linux-ALSA, Simon, Charles Keepax
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
wm8523 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
- title, commit message were updated
sound/soc/codecs/wm8523.c | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index deb2e07..6d0a272 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -446,7 +446,6 @@ static int wm8523_probe(struct snd_soc_codec *codec)
.volatile_reg = wm8523_volatile_register,
};
-#if IS_ENABLED(CONFIG_I2C)
static int wm8523_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -543,29 +542,8 @@ static int wm8523_i2c_remove(struct i2c_client *client)
.remove = wm8523_i2c_remove,
.id_table = wm8523_i2c_id,
};
-#endif
-static int __init wm8523_modinit(void)
-{
- int ret;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8523_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8523 I2C driver: %d\n",
- ret);
- }
-#endif
- return 0;
-}
-module_init(wm8523_modinit);
-
-static void __exit wm8523_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8523_i2c_driver);
-#endif
-}
-module_exit(wm8523_exit);
+module_i2c_driver(wm8523_i2c_driver);
MODULE_DESCRIPTION("ASoC WM8523 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/4] ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-17 1:13 ` [PATCH v2 3/4] ASoC: wm8580: " Kuninori Morimoto
@ 2016-11-17 9:29 ` Charles Keepax
2016-11-21 19:26 ` Mark Brown
1 sibling, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2016-11-17 9:29 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, patches, Simon
On Thu, Nov 17, 2016 at 01:13:18AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> wm8580 driver doesn't work without CONFIG_I2C anyway.
> Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 4/4] ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-17 1:13 ` [PATCH v2 4/4] ASoC: wm8523: " Kuninori Morimoto
@ 2016-11-17 9:29 ` Charles Keepax
0 siblings, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2016-11-17 9:29 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, patches, Simon
On Thu, Nov 17, 2016 at 01:13:35AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> wm8523 driver doesn't work without CONFIG_I2C anyway.
> Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/4] ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-17 1:13 ` [PATCH v2 3/4] ASoC: wm8580: " Kuninori Morimoto
2016-11-17 9:29 ` Charles Keepax
@ 2016-11-21 19:26 ` Mark Brown
2016-11-22 2:03 ` Kuninori Morimoto
1 sibling, 1 reply; 11+ messages in thread
From: Mark Brown @ 2016-11-21 19:26 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, patches, Charles Keepax, Simon
[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]
On Thu, Nov 17, 2016 at 01:13:18AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> wm8580 driver doesn't work without CONFIG_I2C anyway.
> Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
This doesn't apply against current code, please check and resend.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/4] ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-21 19:26 ` Mark Brown
@ 2016-11-22 2:03 ` Kuninori Morimoto
2016-11-22 16:35 ` Mark Brown
0 siblings, 1 reply; 11+ messages in thread
From: Kuninori Morimoto @ 2016-11-22 2:03 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, patches, Charles Keepax, Simon
Hi Mark
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > wm8580 driver doesn't work without CONFIG_I2C anyway.
> > Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
>
> This doesn't apply against current code, please check and resend.
How about -C1 option ? it works for me.
If not, I can send v3 patch, please let me know
git am -C1 0003-ASoC-wm8580-Remove-if-IS_ENABLED-CONFIG_I2C.patch
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/4] ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-22 2:03 ` Kuninori Morimoto
@ 2016-11-22 16:35 ` Mark Brown
2016-11-24 1:22 ` Kuninori Morimoto
0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2016-11-22 16:35 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, patches, Charles Keepax, Simon
[-- Attachment #1.1: Type: text/plain, Size: 694 bytes --]
On Tue, Nov 22, 2016 at 02:03:25AM +0000, Kuninori Morimoto wrote:
> > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > wm8580 driver doesn't work without CONFIG_I2C anyway.
> > > Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
> > This doesn't apply against current code, please check and resend.
> How about -C1 option ? it works for me.
> If not, I can send v3 patch, please let me know
> git am -C1 0003-ASoC-wm8580-Remove-if-IS_ENABLED-CONFIG_I2C.patch
So, I happened to still have the patch sitting there in my apply folder
and that worked but in future please do resend things as I've usually
deleted the mail from my inbox when I say that.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/4] ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
2016-11-22 16:35 ` Mark Brown
@ 2016-11-24 1:22 ` Kuninori Morimoto
0 siblings, 0 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2016-11-24 1:22 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, patches, Charles Keepax, Simon
Hi Mark
> > > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> > > > wm8580 driver doesn't work without CONFIG_I2C anyway.
> > > > Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
>
> > > This doesn't apply against current code, please check and resend.
>
> > How about -C1 option ? it works for me.
> > If not, I can send v3 patch, please let me know
>
> > git am -C1 0003-ASoC-wm8580-Remove-if-IS_ENABLED-CONFIG_I2C.patch
>
> So, I happened to still have the patch sitting there in my apply folder
> and that worked but in future please do resend things as I've usually
> deleted the mail from my inbox when I say that.
OK, I see.
Sorry for my fault
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-11-24 1:22 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 1:10 [PATCH v2 0/4] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-17 1:12 ` [PATCH v2 1/4] ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C) Kuninori Morimoto
2016-11-17 1:13 ` [PATCH v2 2/4] ASoC: wm9081: " Kuninori Morimoto
2016-11-17 1:13 ` [PATCH v2 3/4] ASoC: wm8580: " Kuninori Morimoto
2016-11-17 9:29 ` Charles Keepax
2016-11-21 19:26 ` Mark Brown
2016-11-22 2:03 ` Kuninori Morimoto
2016-11-22 16:35 ` Mark Brown
2016-11-24 1:22 ` Kuninori Morimoto
2016-11-17 1:13 ` [PATCH v2 4/4] ASoC: wm8523: " Kuninori Morimoto
2016-11-17 9:29 ` Charles Keepax
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).