• Home
  • Raw
  • Download

Lines Matching refs:ret

180 	int ret;  in tas5086_reg_write()  local
193 ret = i2c_master_send(client, buf, size + 1); in tas5086_reg_write()
194 if (ret == size + 1) in tas5086_reg_write()
196 else if (ret < 0) in tas5086_reg_write()
197 return ret; in tas5086_reg_write()
210 int ret; in tas5086_reg_read() local
228 ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in tas5086_reg_read()
229 if (ret < 0) in tas5086_reg_read()
230 return ret; in tas5086_reg_read()
231 else if (ret != ARRAY_SIZE(msgs)) in tas5086_reg_read()
367 int ret; in tas5086_hw_params() local
380 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
383 if (ret < 0) in tas5086_hw_params()
384 return ret; in tas5086_hw_params()
394 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
397 if (ret < 0) in tas5086_hw_params()
398 return ret; in tas5086_hw_params()
401 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
405 if (ret < 0) in tas5086_hw_params()
406 return ret; in tas5086_hw_params()
447 ret = regmap_write(priv->regmap, TAS5086_SERIAL_DATA_IF, val); in tas5086_hw_params()
448 if (ret < 0) in tas5086_hw_params()
449 return ret; in tas5086_hw_params()
452 ret = regmap_update_bits(priv->regmap, TAS5086_CLOCK_CONTROL, in tas5086_hw_params()
454 if (ret < 0) in tas5086_hw_params()
455 return ret; in tas5086_hw_params()
494 int ret, i; in tas5086_init() local
523 ret = regmap_write(priv->regmap, TAS5086_OSC_TRIM, 0x00); in tas5086_init()
524 if (ret < 0) in tas5086_init()
525 return ret; in tas5086_init()
528 ret = regmap_write(priv->regmap, TAS5086_SYS_CONTROL_2, 0x20); in tas5086_init()
529 if (ret < 0) in tas5086_init()
530 return ret; in tas5086_init()
533 ret = regmap_write(priv->regmap, TAS5086_SOFT_MUTE, in tas5086_init()
535 if (ret < 0) in tas5086_init()
536 return ret; in tas5086_init()
779 int ret; in tas5086_soc_suspend() local
782 ret = regmap_write(priv->regmap, TAS5086_SYS_CONTROL_2, 0x60); in tas5086_soc_suspend()
783 if (ret < 0) in tas5086_soc_suspend()
784 return ret; in tas5086_soc_suspend()
794 int ret; in tas5086_soc_resume() local
796 ret = regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies); in tas5086_soc_resume()
797 if (ret < 0) in tas5086_soc_resume()
798 return ret; in tas5086_soc_resume()
803 ret = tas5086_init(codec->dev, priv); in tas5086_soc_resume()
804 if (ret < 0) in tas5086_soc_resume()
805 return ret; in tas5086_soc_resume()
807 ret = regcache_sync(priv->regmap); in tas5086_soc_resume()
808 if (ret < 0) in tas5086_soc_resume()
809 return ret; in tas5086_soc_resume()
829 int i, ret; in tas5086_probe() local
831 ret = regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies); in tas5086_probe()
832 if (ret < 0) { in tas5086_probe()
833 dev_err(codec->dev, "Failed to enable regulators: %d\n", ret); in tas5086_probe()
834 return ret; in tas5086_probe()
858 ret = tas5086_init(codec->dev, priv); in tas5086_probe()
859 if (ret < 0) in tas5086_probe()
863 ret = regmap_write(priv->regmap, TAS5086_MASTER_VOL, 0x30); in tas5086_probe()
864 if (ret < 0) in tas5086_probe()
872 return ret; in tas5086_probe()
927 int i, ret; in tas5086_i2c_probe() local
936 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies), in tas5086_i2c_probe()
938 if (ret < 0) { in tas5086_i2c_probe()
939 dev_err(dev, "Failed to get regulators: %d\n", ret); in tas5086_i2c_probe()
940 return ret; in tas5086_i2c_probe()
945 ret = PTR_ERR(priv->regmap); in tas5086_i2c_probe()
946 dev_err(&i2c->dev, "Failed to create regmap: %d\n", ret); in tas5086_i2c_probe()
947 return ret; in tas5086_i2c_probe()
963 ret = regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies); in tas5086_i2c_probe()
964 if (ret < 0) { in tas5086_i2c_probe()
965 dev_err(dev, "Failed to enable regulators: %d\n", ret); in tas5086_i2c_probe()
966 return ret; in tas5086_i2c_probe()
972 ret = regmap_read(priv->regmap, TAS5086_DEV_ID, &i); in tas5086_i2c_probe()
973 if (ret == 0 && i != 0x3) { in tas5086_i2c_probe()
976 ret = -ENODEV; in tas5086_i2c_probe()
985 if (ret == 0) in tas5086_i2c_probe()
986 ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_tas5086, in tas5086_i2c_probe()
989 return ret; in tas5086_i2c_probe()