Loading drivers/mfd/wcd9xxx-core.c +21 −9 Original line number Diff line number Diff line Loading @@ -805,7 +805,7 @@ static int __wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, } /* * wcd9xxx_slim_write_repeat: Write the same register with multiple values * wcd9xxx_bus_write_repeat: Write the same register with multiple values * @wcd9xxx: handle to wcd core * @reg: register to be written * @bytes: number of bytes to be written to reg Loading @@ -813,7 +813,7 @@ static int __wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, * This API will write reg with bytes from src in a single slimbus * transaction. All values from 1 to 16 are supported by this API. */ int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int wcd9xxx_bus_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int bytes, void *src) { int ret = 0; Loading @@ -824,11 +824,21 @@ int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, if (ret) goto err; ret = __wcd9xxx_slim_write_repeat(wcd9xxx, reg, bytes, src); if (wcd9xxx_get_intf_type() == WCD9XXX_INTERFACE_TYPE_I2C) { ret = wcd9xxx->write_dev(wcd9xxx, reg, bytes, src, false); if (ret < 0) dev_err(wcd9xxx->dev, "%s: Codec repeat write failed (%d)\n", __func__, ret); } else { ret = __wcd9xxx_slim_write_repeat(wcd9xxx, reg, bytes, src); if (ret < 0) dev_err(wcd9xxx->dev, "%s: Codec repeat write failed (%d)\n", __func__, ret); } } else { ret = __wcd9xxx_slim_write_repeat(wcd9xxx, reg, bytes, src); } Loading @@ -836,7 +846,7 @@ err: mutex_unlock(&wcd9xxx->io_lock); return ret; } EXPORT_SYMBOL(wcd9xxx_slim_write_repeat); EXPORT_SYMBOL(wcd9xxx_bus_write_repeat); /* * wcd9xxx_slim_reserve_bw: API to reserve the slimbus bandwidth Loading Loading @@ -2088,6 +2098,7 @@ static int wcd9xxx_i2c_write_device(struct wcd9xxx *wcd9xxx, u16 reg, u8 *value, u8 reg_addr = 0; u8 data[bytes + 1]; struct wcd9xxx_i2c *wcd9xxx_i2c; int i; wcd9xxx_i2c = wcd9xxx_i2c_get_device_info(wcd9xxx, reg); if (wcd9xxx_i2c == NULL || wcd9xxx_i2c->client == NULL) { Loading @@ -2100,7 +2111,8 @@ static int wcd9xxx_i2c_write_device(struct wcd9xxx *wcd9xxx, u16 reg, u8 *value, msg->len = bytes + 1; msg->flags = 0; data[0] = reg; data[1] = *value; for (i = 0; i < bytes; i++) data[i + 1] = value[i]; msg->buf = data; ret = i2c_transfer(wcd9xxx_i2c->client->adapter, wcd9xxx_i2c->xfer_msg, 1); Loading include/linux/mfd/wcd9xxx/core.h +1 −1 Original line number Diff line number Diff line Loading @@ -308,7 +308,7 @@ int wcd9xxx_interface_reg_read(struct wcd9xxx *wcd9xxx, unsigned short reg); int wcd9xxx_interface_reg_write(struct wcd9xxx *wcd9xxx, unsigned short reg, u8 val); int wcd9xxx_get_logical_addresses(u8 *pgd_la, u8 *inf_la); int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int wcd9xxx_bus_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int bytes, void *src); int wcd9xxx_slim_reserve_bw(struct wcd9xxx *wcd9xxx, u32 bw_ops, bool commit); Loading sound/soc/codecs/wcd9335.c +5 −0 Original line number Diff line number Diff line Loading @@ -3233,6 +3233,11 @@ static int tasha_codec_get_mad_port_id(struct snd_soc_codec *codec, if (!tasha_p) return -EINVAL; if (tasha_p->intf_type == WCD9XXX_INTERFACE_TYPE_I2C) { *port_id = WCD_CPE_AFE_OUT_PORT_4; return 0; } dai = &tasha_p->dai[AIF4_MAD_TX]; list_for_each_entry(ch, &dai->wcd9xxx_ch_list, list) { if (ch->port == TASHA_TX12) Loading sound/soc/codecs/wcd_cpe_services.c +1 −1 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ static int cpe_register_write_repeat(u32 reg, u8 *ptr, u32 to_write) struct wcd9xxx *wcd9xxx = dev_get_drvdata(codec->dev->parent); int ret = 0; ret = wcd9xxx_slim_write_repeat(wcd9xxx, reg, to_write, ptr); ret = wcd9xxx_bus_write_repeat(wcd9xxx, reg, to_write, ptr); if (ret != 0) pr_err("%s: slim_write_repeat failed\n", __func__); Loading Loading
drivers/mfd/wcd9xxx-core.c +21 −9 Original line number Diff line number Diff line Loading @@ -805,7 +805,7 @@ static int __wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, } /* * wcd9xxx_slim_write_repeat: Write the same register with multiple values * wcd9xxx_bus_write_repeat: Write the same register with multiple values * @wcd9xxx: handle to wcd core * @reg: register to be written * @bytes: number of bytes to be written to reg Loading @@ -813,7 +813,7 @@ static int __wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, * This API will write reg with bytes from src in a single slimbus * transaction. All values from 1 to 16 are supported by this API. */ int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int wcd9xxx_bus_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int bytes, void *src) { int ret = 0; Loading @@ -824,11 +824,21 @@ int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, if (ret) goto err; ret = __wcd9xxx_slim_write_repeat(wcd9xxx, reg, bytes, src); if (wcd9xxx_get_intf_type() == WCD9XXX_INTERFACE_TYPE_I2C) { ret = wcd9xxx->write_dev(wcd9xxx, reg, bytes, src, false); if (ret < 0) dev_err(wcd9xxx->dev, "%s: Codec repeat write failed (%d)\n", __func__, ret); } else { ret = __wcd9xxx_slim_write_repeat(wcd9xxx, reg, bytes, src); if (ret < 0) dev_err(wcd9xxx->dev, "%s: Codec repeat write failed (%d)\n", __func__, ret); } } else { ret = __wcd9xxx_slim_write_repeat(wcd9xxx, reg, bytes, src); } Loading @@ -836,7 +846,7 @@ err: mutex_unlock(&wcd9xxx->io_lock); return ret; } EXPORT_SYMBOL(wcd9xxx_slim_write_repeat); EXPORT_SYMBOL(wcd9xxx_bus_write_repeat); /* * wcd9xxx_slim_reserve_bw: API to reserve the slimbus bandwidth Loading Loading @@ -2088,6 +2098,7 @@ static int wcd9xxx_i2c_write_device(struct wcd9xxx *wcd9xxx, u16 reg, u8 *value, u8 reg_addr = 0; u8 data[bytes + 1]; struct wcd9xxx_i2c *wcd9xxx_i2c; int i; wcd9xxx_i2c = wcd9xxx_i2c_get_device_info(wcd9xxx, reg); if (wcd9xxx_i2c == NULL || wcd9xxx_i2c->client == NULL) { Loading @@ -2100,7 +2111,8 @@ static int wcd9xxx_i2c_write_device(struct wcd9xxx *wcd9xxx, u16 reg, u8 *value, msg->len = bytes + 1; msg->flags = 0; data[0] = reg; data[1] = *value; for (i = 0; i < bytes; i++) data[i + 1] = value[i]; msg->buf = data; ret = i2c_transfer(wcd9xxx_i2c->client->adapter, wcd9xxx_i2c->xfer_msg, 1); Loading
include/linux/mfd/wcd9xxx/core.h +1 −1 Original line number Diff line number Diff line Loading @@ -308,7 +308,7 @@ int wcd9xxx_interface_reg_read(struct wcd9xxx *wcd9xxx, unsigned short reg); int wcd9xxx_interface_reg_write(struct wcd9xxx *wcd9xxx, unsigned short reg, u8 val); int wcd9xxx_get_logical_addresses(u8 *pgd_la, u8 *inf_la); int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int wcd9xxx_bus_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int bytes, void *src); int wcd9xxx_slim_reserve_bw(struct wcd9xxx *wcd9xxx, u32 bw_ops, bool commit); Loading
sound/soc/codecs/wcd9335.c +5 −0 Original line number Diff line number Diff line Loading @@ -3233,6 +3233,11 @@ static int tasha_codec_get_mad_port_id(struct snd_soc_codec *codec, if (!tasha_p) return -EINVAL; if (tasha_p->intf_type == WCD9XXX_INTERFACE_TYPE_I2C) { *port_id = WCD_CPE_AFE_OUT_PORT_4; return 0; } dai = &tasha_p->dai[AIF4_MAD_TX]; list_for_each_entry(ch, &dai->wcd9xxx_ch_list, list) { if (ch->port == TASHA_TX12) Loading
sound/soc/codecs/wcd_cpe_services.c +1 −1 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ static int cpe_register_write_repeat(u32 reg, u8 *ptr, u32 to_write) struct wcd9xxx *wcd9xxx = dev_get_drvdata(codec->dev->parent); int ret = 0; ret = wcd9xxx_slim_write_repeat(wcd9xxx, reg, to_write, ptr); ret = wcd9xxx_bus_write_repeat(wcd9xxx, reg, to_write, ptr); if (ret != 0) pr_err("%s: slim_write_repeat failed\n", __func__); Loading