• Home
  • Raw
  • Download

Lines Matching refs:rc

233 	int rc, i;  in wled3_set_brightness()  local
239 rc = regmap_bulk_write(wled->regmap, wled->ctrl_addr + in wled3_set_brightness()
242 if (rc < 0) in wled3_set_brightness()
243 return rc; in wled3_set_brightness()
251 int rc, i; in wled4_set_brightness() local
262 rc = regmap_bulk_write(wled->regmap, wled->sink_addr + in wled4_set_brightness()
265 if (rc < 0) in wled4_set_brightness()
266 return rc; in wled4_set_brightness()
274 int rc, offset; in wled5_set_brightness() local
288 rc = regmap_bulk_write(wled->regmap, wled->sink_addr + offset, in wled5_set_brightness()
290 return rc; in wled5_set_brightness()
302 int rc; in wled_module_enable() local
307 rc = regmap_update_bits(wled->regmap, wled->ctrl_addr + in wled_module_enable()
311 if (rc < 0) in wled_module_enable()
312 return rc; in wled_module_enable()
334 int rc; in wled3_sync_toggle() local
337 rc = regmap_update_bits(wled->regmap, in wled3_sync_toggle()
340 if (rc < 0) in wled3_sync_toggle()
341 return rc; in wled3_sync_toggle()
343 rc = regmap_update_bits(wled->regmap, in wled3_sync_toggle()
347 return rc; in wled3_sync_toggle()
352 int rc; in wled5_mod_sync_toggle() local
357 rc = regmap_update_bits(wled->regmap, in wled5_mod_sync_toggle()
360 if (rc < 0) in wled5_mod_sync_toggle()
361 return rc; in wled5_mod_sync_toggle()
370 int rc; in wled_ovp_fault_status() local
374 rc = regmap_read(wled->regmap, in wled_ovp_fault_status()
377 if (rc < 0) { in wled_ovp_fault_status()
378 dev_err(wled->dev, "Failed to read INT_RT_STS rc=%d\n", rc); in wled_ovp_fault_status()
379 return rc; in wled_ovp_fault_status()
382 rc = regmap_read(wled->regmap, in wled_ovp_fault_status()
385 if (rc < 0) { in wled_ovp_fault_status()
386 dev_err(wled->dev, "Failed to read FAULT_STATUS rc=%d\n", rc); in wled_ovp_fault_status()
387 return rc; in wled_ovp_fault_status()
404 return rc; in wled_ovp_fault_status()
414 int rc, delay_us; in wled5_ovp_delay() local
419 rc = regmap_read(wled->regmap, wled->ctrl_addr + in wled5_ovp_delay()
421 if (rc < 0) in wled5_ovp_delay()
436 int rc = 0; in wled_update_status() local
440 rc = wled->wled_set_brightness(wled, brightness); in wled_update_status()
441 if (rc < 0) { in wled_update_status()
443 rc); in wled_update_status()
448 rc = wled->wled_sync_toggle(wled); in wled_update_status()
449 if (rc < 0) { in wled_update_status()
450 dev_err(wled->dev, "wled sync failed rc:%d\n", rc); in wled_update_status()
458 rc = wled5_mod_sync_toggle(wled); in wled_update_status()
459 if (rc < 0) { in wled_update_status()
461 rc); in wled_update_status()
468 rc = wled_module_enable(wled, !!brightness); in wled_update_status()
469 if (rc < 0) { in wled_update_status()
470 dev_err(wled->dev, "wled enable failed rc:%d\n", rc); in wled_update_status()
480 return rc; in wled_update_status()
485 int i, j, rc; in wled4_cabc_config() local
492 rc = regmap_update_bits(wled->regmap, wled->sink_addr + in wled4_cabc_config()
495 if (rc < 0) in wled4_cabc_config()
496 return rc; in wled4_cabc_config()
504 int rc, offset; in wled5_cabc_config() local
514 rc = regmap_update_bits(wled->regmap, wled->sink_addr + offset, in wled5_cabc_config()
516 if (rc < 0) { in wled5_cabc_config()
517 pr_err("Error in configuring CABC rc=%d\n", rc); in wled5_cabc_config()
518 return rc; in wled5_cabc_config()
534 int rc; in wled_short_irq_handler() local
539 rc = wled_module_enable(wled, false); in wled_short_irq_handler()
540 if (rc < 0) { in wled_short_irq_handler()
541 dev_err(wled->dev, "wled disable failed rc:%d\n", rc); in wled_short_irq_handler()
560 rc = wled_module_enable(wled, true); in wled_short_irq_handler()
561 if (rc < 0) in wled_short_irq_handler()
562 dev_err(wled->dev, "wled enable failed rc:%d\n", rc); in wled_short_irq_handler()
574 int rc = 0, i, j, delay_time_us; in wled_auto_string_detection() local
580 rc = regmap_read(wled->regmap, wled->sink_addr + in wled_auto_string_detection()
582 if (rc < 0) { in wled_auto_string_detection()
584 rc); in wled_auto_string_detection()
589 rc = regmap_update_bits(wled->regmap, in wled_auto_string_detection()
592 if (rc < 0) { in wled_auto_string_detection()
593 dev_err(wled->dev, "Failed to disable WLED module rc=%d\n", rc); in wled_auto_string_detection()
598 rc = wled4_set_brightness(wled, AUTO_DETECT_BRIGHTNESS); in wled_auto_string_detection()
599 if (rc < 0) { in wled_auto_string_detection()
601 rc); in wled_auto_string_detection()
606 rc = wled->wled_cabc_config(wled, false); in wled_auto_string_detection()
607 if (rc < 0) in wled_auto_string_detection()
612 rc = regmap_write(wled->regmap, in wled_auto_string_detection()
614 if (rc < 0) { in wled_auto_string_detection()
615 dev_err(wled->dev, "Failed to disable all sinks rc=%d\n", rc); in wled_auto_string_detection()
625 rc = regmap_write(wled->regmap, wled->ctrl_addr + in wled_auto_string_detection()
627 if (rc < 0) { in wled_auto_string_detection()
629 j + 1, rc); in wled_auto_string_detection()
634 rc = regmap_write(wled->regmap, wled->sink_addr + in wled_auto_string_detection()
636 if (rc < 0) { in wled_auto_string_detection()
638 j + 1, rc); in wled_auto_string_detection()
643 rc = regmap_update_bits(wled->regmap, wled->ctrl_addr + in wled_auto_string_detection()
647 if (rc < 0) { in wled_auto_string_detection()
649 rc); in wled_auto_string_detection()
656 rc = wled_ovp_fault_status(wled, &fault_set); in wled_auto_string_detection()
657 if (rc < 0) { in wled_auto_string_detection()
659 rc); in wled_auto_string_detection()
670 rc = regmap_update_bits(wled->regmap, in wled_auto_string_detection()
673 if (rc < 0) { in wled_auto_string_detection()
675 rc); in wled_auto_string_detection()
693 rc = regmap_write(wled->regmap, in wled_auto_string_detection()
696 if (rc < 0) { in wled_auto_string_detection()
698 rc); in wled_auto_string_detection()
713 rc = regmap_write(wled->regmap, wled->sink_addr + in wled_auto_string_detection()
715 if (rc < 0) { in wled_auto_string_detection()
717 rc); in wled_auto_string_detection()
724 rc = wled->wled_cabc_config(wled, true); in wled_auto_string_detection()
725 if (rc < 0) in wled_auto_string_detection()
729 rc = regmap_write(wled->regmap, in wled_auto_string_detection()
731 if (rc < 0) { in wled_auto_string_detection()
733 rc); in wled_auto_string_detection()
738 rc = wled4_set_brightness(wled, wled->brightness); in wled_auto_string_detection()
739 if (rc < 0) { in wled_auto_string_detection()
741 rc); in wled_auto_string_detection()
745 rc = regmap_update_bits(wled->regmap, in wled_auto_string_detection()
749 if (rc < 0) { in wled_auto_string_detection()
750 dev_err(wled->dev, "Failed to enable WLED module rc=%d\n", rc); in wled_auto_string_detection()
813 int rc; in wled_auto_detection_at_init() local
819 rc = wled_ovp_fault_status(wled, &fault_set); in wled_auto_detection_at_init()
820 if (rc < 0) { in wled_auto_detection_at_init()
822 rc); in wled_auto_detection_at_init()
823 return rc; in wled_auto_detection_at_init()
832 return rc; in wled_auto_detection_at_init()
838 int rc; in wled_ovp_irq_handler() local
841 rc = regmap_read(wled->regmap, in wled_ovp_irq_handler()
843 if (rc < 0) { in wled_ovp_irq_handler()
845 rc); in wled_ovp_irq_handler()
849 rc = regmap_read(wled->regmap, wled->ctrl_addr + in wled_ovp_irq_handler()
851 if (rc < 0) { in wled_ovp_irq_handler()
853 rc); in wled_ovp_irq_handler()
877 int rc, i, j; in wled3_setup() local
879 rc = regmap_update_bits(wled->regmap, in wled3_setup()
882 if (rc) in wled3_setup()
883 return rc; in wled3_setup()
885 rc = regmap_update_bits(wled->regmap, in wled3_setup()
889 if (rc) in wled3_setup()
890 return rc; in wled3_setup()
892 rc = regmap_update_bits(wled->regmap, in wled3_setup()
896 if (rc) in wled3_setup()
897 return rc; in wled3_setup()
902 rc = regmap_update_bits(wled->regmap, addr, in wled3_setup()
905 if (rc) in wled3_setup()
906 return rc; in wled3_setup()
910 rc = regmap_update_bits(wled->regmap, addr, in wled3_setup()
913 if (rc) in wled3_setup()
914 return rc; in wled3_setup()
918 rc = regmap_update_bits(wled->regmap, addr, in wled3_setup()
921 if (rc) in wled3_setup()
922 return rc; in wled3_setup()
925 rc = regmap_update_bits(wled->regmap, addr, in wled3_setup()
929 if (rc) in wled3_setup()
930 return rc; in wled3_setup()
935 rc = regmap_update_bits(wled->regmap, in wled3_setup()
938 if (rc) in wled3_setup()
939 return rc; in wled3_setup()
958 int rc, temp, i, j; in wled4_setup() local
963 rc = regmap_update_bits(wled->regmap, in wled4_setup()
966 if (rc < 0) in wled4_setup()
967 return rc; in wled4_setup()
969 rc = regmap_update_bits(wled->regmap, in wled4_setup()
973 if (rc < 0) in wled4_setup()
974 return rc; in wled4_setup()
976 rc = regmap_update_bits(wled->regmap, in wled4_setup()
980 if (rc < 0) in wled4_setup()
981 return rc; in wled4_setup()
985 rc = regmap_write(wled->regmap, wled->ctrl_addr + in wled4_setup()
988 if (rc < 0) in wled4_setup()
989 return rc; in wled4_setup()
991 rc = regmap_write(wled->regmap, in wled4_setup()
994 if (rc < 0) in wled4_setup()
995 return rc; in wled4_setup()
998 rc = regmap_read(wled->regmap, wled->sink_addr + in wled4_setup()
1000 if (rc < 0) in wled4_setup()
1001 return rc; in wled4_setup()
1010 rc = wled_auto_detection_at_init(wled); in wled4_setup()
1011 return rc; in wled4_setup()
1014 rc = regmap_update_bits(wled->regmap, in wled4_setup()
1017 if (rc < 0) in wled4_setup()
1018 return rc; in wled4_setup()
1020 rc = regmap_update_bits(wled->regmap, wled->ctrl_addr + in wled4_setup()
1023 if (rc < 0) in wled4_setup()
1024 return rc; in wled4_setup()
1032 rc = regmap_update_bits(wled->regmap, addr, in wled4_setup()
1035 if (rc < 0) in wled4_setup()
1036 return rc; in wled4_setup()
1040 rc = regmap_update_bits(wled->regmap, addr, in wled4_setup()
1043 if (rc < 0) in wled4_setup()
1044 return rc; in wled4_setup()
1047 rc = wled4_cabc_config(wled, wled->cfg.cabc); in wled4_setup()
1048 if (rc < 0) in wled4_setup()
1049 return rc; in wled4_setup()
1051 rc = regmap_update_bits(wled->regmap, wled->ctrl_addr + in wled4_setup()
1055 if (rc < 0) in wled4_setup()
1056 return rc; in wled4_setup()
1058 rc = regmap_update_bits(wled->regmap, in wled4_setup()
1061 if (rc < 0) in wled4_setup()
1062 return rc; in wled4_setup()
1064 rc = wled->wled_sync_toggle(wled); in wled4_setup()
1065 if (rc < 0) { in wled4_setup()
1066 dev_err(wled->dev, "Failed to toggle sync reg rc:%d\n", rc); in wled4_setup()
1067 return rc; in wled4_setup()
1070 rc = wled_auto_detection_at_init(wled); in wled4_setup()
1072 return rc; in wled4_setup()
1088 int rc, temp, i, j, offset; in wled5_setup() local
1093 rc = regmap_update_bits(wled->regmap, in wled5_setup()
1096 if (rc < 0) in wled5_setup()
1097 return rc; in wled5_setup()
1099 rc = regmap_update_bits(wled->regmap, in wled5_setup()
1103 if (rc < 0) in wled5_setup()
1104 return rc; in wled5_setup()
1106 rc = regmap_update_bits(wled->regmap, in wled5_setup()
1110 if (rc < 0) in wled5_setup()
1111 return rc; in wled5_setup()
1118 rc = regmap_update_bits(wled->regmap, addr, in wled5_setup()
1121 if (rc < 0) in wled5_setup()
1122 return rc; in wled5_setup()
1125 rc = regmap_update_bits(wled->regmap, addr, in wled5_setup()
1135 rc = wled5_cabc_config(wled, wled->cfg.cabc_sel ? true : false); in wled5_setup()
1136 if (rc < 0) in wled5_setup()
1137 return rc; in wled5_setup()
1142 rc = regmap_update_bits(wled->regmap, addr, in wled5_setup()
1144 if (rc < 0) in wled5_setup()
1145 return rc; in wled5_setup()
1149 rc = regmap_update_bits(wled->regmap, addr, in wled5_setup()
1151 if (rc < 0) in wled5_setup()
1152 return rc; in wled5_setup()
1162 rc = regmap_write(wled->regmap, addr, val); in wled5_setup()
1163 if (rc < 0) in wled5_setup()
1164 return rc; in wled5_setup()
1166 rc = regmap_update_bits(wled->regmap, in wled5_setup()
1169 if (rc < 0) in wled5_setup()
1170 return rc; in wled5_setup()
1173 rc = wled->wled_sync_toggle(wled); in wled5_setup()
1174 if (rc < 0) { in wled5_setup()
1175 pr_err("Failed to toggle sync reg rc:%d\n", rc); in wled5_setup()
1176 return rc; in wled5_setup()
1179 rc = wled_auto_detection_at_init(wled); in wled5_setup()
1180 if (rc < 0) in wled5_setup()
1181 return rc; in wled5_setup()
1309 int rc, i, j, string_len; in wled_configure() local
1406 rc = of_property_read_string(dev->of_node, "label", &wled->name); in wled_configure()
1407 if (rc) in wled_configure()
1467 rc = of_property_read_u32(dev->of_node, u32_opts[i].name, &val); in wled_configure()
1468 if (rc == -EINVAL) { in wled_configure()
1470 } else if (rc) { in wled_configure()
1472 return rc; in wled_configure()
1507 rc = of_property_read_u32_array(dev->of_node, in wled_configure()
1511 if (rc) { in wled_configure()
1513 string_len, rc); in wled_configure()
1514 return rc; in wled_configure()
1529 rc = of_property_read_u32(dev->of_node, "qcom,num-strings", &val); in wled_configure()
1530 if (!rc) { in wled_configure()
1555 int rc; in wled_configure_short_irq() local
1560 rc = regmap_update_bits(wled->regmap, wled->ctrl_addr + in wled_configure_short_irq()
1564 if (rc < 0) in wled_configure_short_irq()
1565 return rc; in wled_configure_short_irq()
1573 rc = devm_request_threaded_irq(wled->dev, wled->short_irq, in wled_configure_short_irq()
1577 if (rc < 0) in wled_configure_short_irq()
1579 rc); in wled_configure_short_irq()
1581 return rc; in wled_configure_short_irq()
1587 int rc; in wled_configure_ovp_irq() local
1596 rc = devm_request_threaded_irq(wled->dev, wled->ovp_irq, NULL, in wled_configure_ovp_irq()
1599 if (rc < 0) { in wled_configure_ovp_irq()
1601 rc); in wled_configure_ovp_irq()
1606 rc = regmap_read(wled->regmap, wled->ctrl_addr + in wled_configure_ovp_irq()
1608 if (rc < 0) in wled_configure_ovp_irq()
1609 return rc; in wled_configure_ovp_irq()
1629 int rc; in wled_probe() local
1651 rc = wled_configure(wled); in wled_probe()
1652 if (rc) in wled_probe()
1653 return rc; in wled_probe()
1662 rc = wled3_setup(wled); in wled_probe()
1663 if (rc) { in wled_probe()
1665 return rc; in wled_probe()
1671 rc = wled4_setup(wled); in wled_probe()
1672 if (rc) { in wled_probe()
1674 return rc; in wled_probe()
1683 rc = wled5_setup(wled); in wled_probe()
1684 if (rc) { in wled_probe()
1686 return rc; in wled_probe()
1697 rc = wled_configure_short_irq(wled, pdev); in wled_probe()
1698 if (rc < 0) in wled_probe()
1699 return rc; in wled_probe()
1701 rc = wled_configure_ovp_irq(wled, pdev); in wled_probe()
1702 if (rc < 0) in wled_probe()
1703 return rc; in wled_probe()