Lines Matching refs:error
179 int error, value = 0;
182 error = iio_read_channel_processed(channel, &value);
183 if (error < 0) {
184 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
195 int error, value = 0;
198 error = iio_read_channel_processed(channel, &value);
199 if (error < 0) {
200 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error);
277 int error;
281 error = power_supply_get_property(battery,
284 if (!error)
407 int error;
409 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM, 0x3fff,
412 if (error)
413 dev_err(ddata->dev, "%s failed with %i\n", __func__, error);
415 return error;
422 int error;
430 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM, 0x3fff,
437 if (error)
438 dev_err(ddata->dev, "%s failed with %i\n", __func__, error);
440 return error;
445 int error, value = 0;
449 error = iio_read_channel_processed(channel, &value);
450 if (error >= 0)
453 dev_err(ddata->dev, "error reading VBUS: %i\n", error);
463 int error;
480 error = cpcap_charger_disable(ddata);
481 if (error)
487 error = regmap_update_bits(ddata->reg, CPCAP_REG_VUSBC,
490 if (error)
493 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM,
496 if (error)
499 error = regmap_update_bits(ddata->reg, CPCAP_REG_VUSBC,
501 if (error)
504 error = regmap_update_bits(ddata->reg, CPCAP_REG_CRM,
506 if (error)
519 ddata->vbus_enabled ? "enable" : "disable", error);
540 int val, error;
542 error = regmap_read(ddata->reg, CPCAP_REG_INTS1, &val);
543 if (error)
544 return error;
550 error = regmap_read(ddata->reg, CPCAP_REG_INTS2, &val);
551 if (error)
552 return error;
560 error = regmap_read(ddata->reg, CPCAP_REG_INTS4, &val);
561 if (error)
562 return error;
598 int error;
610 error = cpcap_charger_disable(ddata);
611 if (error) {
625 int error, new_state;
630 error = cpcap_charger_get_ints_state(ddata, &s);
631 if (error)
698 error = power_supply_get_property(battery, POWER_SUPPLY_PROP_PRESENT, &val);
700 if (error)
715 error = cpcap_charger_enable(ddata,
718 if (error)
723 error = cpcap_charger_disable(ddata);
724 if (error)
735 dev_err(ddata->dev, "%s failed with %i\n", __func__, error);
755 int irq, error;
761 error = devm_request_threaded_irq(ddata->dev, irq, NULL,
765 if (error) {
767 name, error);
769 return error;
797 int i, error;
800 error = cpcap_usb_init_irq(pdev, ddata, cpcap_charger_irqs[i]);
801 if (error)
802 return error;
828 int error, i;
834 error = PTR_ERR(ddata->channels[i]);
839 error = -ENXIO;
847 if (error != -EPROBE_DEFER)
849 error);
851 return error;
883 int error;
907 error = cpcap_charger_init_iio(ddata);
908 if (error)
909 return error;
922 error = PTR_ERR(ddata->usb);
924 error);
926 return error;
929 error = cpcap_usb_init_interrupts(pdev, ddata);
930 if (error)
931 return error;
934 error = omap_usb2_set_comparator(&ddata->comparator);
935 if (error == -ENODEV) {
950 int error;
953 error = omap_usb2_set_comparator(NULL);
954 if (error)
956 error);
958 error = cpcap_charger_disable(ddata);
959 if (error) {
962 error);