Lines Matching defs:error

142 	int error, value = 0;
144 error = iio_read_channel_processed(ddata->vbus, &value);
145 if (error >= 0)
148 dev_err(ddata->dev, "error reading VBUS: %i\n", error);
179 int val, error;
181 error = regmap_read(ddata->reg, CPCAP_REG_INTS1, &val);
182 if (error)
183 return error;
189 error = regmap_read(ddata->reg, CPCAP_REG_INTS2, &val);
190 if (error)
191 return error;
198 error = regmap_read(ddata->reg, CPCAP_REG_INTS4, &val);
199 if (error)
200 return error;
214 int error;
216 error = musb_mailbox(status);
217 if (!error)
221 __func__, error);
229 int error;
233 error = cpcap_phy_get_ints_state(ddata, &s);
234 if (error)
245 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC3,
249 if (error)
269 error = cpcap_usb_set_usb_mode(ddata);
270 if (error)
291 error = cpcap_usb_set_usb_mode(ddata);
292 if (error)
297 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC3,
301 if (error)
307 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC3,
310 if (error)
318 error = cpcap_usb_set_usb_mode(ddata);
319 if (error)
331 error = cpcap_usb_set_uart_mode(ddata);
332 if (error)
340 dev_err(ddata->dev, "error setting cable state: %i\n", error);
359 int irq, error;
365 error = devm_request_threaded_irq(ddata->dev, irq, NULL,
370 if (error) {
372 name, error);
374 return error;
394 int i, error;
397 error = cpcap_usb_init_irq(pdev, ddata, cpcap_phy_irqs[i]);
398 if (error)
399 return error;
425 int error;
428 error = cpcap_usb_gpio_set_mode(ddata, CPCAP_UNKNOWN_DISABLED);
429 if (error)
433 error = pinctrl_select_state(ddata->pins, ddata->pins_uart);
434 if (error)
438 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC1,
441 if (error)
444 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC2,
447 if (error)
450 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC3, 0x7fff,
452 if (error)
456 error = cpcap_usb_gpio_set_mode(ddata, CPCAP_DM_DP);
457 if (error)
463 dev_err(ddata->dev, "%s failed with %i\n", __func__, error);
465 return error;
470 int error;
473 error = cpcap_usb_gpio_set_mode(ddata, CPCAP_UNKNOWN_DISABLED);
474 if (error)
475 return error;
478 error = pinctrl_select_state(ddata->pins, ddata->pins_utmi);
479 if (error) {
481 error);
483 return error;
487 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC1,
489 if (error)
492 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC3,
498 if (error)
501 error = regmap_update_bits(ddata->reg, CPCAP_REG_USBC2,
504 if (error)
508 error = cpcap_usb_gpio_set_mode(ddata, CPCAP_OTG_DM_DP);
509 if (error)
515 dev_err(ddata->dev, "%s failed with %i\n", __func__, error);
517 return error;
573 int error;
577 error = PTR_ERR(ddata->vbus);
582 error = -ENXIO;
586 error = iio_get_channel_type(ddata->vbus, &type);
587 if (error < 0)
591 error = -EINVAL;
599 error);
601 return error;
624 int error;
658 error = regulator_enable(ddata->vusb);
659 if (error)
660 return error;
664 error = PTR_ERR(generic_phy);
673 error = PTR_ERR(phy_provider);
677 error = cpcap_usb_init_optional_pins(ddata);
678 if (error)
683 error = cpcap_usb_init_iio(ddata);
684 if (error)
687 error = cpcap_usb_init_interrupts(pdev, ddata);
688 if (error)
700 return error;
706 int error;
709 error = cpcap_usb_set_uart_mode(ddata);
710 if (error)