diff mbox

[v2,2/2] ASoC: ads117x: Add device tree compatible string

Message ID 1454686334-9668-3-git-send-email-florian.vaussard@heig-vd.ch (mailing list archive)
State Accepted
Commit 4f2bf0ace0f96cc693002e1bbde967fa2356bc43
Headers show

Commit Message

Florian Vaussard Feb. 5, 2016, 3:32 p.m. UTC
This patch adds the necessary device tree compatible string to allow DT
probing.

Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
---
 sound/soc/codecs/ads117x.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Florian Vaussard Feb. 24, 2016, 7:36 a.m. UTC | #1
Hello Mark,

On 02/05/2016 04:32 PM, Florian Vaussard wrote:
> This patch adds the necessary device tree compatible string to allow DT
> probing.
> 
> Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
> ---
>  sound/soc/codecs/ads117x.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c
> index 1222282..c5be1bd 100644
> --- a/sound/soc/codecs/ads117x.c
> +++ b/sound/soc/codecs/ads117x.c
> @@ -20,6 +20,8 @@
>  #include <sound/initval.h>
>  #include <sound/soc.h>
>  
> +#include <linux/of.h>
> +
>  #define ADS117X_RATES (SNDRV_PCM_RATE_8000_48000)
>  #define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
>  
> @@ -75,9 +77,19 @@ static int ads117x_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#if defined(CONFIG_OF)
> +static const struct of_device_id ads117x_dt_ids[] = {
> +	{ .compatible = "ti,ads1174" },
> +	{ .compatible = "ti,ads1178" },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(of, ads117x_dt_ids);
> +#endif
> +
>  static struct platform_driver ads117x_codec_driver = {
>  	.driver = {
>  			.name = "ads117x-codec",
> +			.of_match_table = of_match_ptr(ads117x_dt_ids),
>  	},
>  
>  	.probe = ads117x_probe,
> 

Do you have any more comments on this patch?

Best regards,
Florian
Mark Brown Feb. 26, 2016, 2:14 a.m. UTC | #2
On Wed, Feb 24, 2016 at 08:36:37AM +0100, Florian Vaussard wrote:
> >  			.name = "ads117x-codec",
> > +			.of_match_table = of_match_ptr(ads117x_dt_ids),
> >  	},
> >  
> >  	.probe = ads117x_probe,
> > 

> Do you have any more comments on this patch?

Please don't send content free pings and please allow a reasonable time
for review.  People get busy, go on holiday, attend conferences and so 
on so unless there is some reason for urgency (like critical bug fixes)
please allow at least a couple of weeks for review.  Sending content
free pings just adds to the mail volume (if they are seen at all) and if 
something has gone wrong you'll have to resend the patches anyway.
diff mbox

Patch

diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c
index 1222282..c5be1bd 100644
--- a/sound/soc/codecs/ads117x.c
+++ b/sound/soc/codecs/ads117x.c
@@ -20,6 +20,8 @@ 
 #include <sound/initval.h>
 #include <sound/soc.h>
 
+#include <linux/of.h>
+
 #define ADS117X_RATES (SNDRV_PCM_RATE_8000_48000)
 #define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
 
@@ -75,9 +77,19 @@  static int ads117x_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#if defined(CONFIG_OF)
+static const struct of_device_id ads117x_dt_ids[] = {
+	{ .compatible = "ti,ads1174" },
+	{ .compatible = "ti,ads1178" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, ads117x_dt_ids);
+#endif
+
 static struct platform_driver ads117x_codec_driver = {
 	.driver = {
 			.name = "ads117x-codec",
+			.of_match_table = of_match_ptr(ads117x_dt_ids),
 	},
 
 	.probe = ads117x_probe,