Not for upstream! Not-Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> --- drivers/i2c/i2c-core-base.c | 2 +- sound/soc/codecs/ak4642.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 0cc4a5c49a15..97d3e9f8dfa7 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1307,7 +1307,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap) adap->lock_ops = &i2c_adapter_lock_ops; adap->locked_flags = 0; - adap->alias_idx = 0x08; /* first valid I2C address */ + adap->alias_idx = 0x3e; /* first valid I2C address */ rt_mutex_init(&adap->bus_lock); rt_mutex_init(&adap->mux_lock); mutex_init(&adap->userspace_clients_lock); diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 353237025514..d34476b80b41 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c @@ -639,6 +639,25 @@ static int ak4642_i2c_probe(struct i2c_client *i2c, struct regmap *regmap; struct ak4642_priv *priv; struct clk *mcko = NULL; +struct i2c_client *test, *test2, *test3; + +test = i2c_new_alias_device(i2c->adapter); +printk(KERN_INFO "****** wsa: %08x %08x\n", test->addr, i2c->adapter->alias_idx); + +test2 = i2c_new_alias_device(i2c->adapter); +printk(KERN_INFO "****** wsa: %08x %08x\n", test2->addr, i2c->adapter->alias_idx); + +//i2c_unregister_device(test2); +//printk(KERN_INFO "****** wsa: %08x %08x\n", test2->addr, i2c->adapter->alias_idx); + +i2c_unregister_device(test); +printk(KERN_INFO "****** wsa: %08x %08x\n", test->addr, i2c->adapter->alias_idx); + +test = i2c_new_alias_device(i2c->adapter); +printk(KERN_INFO "****** wsa: %08x %08x\n", test->addr, i2c->adapter->alias_idx); + +test3 = i2c_new_alias_device(i2c->adapter); +printk(KERN_INFO "****** wsa: %08x %08x\n", test3->addr, i2c->adapter->alias_idx); if (np) { const struct of_device_id *of_id; @@ -659,6 +678,7 @@ static int ak4642_i2c_probe(struct i2c_client *i2c, return -EINVAL; } + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; -- 2.20.1