| /rk3399_rockchip-uboot/drivers/power/pmic/ |
| H A D | pmic_rk801.c | 67 int ret; in rk801_write() local 69 ret = dm_i2c_write(dev, reg, buff, len); in rk801_write() 70 if (ret) { in rk801_write() 71 printf("rk801: write reg 0x%02x failed, ret=%d\n", reg, ret); in rk801_write() 72 return ret; in rk801_write() 80 int ret; in rk801_read() local 82 ret = dm_i2c_read(dev, reg, buff, len); in rk801_read() 83 if (ret) { in rk801_read() 84 printf("rk801: read reg 0x%02x failed, ret=%d\n", reg, ret); in rk801_read() 85 return ret; in rk801_read() [all …]
|
| H A D | pmic_fp9931.c | 38 int ret; in fp9931_write() local 40 ret = dm_i2c_write(dev, reg, buff, len); in fp9931_write() 41 if (ret) { in fp9931_write() 42 pr_err("fp9931 failed to write register: %#x, ret:%d\n", reg, ret); in fp9931_write() 43 return ret; in fp9931_write() 51 int ret; in fp9931_read() local 53 ret = dm_i2c_read(dev, reg, buff, len); in fp9931_read() 54 if (ret) { in fp9931_read() 55 pr_err("fp9931 failed to write register: %#x, ret:%d\n", reg, ret); in fp9931_read() 56 return ret; in fp9931_read() [all …]
|
| H A D | rk8xx.c | 270 int ret; in rk8xx_write() local 272 ret = dm_i2c_write(dev, reg, buff, len); in rk8xx_write() 273 if (ret) { in rk8xx_write() 274 printf("%s: write reg 0x%02x failed, ret=%d\n", __func__, reg, ret); in rk8xx_write() 275 return ret; in rk8xx_write() 283 int ret; in rk8xx_read() local 285 ret = dm_i2c_read(dev, reg, buff, len); in rk8xx_read() 286 if (ret) { in rk8xx_read() 287 printf("%s: read reg 0x%02x failed, ret=%d\n", __func__, reg, ret); in rk8xx_read() 288 return ret; in rk8xx_read() [all …]
|
| /rk3399_rockchip-uboot/board/Marvell/mvebu_armada-8k/ |
| H A D | board.c | 50 int ret; in board_xhci_config() local 55 ret = i2c_get_chip_for_busnum(0, I2C_IO_EXP_ADDR, 1, &dev); in board_xhci_config() 56 if (ret) { in board_xhci_config() 57 printf("Cannot find PCA9555: %d\n", ret); in board_xhci_config() 65 ret = dm_i2c_read(dev, I2C_IO_CFG_REG_0, buf, 1); in board_xhci_config() 66 if (ret) { in board_xhci_config() 72 ret = dm_i2c_write(dev, I2C_IO_CFG_REG_0, buf, 1); in board_xhci_config() 73 if (ret) { in board_xhci_config() 79 ret = dm_i2c_read(dev, I2C_IO_DATA_OUT_REG_0, buf, 1); in board_xhci_config() 80 if (ret) { in board_xhci_config() [all …]
|
| /rk3399_rockchip-uboot/post/lib_powerpc/ |
| H A D | b.c | 36 int ret = 0; in cpu_post_test_bc() local 58 if (ret == 0) in cpu_post_test_bc() 59 ret = pjump == jump ? 0 : -1; in cpu_post_test_bc() 60 if (ret == 0) in cpu_post_test_bc() 63 ret = pctr == ctr + 1 ? 0 : -1; in cpu_post_test_bc() 65 ret = pctr == ctr ? 0 : -1; in cpu_post_test_bc() 67 if (ret == 0) in cpu_post_test_bc() 70 ret = lr == (ulong) code + 24 ? 0 : -1; in cpu_post_test_bc() 72 ret = lr == 0 ? 0 : -1; in cpu_post_test_bc() 75 return ret; in cpu_post_test_bc() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/host/ |
| H A D | ohci-generic.c | 32 int ret; in ohci_setup_phy() local 34 ret = generic_phy_get_by_index(dev, index, &priv->phy); in ohci_setup_phy() 35 if (ret) { in ohci_setup_phy() 36 if (ret != -ENOENT) { in ohci_setup_phy() 38 return ret; in ohci_setup_phy() 41 ret = generic_phy_init(&priv->phy); in ohci_setup_phy() 42 if (ret) { in ohci_setup_phy() 44 return ret; in ohci_setup_phy() 47 ret = generic_phy_power_on(&priv->phy); in ohci_setup_phy() 48 if (ret) { in ohci_setup_phy() [all …]
|
| /rk3399_rockchip-uboot/cmd/ |
| H A D | tftp_update.c | 66 int ret; in tftpfw_version_set() local 68 ret = vendor_storage_write(FIRMWARE_VER_ID, &version, sizeof(version)); in tftpfw_version_set() 70 return ret < 0 ? ret : 0; in tftpfw_version_set() 76 int ret; in tftpfw_version_get() local 78 ret = vendor_storage_read(FIRMWARE_VER_ID, &version, sizeof(version)); in tftpfw_version_get() 79 if (ret < 0) { in tftpfw_version_get() 80 if (ret == -EINVAL) { in tftpfw_version_get() 83 ret = tftpfw_version_set(version); in tftpfw_version_get() 84 if (ret < 0) in tftpfw_version_get() 85 return ret; in tftpfw_version_get() [all …]
|
| H A D | led.c | 39 int ret; in show_led_state() local 41 ret = led_get_state(dev); in show_led_state() 42 if (ret >= LEDST_COUNT) in show_led_state() 43 ret = -EINVAL; in show_led_state() 44 if (ret >= 0) in show_led_state() 45 printf("%s\n", state_label[ret]); in show_led_state() 47 return ret; in show_led_state() 53 int ret; in list_leds() local 64 ret = show_led_state(dev); in list_leds() 65 if (ret < 0) in list_leds() [all …]
|
| /rk3399_rockchip-uboot/lib/rsa/ |
| H A D | rsa-sign.c | 64 int ret; in rsa_pem_get_pub_key() local 79 ret = -EINVAL; in rsa_pem_get_pub_key() 87 ret = -EINVAL; in rsa_pem_get_pub_key() 95 ret = -EINVAL; in rsa_pem_get_pub_key() 111 return ret; in rsa_pem_get_pub_key() 130 int ret; in rsa_engine_get_pub_key() local 158 ret = -EINVAL; in rsa_engine_get_pub_key() 169 return ret; in rsa_engine_get_pub_key() 241 int ret; in rsa_engine_get_priv_key() local 269 ret = -EINVAL; in rsa_engine_get_priv_key() [all …]
|
| /rk3399_rockchip-uboot/drivers/core/ |
| H A D | device-remove.c | 33 int ret, saved_ret = 0; in device_chld_unbind() local 38 ret = device_unbind(pos); in device_chld_unbind() 39 if (ret && !saved_ret) in device_chld_unbind() 40 saved_ret = ret; in device_chld_unbind() 55 int ret; in device_chld_remove() local 60 ret = device_remove(pos, flags); in device_chld_remove() 61 if (ret) in device_chld_remove() 62 return ret; in device_chld_remove() 71 int ret; in device_unbind() local 86 ret = drv->unbind(dev); in device_unbind() [all …]
|
| H A D | root.c | 155 int ret; in dm_init() local 169 ret = device_bind_by_name(NULL, false, &root_info, &DM_ROOT_NON_CONST); in dm_init() 170 if (ret) in dm_init() 171 return ret; in dm_init() 180 ret = device_probe(DM_ROOT_NON_CONST); in dm_init() 181 if (ret) in dm_init() 182 return ret; in dm_init() 206 int ret; in dm_scan_platdata() local 208 ret = lists_bind_drivers(DM_ROOT_NON_CONST, pre_reloc_only); in dm_scan_platdata() 209 if (ret == -ENOENT) { in dm_scan_platdata() [all …]
|
| /rk3399_rockchip-uboot/drivers/i2c/muxes/ |
| H A D | max96745.c | 63 int ret; in max96745_power_on() local 76 ret = dm_i2c_reg_write(priv->dev, 0x0070, 0x16); in max96745_power_on() 77 if (ret < 0) in max96745_power_on() 78 return ret; in max96745_power_on() 81 ret = dm_i2c_reg_clrset(priv->dev, 0x0076, DIS_REM_CC, in max96745_power_on() 83 if (ret < 0) in max96745_power_on() 84 return ret; in max96745_power_on() 86 ret = dm_i2c_reg_clrset(priv->dev, 0x0086, DIS_REM_CC, in max96745_power_on() 88 if (ret < 0) in max96745_power_on() 89 return ret; in max96745_power_on() [all …]
|
| /rk3399_rockchip-uboot/drivers/power/regulator/ |
| H A D | fp9931_regulator.c | 31 int ret; in fp9931_vcom_set_enable() local 34 ret = pmic_clrsetbits(pmic, FP9931_CONTROL_REG1, 0, CONTROL_REG1_V3P3_EN); in fp9931_vcom_set_enable() 35 if (ret) in fp9931_vcom_set_enable() 36 return ret; in fp9931_vcom_set_enable() 40 ret = dm_gpio_set_value(&data->enable_gpio, enable); in fp9931_vcom_set_enable() 46 return ret; in fp9931_vcom_set_enable() 54 int ret; in fp9931_vcom_set_value() local 64 ret = pmic_reg_write(pmic, FP9931_VCOM_SETTING, val); in fp9931_vcom_set_value() 66 return ret; in fp9931_vcom_set_value() 73 int ret; in fp9931_regulator_get_enable() local [all …]
|
| H A D | as3722_regulator.c | 31 int ret; in stepdown_set_enable() local 33 ret = pmic_clrsetbits(pmic, AS3722_SD_CONTROL, 0, 1 << sd); in stepdown_set_enable() 34 if (ret < 0) { in stepdown_set_enable() 36 ret); in stepdown_set_enable() 37 return ret; in stepdown_set_enable() 47 int ret; in stepdown_get_enable() local 49 ret = pmic_reg_read(pmic, AS3722_SD_CONTROL); in stepdown_get_enable() 50 if (ret < 0) { in stepdown_get_enable() 52 ret); in stepdown_get_enable() 53 return ret; in stepdown_get_enable() [all …]
|
| /rk3399_rockchip-uboot/arch/sandbox/cpu/ |
| H A D | state.c | 21 int ret; in state_ensure_space() local 34 ret = fdt_open_into(blob, buf, size); in state_ensure_space() 35 if (ret) { in state_ensure_space() 48 int ret; in state_read_file() local 51 ret = os_get_filesize(fname, &size); in state_read_file() 52 if (ret < 0) { in state_read_file() 64 ret = -EPERM; in state_read_file() 69 ret = -EIO; in state_read_file() 81 return ret; in state_read_file() 103 int ret; in sandbox_read_state_nodes() local [all …]
|
| /rk3399_rockchip-uboot/drivers/pinctrl/rockchip/ |
| H A D | pinctrl-rv1103b.c | 19 int reg, ret, mask; in rv1103b_set_mux() local 42 ret = regmap_write(regmap, reg, data); in rv1103b_set_mux() 44 return ret; in rv1103b_set_mux() 61 int ret = 0; in rv1103b_calc_drv_reg_and_bit() local 71 ret = -EINVAL; in rv1103b_calc_drv_reg_and_bit() 82 ret = -EINVAL; in rv1103b_calc_drv_reg_and_bit() 89 ret = -EINVAL; in rv1103b_calc_drv_reg_and_bit() 99 ret = -EINVAL; in rv1103b_calc_drv_reg_and_bit() 103 if (ret) { in rv1103b_calc_drv_reg_and_bit() 106 return ret; in rv1103b_calc_drv_reg_and_bit() [all …]
|
| /rk3399_rockchip-uboot/drivers/power/power_delivery/ |
| H A D | tcpci.c | 55 int ret = 0; in tcpci_read16() local 58 ret = dm_i2c_read(tcpci->dev, reg, buffer, 2); in tcpci_read16() 59 if (ret) { in tcpci_read16() 61 __func__, reg, ret); in tcpci_read16() 62 return ret; in tcpci_read16() 67 return ret; in tcpci_read16() 73 int ret = 0; in tcpci_block_read() local 75 ret = dm_i2c_read(tcpci->dev, reg, data, length); in tcpci_block_read() 76 if (ret) in tcpci_block_read() 78 __func__, reg, length, ret); in tcpci_block_read() [all …]
|
| /rk3399_rockchip-uboot/board/nvidia/p2771-0000/ |
| H A D | p2771-0000.c | 15 int ret; in tegra_board_init() local 19 ret = i2c_get_chip_for_busnum(0, MAX77620_I2C_ADDR_7BIT, 1, &dev); in tegra_board_init() 20 if (ret) { in tegra_board_init() 22 return ret; in tegra_board_init() 26 ret = dm_i2c_write(dev, MAX77620_CNFG1_L3_REG, &val, 1); in tegra_board_init() 27 if (ret) { in tegra_board_init() 28 printf("i2c_write 0 0x3c 0x27 failed: %d\n", ret); in tegra_board_init() 29 return ret; in tegra_board_init() 39 int ret; in tegra_pcie_board_init() local 43 ret = i2c_get_chip_for_busnum(0, MAX77620_I2C_ADDR_7BIT, 1, &dev); in tegra_pcie_board_init() [all …]
|
| /rk3399_rockchip-uboot/drivers/spi/ |
| H A D | spi-uclass.c | 24 int ret; in spi_set_speed_mode() local 28 ret = ops->set_speed(bus, speed); in spi_set_speed_mode() 30 ret = -EINVAL; in spi_set_speed_mode() 31 if (ret) { in spi_set_speed_mode() 32 printf("Cannot set speed (err=%d)\n", ret); in spi_set_speed_mode() 33 return ret; in spi_set_speed_mode() 37 ret = ops->set_mode(bus, mode); in spi_set_speed_mode() 39 ret = -EINVAL; in spi_set_speed_mode() 40 if (ret) { in spi_set_speed_mode() 41 printf("Cannot set mode (err=%d)\n", ret); in spi_set_speed_mode() [all …]
|
| /rk3399_rockchip-uboot/drivers/i2c/ |
| H A D | i2c-uniphier-f.c | 76 int ret; in reset_bus() local 80 ret = readl_poll_timeout(®s->rst, val, !(val & I2C_RST_RST), 1); in reset_bus() 81 if (ret < 0) in reset_bus() 84 return ret; in reset_bus() 90 int ret; in check_device_busy() local 92 ret = readl_poll_timeout(®s->sr, val, !(val & I2C_SR_DB), 100); in check_device_busy() 93 if (ret < 0) { in check_device_busy() 95 ret = reset_bus(regs); in check_device_busy() 98 return ret; in check_device_busy() 105 int ret; in uniphier_fi2c_probe() local [all …]
|
| /rk3399_rockchip-uboot/drivers/net/ |
| H A D | dwc_eth_qos.c | 402 int ret; in eqos_mdio_read() local 407 ret = eqos_mdio_wait_idle(eqos); in eqos_mdio_read() 408 if (ret) { in eqos_mdio_read() 410 return ret; in eqos_mdio_read() 427 ret = eqos_mdio_wait_idle(eqos); in eqos_mdio_read() 428 if (ret) { in eqos_mdio_read() 430 return ret; in eqos_mdio_read() 446 int ret; in eqos_mdio_write() local 451 ret = eqos_mdio_wait_idle(eqos); in eqos_mdio_write() 452 if (ret) { in eqos_mdio_write() [all …]
|
| /rk3399_rockchip-uboot/drivers/power/mfd/ |
| H A D | fg_max77693.c | 20 u8 ret; in max77693_get_vcell() local 22 ret = i2c_read(MAX77693_FUEL_I2C_ADDR, MAX77693_VCELL, 1, in max77693_get_vcell() 24 if (ret) in max77693_get_vcell() 25 return ret; in max77693_get_vcell() 36 u8 ret; in max77693_get_soc() local 38 ret = i2c_read(MAX77693_FUEL_I2C_ADDR, MAX77693_VFSOC, 1, in max77693_get_soc() 40 if (ret) in max77693_get_soc() 41 return ret; in max77693_get_soc() 51 int ret; in power_update_battery() local 58 ret = max77693_get_soc(&pb->bat->state_of_chrg); in power_update_battery() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/cdns3/ |
| H A D | core.c | 48 int ret; in cdns3_role_start() local 64 ret = cdns->roles[role]->start(cdns); in cdns3_role_start() 65 if (!ret) in cdns3_role_start() 69 return ret; in cdns3_role_start() 107 int ret = 0; in cdns3_core_init_role() local 133 ret = cdns3_idle_init(cdns); in cdns3_core_init_role() 134 if (ret) in cdns3_core_init_role() 135 return ret; in cdns3_core_init_role() 150 ret = cdns3_host_init(cdns); in cdns3_core_init_role() 151 if (ret) { in cdns3_core_init_role() [all …]
|
| /rk3399_rockchip-uboot/common/spl/ |
| H A D | spl_rkfw.c | 46 int ret; in open_image() local 48 ret = file2comp_id(image_name, &comp_id); in open_image() 49 if (ret) { in open_image() 51 return ret; in open_image() 109 int i, ret; in load_image() local 140 ret = info->read(info, image_sector + sect_off, in load_image() 142 if (ret != sect_cnt) { in load_image() 144 image_name, (ulong)image_sector + sect_off, ret); in load_image() 149 ret = check_image(hdr); in load_image() 150 if (ret) { in load_image() [all …]
|
| /rk3399_rockchip-uboot/lib/optee_clientApi/ |
| H A D | OpteeClientRkNewFs_v1.c | 143 unsigned long ret; in rkss_begin_commit() local 161 ret = blk_dwrite(dev_desc, part_info.start + RKSS_BACKUP_INDEX, 1, data); in rkss_begin_commit() 163 if (ret != 1) { in rkss_begin_commit() 173 unsigned long ret; in rkss_finish_commit() local 186 ret = blk_dwrite(dev_desc, part_info.start + RKSS_BACKUP_INDEX, 1, data); in rkss_finish_commit() 188 if (ret != 1) { in rkss_finish_commit() 201 unsigned long ret; in rkss_backup_sections() local 211 ret = blk_dread(dev_desc, part_info.start + RKSS_BACKUP_INDEX, 1, data); in rkss_backup_sections() 212 if (ret != 1) { in rkss_backup_sections() 250 ret = blk_dread(dev_desc, part_info.start + index, num, backup_data); in rkss_backup_sections() [all …]
|