diff mbox

[v2] ASoC: ssm2518: Add explicit device tree support

Message ID alpine.DEB.2.02.1508131456110.27635@lnxricardw1.se.axis.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ricard Wanderlof Aug. 13, 2015, 1:10 p.m. UTC
Add OF match table to SSM2518 to allow direct matching without going
through I2C subsystem.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>

---
 sound/soc/codecs/ssm2518.c |    9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Lars-Peter Clausen Aug. 13, 2015, 1:30 p.m. UTC | #1
On 08/13/2015 03:10 PM, Ricard Wanderlof wrote:
> 
> Add OF match table to SSM2518 to allow direct matching without going
> through I2C subsystem.
> 
> Signed-off-by: Ricard Wanderlof <ricardw@axis.com>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.
Mark Brown Aug. 14, 2015, 3:53 p.m. UTC | #2
On Thu, Aug 13, 2015 at 03:10:19PM +0200, Ricard Wanderlof wrote:
> 
> Add OF match table to SSM2518 to allow direct matching without going
> through I2C subsystem.
> 
> Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
> 
> ---
>  sound/soc/codecs/ssm2518.c |    9 +++++++++
>  1 file changed, 9 insertions(+)

You should document all new DT bindings (even if they did implicitly
happen to work before).
Ricard Wanderlof Aug. 17, 2015, 6:43 a.m. UTC | #3
On Fri, 14 Aug 2015, Mark Brown wrote:

> On Thu, Aug 13, 2015 at 03:10:19PM +0200, Ricard Wanderlof wrote:
> > 
> > Add OF match table to SSM2518 to allow direct matching without going
> > through I2C subsystem.
> > 
> > Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
> > 
> > ---
> >  sound/soc/codecs/ssm2518.c |    9 +++++++++
> >  1 file changed, 9 insertions(+)
> 
> You should document all new DT bindings (even if they did implicitly
> happen to work before).

Do you mean in the commit message then? (The patch doesn't implement any 
bindings not already described in 
Documentation/devicetree/bindings/sound/ssm2518.txt).

/Ricard
Mark Brown Aug. 17, 2015, 5:28 p.m. UTC | #4
On Mon, Aug 17, 2015 at 08:43:23AM +0200, Ricard Wanderlof wrote:
> On Fri, 14 Aug 2015, Mark Brown wrote:

> > > Add OF match table to SSM2518 to allow direct matching without going
> > > through I2C subsystem.

> > > Signed-off-by: Ricard Wanderlof <ricardw@axis.com>

> > > ---
> > >  sound/soc/codecs/ssm2518.c |    9 +++++++++
> > >  1 file changed, 9 insertions(+)

> > You should document all new DT bindings (even if they did implicitly
> > happen to work before).

> Do you mean in the commit message then? (The patch doesn't implement any 
> bindings not already described in 
> Documentation/devicetree/bindings/sound/ssm2518.txt).

No, I mean the binding file.  In the unusual case that there's one
already that's not had the driver side changes made then you should
mention that it exists in the changelog.
diff mbox

Patch

diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index 67ea55a..2d199b1 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -811,6 +811,14 @@  static int ssm2518_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id ssm2518_dt_ids[] = {
+	{ .compatible = "adi,ssm2518", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, ssm2518_dt_ids);
+#endif
+
 static const struct i2c_device_id ssm2518_i2c_ids[] = {
 	{ "ssm2518", 0 },
 	{ }
@@ -821,6 +829,7 @@  static struct i2c_driver ssm2518_driver = {
 	.driver = {
 		.name = "ssm2518",
 		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(ssm2518_dt_ids),
 	},
 	.probe = ssm2518_i2c_probe,
 	.remove = ssm2518_i2c_remove,