Lines Matching refs:rval

159 	int rval;  in as3645a_write()  local
161 rval = i2c_smbus_write_byte_data(client, addr, val); in as3645a_write()
164 rval < 0 ? "fail" : "ok"); in as3645a_write()
166 return rval; in as3645a_write()
173 int rval; in as3645a_read() local
175 rval = i2c_smbus_read_byte_data(client, addr); in as3645a_read()
177 dev_dbg(&client->dev, "Read Addr:%02X Val:%02X %s\n", addr, rval, in as3645a_read()
178 rval < 0 ? "fail" : "ok"); in as3645a_read()
180 return rval; in as3645a_read()
254 int rval; in as3645a_get_fault() local
257 rval = as3645a_read(flash, AS_FAULT_INFO_REG); in as3645a_get_fault()
258 if (rval < 0) in as3645a_get_fault()
259 return rval; in as3645a_get_fault()
261 if (rval & AS_FAULT_INFO_INDUCTOR_PEAK_LIMIT) in as3645a_get_fault()
264 if (rval & AS_FAULT_INFO_INDICATOR_LED) in as3645a_get_fault()
268 rval & AS_FAULT_INFO_LED_AMOUNT ? 2 : 1); in as3645a_get_fault()
270 if (rval & AS_FAULT_INFO_TIMEOUT) in as3645a_get_fault()
273 if (rval & AS_FAULT_INFO_OVER_TEMPERATURE) in as3645a_get_fault()
276 if (rval & AS_FAULT_INFO_SHORT_CIRCUIT) in as3645a_get_fault()
279 if (rval & AS_FAULT_INFO_OVER_VOLTAGE) in as3645a_get_fault()
282 return rval; in as3645a_get_fault()
315 int rval; in as3645a_set_indicator_brightness() local
319 rval = as3645a_set_timeout(flash); in as3645a_set_indicator_brightness()
320 if (rval) in as3645a_set_indicator_brightness()
321 return rval; in as3645a_set_indicator_brightness()
331 int rval; in as3645a_set_assist_brightness() local
337 rval = as3645a_set_current(flash); in as3645a_set_assist_brightness()
338 if (rval) in as3645a_set_assist_brightness()
339 return rval; in as3645a_set_assist_brightness()
384 int rval; in as3645a_setup() local
387 rval = as3645a_read(flash, AS_FAULT_INFO_REG); in as3645a_setup()
388 if (rval < 0) in as3645a_setup()
389 return rval; in as3645a_setup()
391 dev_dbg(dev, "Fault info: %02x\n", rval); in as3645a_setup()
393 rval = as3645a_set_current(flash); in as3645a_setup()
394 if (rval < 0) in as3645a_setup()
395 return rval; in as3645a_setup()
397 rval = as3645a_set_timeout(flash); in as3645a_setup()
398 if (rval < 0) in as3645a_setup()
399 return rval; in as3645a_setup()
401 rval = as3645a_set_control(flash, AS_MODE_INDICATOR, false); in as3645a_setup()
402 if (rval < 0) in as3645a_setup()
403 return rval; in as3645a_setup()
406 rval = as3645a_get_fault(&flash->fled, &fault); in as3645a_setup()
407 if (rval < 0) in as3645a_setup()
408 return rval; in as3645a_setup()
417 return rval & ~AS_FAULT_INFO_LED_AMOUNT ? -EIO : 0; in as3645a_setup()
423 int rval, man, model, rfu, version; in as3645a_detect() local
426 rval = as3645a_read(flash, AS_DESIGN_INFO_REG); in as3645a_detect()
427 if (rval < 0) { in as3645a_detect()
429 return rval; in as3645a_detect()
432 man = AS_DESIGN_INFO_FACTORY(rval); in as3645a_detect()
433 model = AS_DESIGN_INFO_MODEL(rval); in as3645a_detect()
435 rval = as3645a_read(flash, AS_VERSION_CONTROL_REG); in as3645a_detect()
436 if (rval < 0) { in as3645a_detect()
438 return rval; in as3645a_detect()
441 rfu = AS_VERSION_CONTROL_RFU(rval); in as3645a_detect()
442 version = AS_VERSION_CONTROL_VERSION(rval); in as3645a_detect()
474 rval = as3645a_write(flash, AS_PASSWORD_REG, AS_PASSWORD_UNLOCK_VALUE); in as3645a_detect()
475 if (rval < 0) in as3645a_detect()
476 return rval; in as3645a_detect()
484 int rval; in as3645a_parse_node() local
512 rval = fwnode_property_read_u32(flash->flash_node, "flash-timeout-us", in as3645a_parse_node()
514 if (rval < 0) { in as3645a_parse_node()
520 rval = fwnode_property_read_u32(flash->flash_node, "flash-max-microamp", in as3645a_parse_node()
522 if (rval < 0) { in as3645a_parse_node()
528 rval = fwnode_property_read_u32(flash->flash_node, "led-max-microamp", in as3645a_parse_node()
530 if (rval < 0) { in as3645a_parse_node()
546 rval = -ENODEV; in as3645a_parse_node()
551 rval = fwnode_property_read_u32(flash->indicator_node, in as3645a_parse_node()
554 if (rval < 0) { in as3645a_parse_node()
566 return rval; in as3645a_parse_node()
575 int rval; in as3645a_led_class_setup() local
586 rval = led_classdev_register_ext(&flash->client->dev, iled_cdev, in as3645a_led_class_setup()
588 if (rval < 0) in as3645a_led_class_setup()
589 return rval; in as3645a_led_class_setup()
616 rval = led_classdev_flash_register_ext(&flash->client->dev, in as3645a_led_class_setup()
618 if (rval) in as3645a_led_class_setup()
621 return rval; in as3645a_led_class_setup()
627 rval); in as3645a_led_class_setup()
628 return rval; in as3645a_led_class_setup()
676 int rval; in as3645a_probe() local
687 rval = as3645a_parse_node(&client->dev, flash); in as3645a_probe()
688 if (rval < 0) in as3645a_probe()
689 return rval; in as3645a_probe()
691 rval = as3645a_detect(flash); in as3645a_probe()
692 if (rval < 0) in as3645a_probe()
698 rval = as3645a_setup(flash); in as3645a_probe()
699 if (rval) in as3645a_probe()
702 rval = as3645a_led_class_setup(flash); in as3645a_probe()
703 if (rval) in as3645a_probe()
706 rval = as3645a_v4l2_setup(flash); in as3645a_probe()
707 if (rval) in as3645a_probe()
722 return rval; in as3645a_probe()