/linux/drivers/leds/flash/ |
H A D | leds-as3645a.c | 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 [all …]
|
/linux/drivers/media/i2c/ |
H A D | lm3560.c | 70 int rval = -EINVAL; in lm3560_mode_ctrl() local 74 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 78 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 82 rval = regmap_update_bits(flash->regmap, in lm3560_mode_ctrl() 86 return rval; in lm3560_mode_ctrl() 93 int rval; in lm3560_enable_ctrl() local 97 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() 100 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() 104 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() 107 rval = regmap_update_bits(flash->regmap, in lm3560_enable_ctrl() [all …]
|
H A D | lm3646.c | 103 int rval; in lm3646_get_ctrl() local 108 rval = regmap_read(flash->regmap, REG_FLAG, ®_val); in lm3646_get_ctrl() 109 if (rval < 0) in lm3646_get_ctrl() 110 return rval; in lm3646_get_ctrl() 137 int rval; in lm3646_set_ctrl() local 155 rval = regmap_read(flash->regmap, REG_ENABLE, ®_val); in lm3646_set_ctrl() 156 if (rval < 0 || ((reg_val & MASK_ENABLE) != MODE_SHDN)) in lm3646_set_ctrl() 157 return rval; in lm3646_set_ctrl() 168 rval = regmap_read(flash->regmap, REG_ENABLE, ®_val); in lm3646_set_ctrl() 169 if (rval < 0) in lm3646_set_ctrl() [all …]
|
H A D | adp1653.c | 43 int rval; in adp1653_update_hw() local 66 rval = i2c_smbus_write_byte_data(client, ADP1653_REG_OUT_SEL, out_sel); in adp1653_update_hw() 67 if (rval < 0) in adp1653_update_hw() 68 return rval; in adp1653_update_hw() 70 rval = i2c_smbus_write_byte_data(client, ADP1653_REG_CONFIG, config); in adp1653_update_hw() 71 if (rval < 0) in adp1653_update_hw() 72 return rval; in adp1653_update_hw() 81 int rval; in adp1653_get_fault() local 93 rval = i2c_smbus_write_byte_data(client, ADP1653_REG_OUT_SEL, 0); in adp1653_get_fault() 94 if (rval < 0) in adp1653_get_fault() [all …]
|
/linux/drivers/video/backlight/ |
H A D | lm3630a_bl.c | 61 int rval; in lm3630a_read() local 64 rval = regmap_read(pchip->regmap, reg, ®_val); in lm3630a_read() 65 if (rval < 0) in lm3630a_read() 66 return rval; in lm3630a_read() 86 int rval; in lm3630a_chip_init() local 91 rval = lm3630a_write(pchip, REG_FILTER_STRENGTH, 0x03); in lm3630a_chip_init() 93 rval |= lm3630a_update(pchip, REG_CONFIG, 0x07, pdata->pwm_ctrl); in lm3630a_chip_init() 95 rval |= lm3630a_write(pchip, REG_BOOST, 0x38); in lm3630a_chip_init() 97 rval |= lm3630a_update(pchip, REG_I_A, 0x1F, 0x1F); in lm3630a_chip_init() 99 rval |= lm3630a_write(pchip, REG_I_B, 0x1F); in lm3630a_chip_init() [all …]
|
/linux/drivers/media/i2c/ccs/ |
H A D | ccs-core.c | 377 int rval; in ccs_pll_configure() local 379 rval = ccs_write(sensor, VT_PIX_CLK_DIV, pll->vt_bk.pix_clk_div); in ccs_pll_configure() 380 if (rval < 0) in ccs_pll_configure() 381 return rval; in ccs_pll_configure() 383 rval = ccs_write(sensor, VT_SYS_CLK_DIV, pll->vt_bk.sys_clk_div); in ccs_pll_configure() 384 if (rval < 0) in ccs_pll_configure() 385 return rval; in ccs_pll_configure() 387 rval = ccs_write(sensor, PRE_PLL_CLK_DIV, pll->vt_fr.pre_pll_clk_div); in ccs_pll_configure() 388 if (rval < 0) in ccs_pll_configure() 389 return rval; in ccs_pll_configure() [all …]
|
H A D | ccs-data.c | 180 int rval; in ccs_data_block_parse_header() local 185 rval = ccs_data_parse_length_specifier(&block->length, &hlen, &plen, in ccs_data_block_parse_header() 187 if (rval < 0) in ccs_data_block_parse_header() 188 return rval; in ccs_data_block_parse_header() 327 int rval; in ccs_data_parse_reg_rules() local 332 rval = ccs_data_parse_regs(bin, NULL, __num_regs, payload, endp, dev); in ccs_data_parse_reg_rules() 333 if (rval) in ccs_data_parse_reg_rules() 334 return rval; in ccs_data_parse_reg_rules() 438 int rval; in ccs_data_parse_rules() local 453 rval = ccs_data_parse_length_specifier(__next_rule, &rule_hlen, in ccs_data_parse_rules() [all …]
|
H A D | ccs-reg-access.c | 101 int rval; in __ccs_read_addr() local 103 rval = cci_read(sensor->regmap, reg, &__val, NULL); in __ccs_read_addr() 104 if (rval < 0) in __ccs_read_addr() 105 return rval; in __ccs_read_addr() 166 int rval; in ccs_read_addr_raw() local 169 rval = ccs_static_data_read_ro_reg(sensor, reg, val); in ccs_read_addr_raw() 170 if (!rval) in ccs_read_addr_raw() 176 rval = ccs_call_quirk(sensor, reg_access, false, ®, val); in ccs_read_addr_raw() 177 if (rval == -ENOIOCTLCMD) in ccs_read_addr_raw() 179 if (rval < 0) in ccs_read_addr_raw() [all …]
|
H A D | ccs-quirk.c | 21 int rval; in ccs_write_addr_8s() local 24 rval = ccs_write_addr(sensor, regs->reg, regs->val); in ccs_write_addr_8s() 25 if (rval < 0) { in ccs_write_addr_8s() 28 rval, regs->reg, regs->val); in ccs_write_addr_8s() 29 return rval; in ccs_write_addr_8s() 123 int rval; in jt8ev1_post_poweron() local 151 rval = ccs_write_addr_8s(sensor, regs, ARRAY_SIZE(regs)); in jt8ev1_post_poweron() 152 if (rval < 0) in jt8ev1_post_poweron() 153 return rval; in jt8ev1_post_poweron() 173 int rval; in jt8ev1_post_streamoff() local [all …]
|
/linux/drivers/media/radio/si4713/ |
H A D | si4713.c | 160 int rval = -EINVAL; in usecs_to_dev() local 164 rval = array[i * 2]; in usecs_to_dev() 168 return rval; in usecs_to_dev() 297 int rval; in si4713_write_property() local 314 rval = si4713_send_command(sdev, SI4713_CMD_SET_PROPERTY, in si4713_write_property() 319 if (rval < 0) in si4713_write_property() 320 return rval; in si4713_write_property() 333 return rval; in si4713_write_property() 467 int rval; in si4713_checkrev() local 470 rval = si4713_send_command(sdev, SI4713_CMD_GET_REV, in si4713_checkrev() [all …]
|
/linux/drivers/scsi/qla2xxx/ |
H A D | qla_mbx.c | 108 int rval, i; in qla2x00_mailbox_command() local 149 rval = QLA_SUCCESS; in qla2x00_mailbox_command() 199 rval = QLA_ABORTED; in qla2x00_mailbox_command() 214 rval = QLA_ABORTED; in qla2x00_mailbox_command() 292 rval = QLA_ABORTED; in qla2x00_mailbox_command() 303 rval = QLA_ABORTED; in qla2x00_mailbox_command() 324 rval = QLA_FUNCTION_TIMEOUT; in qla2x00_mailbox_command() 345 rval = QLA_ABORTED; in qla2x00_mailbox_command() 385 rval = QLA_FUNCTION_FAILED; in qla2x00_mailbox_command() 395 rval = QLA_FUNCTION_FAILED; in qla2x00_mailbox_command() [all …]
|
H A D | qla_bsg.c | 284 int rval = (DID_ERROR << 16); in qla2x00_process_els() local 291 rval = -ENOMEM; in qla2x00_process_els() 311 rval = -EIO; in qla2x00_process_els() 319 rval = -EPERM; in qla2x00_process_els() 331 rval = -ENOBUFS; in qla2x00_process_els() 344 rval = -EIO; in qla2x00_process_els() 355 rval = -ENOMEM; in qla2x00_process_els() 379 rval = -ENOMEM; in qla2x00_process_els() 388 rval = -ENOMEM; in qla2x00_process_els() 399 rval = -EAGAIN; in qla2x00_process_els() [all …]
|
H A D | qla_gs.c | 123 int rval; in qla2x00_chk_ms_status() local 128 rval = QLA_FUNCTION_FAILED; in qla2x00_chk_ms_status() 154 rval = QLA_INVALID_COMMAND; in qla2x00_chk_ms_status() 156 rval = QLA_SUCCESS; in qla2x00_chk_ms_status() 172 rval = QLA_NOT_LOGGED_IN; in qla2x00_chk_ms_status() 178 rval = QLA_FUNCTION_TIMEOUT; in qla2x00_chk_ms_status() 189 return rval; in qla2x00_chk_ms_status() 202 int rval; in qla2x00_ga_nxt() local 233 rval = qla2x00_issue_iocb(vha, ha->ms_iocb, ha->ms_iocb_dma, in qla2x00_ga_nxt() 235 if (rval != QLA_SUCCESS) { in qla2x00_ga_nxt() [all …]
|
H A D | qla_init.c | 178 int rval = QLA_FUNCTION_FAILED; in qla24xx_async_abort_cmd() local 207 rval = qla2x00_start_sp(sp); in qla24xx_async_abort_cmd() 208 if (rval != QLA_SUCCESS) { in qla24xx_async_abort_cmd() 211 return rval; in qla24xx_async_abort_cmd() 216 rval = abt_iocb->u.abt.comp_status == CS_COMPLETE ? in qla24xx_async_abort_cmd() 222 return rval; in qla24xx_async_abort_cmd() 329 int rval = QLA_FUNCTION_FAILED; in qla2x00_async_login() local 336 return rval; in qla2x00_async_login() 371 rval = qla2x00_start_sp(sp); in qla2x00_async_login() 379 if (rval != QLA_SUCCESS) { in qla2x00_async_login() [all …]
|
/linux/arch/powerpc/include/asm/vdso/ |
H A D | timebase.h | 16 #define mftb() ({unsigned long rval; \ 22 : "=r" (rval) \ 24 rval;}) 26 #define mftb() ({unsigned long rval; \ 27 asm volatile("mftbl %0" : "=r" (rval)); rval;}) 29 #define mftb() ({unsigned long rval; \ 31 "=r" (rval) : "i" (SPRN_TBRL)); rval;}) 35 #define mftbu() ({unsigned long rval; \ 36 asm volatile("mftbu %0" : "=r" (rval)); rval;}) 38 #define mftbu() ({unsigned long rval; \ [all …]
|
/linux/drivers/power/supply/ |
H A D | ip5xxx_power.c | 186 unsigned int rval; in ip5xxx_battery_get_status() local 189 ret = ip5xxx_read(ip5xxx, IP5XXX_READ0, &rval); in ip5xxx_battery_get_status() 193 switch (rval & IP5XXX_READ0_CHG_STAT) { in ip5xxx_battery_get_status() 218 unsigned int rval; in ip5xxx_battery_get_charge_type() local 221 ret = ip5xxx_read(ip5xxx, IP5XXX_READ0, &rval); in ip5xxx_battery_get_charge_type() 225 switch (rval & IP5XXX_READ0_CHG_STAT) { in ip5xxx_battery_get_charge_type() 248 unsigned int rval; in ip5xxx_battery_get_health() local 251 ret = ip5xxx_read(ip5xxx, IP5XXX_READ0, &rval); in ip5xxx_battery_get_health() 255 if (rval & IP5XXX_READ0_TIMEOUT) in ip5xxx_battery_get_health() 265 unsigned int rval; in ip5xxx_battery_get_voltage_max() local [all …]
|
H A D | mp2629_charger.c | 168 unsigned int rval; in mp2629_get_prop() local 170 ret = regmap_field_read(charger->regmap_fields[fld], &rval); in mp2629_get_prop() 174 val->intval = rval * props[fld].step + props[fld].min; in mp2629_get_prop() 183 unsigned int rval; in mp2629_set_prop() local 188 rval = (val->intval - props[fld].min) / props[fld].step; in mp2629_set_prop() 189 return regmap_field_write(charger->regmap_fields[fld], rval); in mp2629_set_prop() 217 unsigned int rval; in mp2629_charger_battery_get_prop() local 269 ret = regmap_read(charger->regmap, MP2629_REG_STATUS, &rval); in mp2629_charger_battery_get_prop() 273 rval = (rval & MP2629_MASK_CHARGE_TYPE) >> 3; in mp2629_charger_battery_get_prop() 274 switch (rval) { in mp2629_charger_battery_get_prop() [all …]
|
/linux/drivers/media/i2c/et8ek8/ |
H A D | et8ek8_driver.c | 227 int rval; in et8ek8_i2c_buffered_write_regs() local 245 rval = i2c_transfer(client->adapter, msg, wcnt); in et8ek8_i2c_buffered_write_regs() 246 if (rval < 0) in et8ek8_i2c_buffered_write_regs() 247 return rval; in et8ek8_i2c_buffered_write_regs() 253 rval = i2c_transfer(client->adapter, msg, wcnt); in et8ek8_i2c_buffered_write_regs() 255 return rval < 0 ? rval : 0; in et8ek8_i2c_buffered_write_regs() 585 int cbh_mode, cbv_mode, tp_mode, din_sw, r1420, rval; in et8ek8_set_test_pattern() local 610 rval = et8ek8_i2c_write_reg(client, ET8EK8_REG_8BIT, 0x111B, in et8ek8_set_test_pattern() 612 if (rval) in et8ek8_set_test_pattern() 613 return rval; in et8ek8_set_test_pattern() [all …]
|
/linux/drivers/rapidio/switches/ |
H A D | idt_gen3.c | 40 u32 rval; in idtg3_route_add_entry() local 65 RIO_SWP_INFO_CAR, &rval); in idtg3_route_add_entry() 69 if (table >= RIO_GET_TOTAL_PORTS(rval)) in idtg3_route_add_entry() 82 u32 rval; in idtg3_route_get_entry() local 89 RIO_SWP_INFO_CAR, &rval); in idtg3_route_get_entry() 99 table = RIO_GET_PORT_NUM(rval); in idtg3_route_get_entry() 100 else if (table >= RIO_GET_TOTAL_PORTS(rval)) in idtg3_route_get_entry() 105 &rval); in idtg3_route_get_entry() 109 if (rval == RIO_RT_ENTRY_DROP_PKT) in idtg3_route_get_entry() 112 *route_port = (u8)rval; in idtg3_route_get_entry() [all …]
|
/linux/drivers/scsi/qla4xxx/ |
H A D | ql4_bsg.c | 22 int rval = -EINVAL; in qla4xxx_read_flash() local 31 rval = -EBUSY; in qla4xxx_read_flash() 38 rval = -EBUSY; in qla4xxx_read_flash() 51 rval = -ENOMEM; in qla4xxx_read_flash() 55 rval = qla4xxx_get_flash(ha, flash_dma, offset, length); in qla4xxx_read_flash() 56 if (rval) { in qla4xxx_read_flash() 59 rval = -EIO; in qla4xxx_read_flash() 73 return rval; in qla4xxx_read_flash() 88 int rval = -EINVAL; in qla4xxx_update_flash() local 97 rval = -EBUSY; in qla4xxx_update_flash() [all …]
|
H A D | ql4_nx.c | 459 int rval = QLA_SUCCESS; in qla4_82xx_md_rd_32() local 473 rval = QLA_ERROR; in qla4_82xx_md_rd_32() 479 return rval; in qla4_82xx_md_rd_32() 485 int rval = QLA_SUCCESS; in qla4_82xx_md_wr_32() local 498 rval = QLA_ERROR; in qla4_82xx_md_wr_32() 504 return rval; in qla4_82xx_md_wr_32() 1277 int i, rval = 0; in qla4_82xx_load_from_flash() local 1293 rval = -1; in qla4_82xx_load_from_flash() 1297 rval = qla4_82xx_pci_mem_write_2M(ha, memaddr, &data, 8); in qla4_82xx_load_from_flash() 1298 if (rval) in qla4_82xx_load_from_flash() [all …]
|
/linux/drivers/base/regmap/ |
H A D | regmap-kunit.c | 238 unsigned int val, rval; in basic_read_write() local 251 KUNIT_EXPECT_EQ(test, 0, regmap_read(map, 0, &rval)); in basic_read_write() 252 KUNIT_EXPECT_EQ(test, val, rval); in basic_read_write() 263 unsigned int val[BLOCK_TEST_SIZE], rval[BLOCK_TEST_SIZE]; in bulk_write() local 282 KUNIT_EXPECT_EQ(test, 0, regmap_read(map, i, &rval[i])); in bulk_write() 284 KUNIT_EXPECT_MEMEQ(test, val, rval, sizeof(val)); in bulk_write() 296 unsigned int val[BLOCK_TEST_SIZE], rval[BLOCK_TEST_SIZE]; in bulk_read() local 311 KUNIT_EXPECT_EQ(test, 0, regmap_bulk_read(map, 0, rval, in bulk_read() 313 KUNIT_EXPECT_MEMEQ(test, val, rval, sizeof(val)); in bulk_read() 326 unsigned int val[BLOCK_TEST_SIZE], rval[BLOCK_TEST_SIZE]; in multi_write() local [all …]
|
/linux/sound/soc/qcom/ |
H A D | common.c | 204 int rval, i; in qcom_snd_wcd_jack_setup() local 207 rval = snd_soc_card_jack_new_pins(card, "Headset Jack", in qcom_snd_wcd_jack_setup() 216 if (rval < 0) { in qcom_snd_wcd_jack_setup() 218 return rval; in qcom_snd_wcd_jack_setup() 234 rval = snd_soc_component_set_jack(codec_dai->component, in qcom_snd_wcd_jack_setup() 236 if (rval != 0 && rval != -ENOTSUPP) { in qcom_snd_wcd_jack_setup() 237 dev_warn(card->dev, "Failed to set jack: %d\n", rval); in qcom_snd_wcd_jack_setup() 238 return rval; in qcom_snd_wcd_jack_setup() 258 int rval, i; in qcom_snd_dp_jack_setup() local 261 rval = snd_soc_card_jack_new(card, jack_name, SND_JACK_AVOUT, dp_jack); in qcom_snd_dp_jack_setup() [all …]
|
/linux/drivers/input/serio/ |
H A D | sun4i-ps2.c | 102 u32 rval; in sun4i_ps2_interrupt() local 116 rval = PS2_LSTS_TXTDO | PS2_LSTS_STOPERR | PS2_LSTS_ACKERR | in sun4i_ps2_interrupt() 118 writel(rval, drvdata->reg_base + PS2_REG_LSTS); in sun4i_ps2_interrupt() 123 rval = PS2_FSTS_TXUF | PS2_FSTS_TXOF | PS2_FSTS_TXRDY | in sun4i_ps2_interrupt() 125 writel(rval, drvdata->reg_base + PS2_REG_FSTS); in sun4i_ps2_interrupt() 128 rval = (fifo_status >> 16) & 0x3; in sun4i_ps2_interrupt() 129 while (rval--) { in sun4i_ps2_interrupt() 146 u32 rval; in sun4i_ps2_open() local 149 rval = PS2_LCTL_STOPERREN | PS2_LCTL_ACKERREN in sun4i_ps2_open() 151 writel(rval, drvdata->reg_base + PS2_REG_LCTL); in sun4i_ps2_open() [all …]
|
/linux/drivers/clk/ |
H A D | clk-bd718x7.c | 62 int rval; in bd71837_clk_is_enabled() local 65 rval = regmap_read(c->regmap, c->reg, &enabled); in bd71837_clk_is_enabled() 67 if (rval) in bd71837_clk_is_enabled() 68 return rval; in bd71837_clk_is_enabled() 82 int rval = -ENOMEM; in bd71837_clk_probe() local 131 rval = devm_clk_hw_register(&pdev->dev, &c->hw); in bd71837_clk_probe() 132 if (rval) { in bd71837_clk_probe() 134 return rval; in bd71837_clk_probe() 136 rval = devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get, in bd71837_clk_probe() 138 if (rval) in bd71837_clk_probe() [all …]
|