Lines Matching refs:error

184 	int error, temperature;
187 error = iio_read_channel_processed(channel, &temperature);
188 if (error < 0) {
189 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
200 int error, value = 0;
203 error = iio_read_channel_processed(channel, &value);
204 if (error < 0) {
205 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
216 int error, value = 0;
219 error = iio_read_channel_processed(channel, &value);
220 if (error < 0) {
221 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
295 int error;
299 error = power_supply_get_property(battery,
302 if (!error)
368 int error;
374 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM,
378 if (error) {
388 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM, 0x3fff,
395 if (error) {
405 dev_err(ddata->dev, "%s failed with %i\n", __func__, error);
407 return error;
412 int error, value = 0;
416 error = iio_read_channel_processed(channel, &value);
417 if (error >= 0)
420 dev_err(ddata->dev, "error reading VBUS: %i\n", error);
430 int error;
447 error = cpcap_charger_set_state(ddata, 0, 0, 0);
448 if (error)
451 error = regmap_update_bits(ddata->reg, CPCAP_REG_VUSBC,
454 if (error)
457 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM,
460 if (error)
463 error = regmap_update_bits(ddata->reg, CPCAP_REG_VUSBC,
465 if (error)
468 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM,
470 if (error)
482 ddata->vbus_enabled ? "enable" : "disable", error);
503 int val, error;
505 error = regmap_read(ddata->reg, CPCAP_REG_INTS1, &val);
506 if (error)
507 return error;
513 error = regmap_read(ddata->reg, CPCAP_REG_INTS2, &val);
514 if (error)
515 return error;
523 error = regmap_read(ddata->reg, CPCAP_REG_INTS4, &val);
524 if (error)
525 return error;
594 int error;
596 error = cpcap_charger_set_state(ddata, 0, 0, 0);
597 if (error)
609 int error;
614 error = cpcap_charger_get_ints_state(ddata, &s);
615 if (error)
671 error = cpcap_charger_set_state(ddata,
674 if (error)
678 error = cpcap_charger_set_state(ddata, 0, 0, 0);
679 if (error)
688 dev_err(ddata->dev, "%s failed with %i\n", __func__, error);
708 int irq, error;
714 error = devm_request_threaded_irq(ddata->dev, irq, NULL,
718 if (error) {
720 name, error);
722 return error;
750 int i, error;
753 error = cpcap_usb_init_irq(pdev, ddata, cpcap_charger_irqs[i]);
754 if (error)
755 return error;
781 int error, i;
787 error = PTR_ERR(ddata->channels[i]);
792 error = -ENXIO;
800 if (error != -EPROBE_DEFER)
802 error);
804 return error;
832 int error;
855 error = cpcap_charger_init_iio(ddata);
856 if (error)
857 return error;
868 error = PTR_ERR(ddata->usb);
870 error);
872 return error;
875 error = cpcap_usb_init_interrupts(pdev, ddata);
876 if (error)
877 return error;
880 error = omap_usb2_set_comparator(&ddata->comparator);
881 if (error == -ENODEV) {
896 int error;
899 error = omap_usb2_set_comparator(NULL);
900 if (error)
902 error);
904 error = cpcap_charger_set_state(ddata, 0, 0, 0);
905 if (error)
907 error);