diff mbox series

[2/5] ASoC: max98088: add OF support

Message ID 20180925142352.24106-3-m.felsch@pengutronix.de
State Superseded
Headers show
Series [1/5] ASoC: dt-bindings: add max98088 audio codec | expand

Commit Message

Marco Felsch Sept. 25, 2018, 2:23 p.m. UTC
From: Andreas Färber <afaerber@suse.de>


MAX98088 is an older version of the MAX98089 device.

Signed-off-by: Andreas Färber <afaerber@suse.de>

[m.felsch@pengutronix.de: add CONFIG_OF compile switch]
[m.felsch@pengutronix.de: adapt commit message]
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

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

-- 
2.19.0

Comments

Mark Brown Sept. 25, 2018, 5:11 p.m. UTC | #1
On Tue, Sep 25, 2018 at 04:23:49PM +0200, Marco Felsch wrote:
> From: Andreas Färber <afaerber@suse.de>

> 

> MAX98088 is an older version of the MAX98089 device.


With no software visible diffferences?
Marco Felsch Sept. 26, 2018, 10:42 a.m. UTC | #2
On 18-09-25 10:11, Mark Brown wrote:
> On Tue, Sep 25, 2018 at 04:23:49PM +0200, Marco Felsch wrote:

> > From: Andreas Färber <afaerber@suse.de>

> > 

> > MAX98088 is an older version of the MAX98089 device.

> 

> With no software visible diffferences?


I reviewd both RMs a 2nd time and see only a realy minor difference for
register 0x02 and 0x4e. Both covers a different jack plugin/off
handling.

0x02:
MAX98088 - Bit6 indicate JACKSNS State
MAX98089 - Bit6/7 indicates JACKSNS State

But this register is never read by the driver.

0x4e:
MAX98088 - Bit0 is reserved
MAX98089 - Bit0 is JDWK

The register has the default value for both chips and this value is set
during probe().

So I see no other software differences, but maybe a Maxim FAE can help
us?

Regards,
Marco
diff mbox series

Patch

diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index fb515aaa54fc..9450d5d9c492 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1742,9 +1742,19 @@  static const struct i2c_device_id max98088_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);
 
+#if defined(CONFIG_OF)
+static const struct of_device_id max98088_of_match[] = {
+	{ .compatible = "maxim,max98088" },
+	{ .compatible = "maxim,max98089" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, max98088_of_match);
+#endif
+
 static struct i2c_driver max98088_i2c_driver = {
 	.driver = {
 		.name = "max98088",
+		.of_match_table = of_match_ptr(max98088_of_match),
 	},
 	.probe  = max98088_i2c_probe,
 	.id_table = max98088_i2c_id,