Lines Matching refs:error

184 	int error;
187 error = iio_read_channel_processed(channel, value);
188 if (error < 0) {
190 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
193 return error;
204 int error, value = 0;
207 error = iio_read_channel_processed(channel, &value);
208 if (error < 0) {
209 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
220 int error, value = 0;
223 error = iio_read_channel_processed(channel, &value);
224 if (error < 0) {
225 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
312 int error;
320 error = regmap_bulk_read(ddata->reg, CPCAP_REG_CCS1,
322 if (error)
442 int value, acc, error;
447 error = regmap_read(ddata->reg, CPCAP_REG_CCI, &value);
448 if (error)
449 return error;
460 error = regmap_read(ddata->reg, CPCAP_REG_CCM, &value);
461 if (error)
462 return error;
474 int error;
480 error = power_supply_get_property(charger, POWER_SUPPLY_PROP_STATUS,
482 if (error)
489 return error;
496 int error, val;
498 error = cpcap_battery_get_charger_status(ddata, &val);
499 if (!error) {
545 int error;
563 error = cpcap_charger_battery_temperature(ddata,
565 if (error)
566 return error;
799 int error;
805 error = power_supply_get_property(charger,
808 if (error)
817 error = power_supply_set_property(charger,
823 return error;
920 int irq, error;
926 error = devm_request_threaded_irq(ddata->dev, irq, NULL,
930 if (error) {
932 name, error);
934 return error;
963 int i, error;
966 error = cpcap_battery_init_irq(pdev, ddata,
968 if (error)
969 return error;
976 error = regmap_update_bits(ddata->reg, CPCAP_REG_BPEOL,
979 if (error)
980 return error;
990 int error, i;
996 error = PTR_ERR(ddata->channels[i]);
1001 error = -ENXIO;
1009 return dev_err_probe(ddata->dev, error,
1016 int error, ccc1, value;
1019 error = regmap_read(ddata->reg, CPCAP_REG_CCC1, &ccc1);
1020 if (error)
1021 return error;
1026 error = regmap_update_bits(ddata->reg, CPCAP_REG_CCC1,
1029 if (error)
1033 error = regmap_read(ddata->reg, CPCAP_REG_CCC1, &value);
1034 if (error)
1040 error = regmap_read(ddata->reg, CPCAP_REG_CCM, &value);
1041 if (error)
1048 error = regmap_read(ddata->reg, CPCAP_REG_CCM, &value);
1049 if (error)
1055 if (error)
1056 dev_err(ddata->dev, "%s: error %i\n", __func__, error);
1058 error = regmap_update_bits(ddata->reg, CPCAP_REG_CCC1,
1060 if (error)
1061 dev_err(ddata->dev, "%s: restore error %i\n",
1062 __func__, error);
1064 return error;
1092 int error;
1107 error = cpcap_get_vendor(ddata->dev, ddata->reg, &ddata->vendor);
1108 if (error)
1109 return error;
1125 error = cpcap_battery_init_interrupts(pdev, ddata);
1126 if (error)
1127 return error;
1129 error = cpcap_battery_init_iio(ddata);
1130 if (error)
1131 return error;
1139 error = PTR_ERR_OR_ZERO(ddata->psy);
1140 if (error) {
1142 return error;
1147 error = cpcap_battery_calibrate(ddata);
1148 if (error)
1149 return error;
1157 int error;
1160 error = regmap_update_bits(ddata->reg, CPCAP_REG_BPEOL,
1162 if (error)
1163 dev_err(&pdev->dev, "could not disable: %i\n", error);