ASoC: da9055: Partially fix device registration
Subsystems (4)
Mark Brown
maintainerPATCH 1/1 ASoC: da9055: Partially fix device registration
From: Mark Brown <[email protected]>
It has never been possible to even load the da9055 driver since both the MFD and CODEC drivers register the I2C device "da9055". Fix this by using the usual pattern for MFDs with multiple I2C addresses and having the CODEC driver reference an I2C dummy registered by the MFD.
Since I don't know which I2C address to use for the CODEC a FIXME has been left in the MFD, this doesn't make anything any worse since the device has never been able to load in the first place.
--- drivers/mfd/da9055-core.c | 3 +++ drivers/mfd/da9055-i2c.c | 2 ++ include/linux/mfd/da9055/core.h | 2 +- sound/soc/codecs/da9055.c | 49 ++++++++++++++++++++--------------------- 4 files changed, 30 insertions(+), 26 deletions(-)
drivers/mfd/da9055-core.c +3 -0
@@ -365,6 +365,9 @@ static const struct mfd_cell da9055_devs[] = { .of_compatible = "dialog,da9055-watchdog", .name = "da9055-watchdog", }, + { + .name = "da9055-codec", + }, };static struct regmap_irq_chip da9055_regmap_irq_chip = {
drivers/mfd/da9055-i2c.c +2 -0
@@ -39,6 +39,8 @@ static int da9055_i2c_probe(struct i2c_client *i2c, da9055->dev = &i2c->dev; da9055->chip_irq = i2c->irq; +/* FIXME: Should use i2c_add_dummy() for the CODEC */ +i2c_set_clientdata (i2c, da9055);return da9055_device_init (da9055);
include/linux/mfd/da9055/core.h +1 -1
@@ -42,7 +42,7 @@ struct da9055 {struct regmap *regmap;struct regmap_irq_chip_data *irq_data;struct device *dev; -struct i2c_client *i2c_client; +struct i2c_client *i2c_client, *codec;int irq_base;int chip_irq;
sound/soc/codecs/da9055.c +24 -25
103 lines not on this page · raw message
Signature · 1 line
1.8.5.2
include/linux/mfd/da9055/core.h struct da9055 { · line 45
Quoted 9 lines
index
956afa445998..e293797ded66100644include/linux/mfd/da9055/core.h +1
-1@@ -42,7 +42,7 @@ struct da9055 {struct regmap *regmap;struct regmap_irq_chip_data *irq_data;struct device *dev; -struct i2c_client *i2c_client; +struct i2c_client *i2c_client, *codec;
I'd prefer this on its own in a struct declaration.
Apart from that MFD parts look good to me.
Can you create an IB for me to pull from?
Signature · 8 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel