Lines Matching refs:rval
54 int rval; in lm3630a_read() local
57 rval = regmap_read(pchip->regmap, reg, ®_val); in lm3630a_read()
58 if (rval < 0) in lm3630a_read()
59 return rval; in lm3630a_read()
79 int rval; in lm3630a_chip_init() local
84 rval = lm3630a_write(pchip, REG_FILTER_STRENGTH, 0x03); in lm3630a_chip_init()
86 rval |= lm3630a_update(pchip, REG_CONFIG, 0x07, pdata->pwm_ctrl); in lm3630a_chip_init()
88 rval |= lm3630a_write(pchip, REG_BOOST, 0x38); in lm3630a_chip_init()
90 rval |= lm3630a_update(pchip, REG_I_A, 0x1F, 0x1F); in lm3630a_chip_init()
92 rval |= lm3630a_write(pchip, REG_I_B, 0x1F); in lm3630a_chip_init()
94 rval |= lm3630a_update(pchip, REG_CTRL, 0x14, pdata->leda_ctrl); in lm3630a_chip_init()
95 rval |= lm3630a_update(pchip, REG_CTRL, 0x0B, pdata->ledb_ctrl); in lm3630a_chip_init()
98 rval |= lm3630a_write(pchip, REG_BRT_A, pdata->leda_init_brt); in lm3630a_chip_init()
99 rval |= lm3630a_write(pchip, REG_BRT_B, pdata->ledb_init_brt); in lm3630a_chip_init()
101 if (rval < 0) in lm3630a_chip_init()
103 return rval; in lm3630a_chip_init()
109 int rval; in lm3630a_delayed_func() local
114 rval = lm3630a_read(pchip, REG_INT_STATUS); in lm3630a_delayed_func()
115 if (rval < 0) { in lm3630a_delayed_func()
121 dev_info(pchip->dev, "REG_INT_STATUS Register is 0x%x\n", rval); in lm3630a_delayed_func()
126 int rval; in lm3630a_isr_func() local
132 rval = lm3630a_update(pchip, REG_CTRL, 0x80, 0x00); in lm3630a_isr_func()
133 if (rval < 0) { in lm3630a_isr_func()
142 int rval; in lm3630a_intr_config() local
144 rval = lm3630a_write(pchip, REG_INT_EN, 0x87); in lm3630a_intr_config()
145 if (rval < 0) in lm3630a_intr_config()
146 return rval; in lm3630a_intr_config()
161 return rval; in lm3630a_intr_config()
213 int brightness, rval; in lm3630a_bank_a_get_brightness() local
218 rval = lm3630a_read(pchip, REG_PWM_OUTHIGH); in lm3630a_bank_a_get_brightness()
219 if (rval < 0) in lm3630a_bank_a_get_brightness()
221 brightness = (rval & 0x01) << 8; in lm3630a_bank_a_get_brightness()
222 rval = lm3630a_read(pchip, REG_PWM_OUTLOW); in lm3630a_bank_a_get_brightness()
223 if (rval < 0) in lm3630a_bank_a_get_brightness()
225 brightness |= rval; in lm3630a_bank_a_get_brightness()
230 rval = lm3630a_update(pchip, REG_CTRL, 0x80, 0x00); in lm3630a_bank_a_get_brightness()
231 if (rval < 0) in lm3630a_bank_a_get_brightness()
234 rval = lm3630a_read(pchip, REG_BRT_A); in lm3630a_bank_a_get_brightness()
235 if (rval < 0) in lm3630a_bank_a_get_brightness()
237 brightness = rval; in lm3630a_bank_a_get_brightness()
290 int brightness, rval; in lm3630a_bank_b_get_brightness() local
295 rval = lm3630a_read(pchip, REG_PWM_OUTHIGH); in lm3630a_bank_b_get_brightness()
296 if (rval < 0) in lm3630a_bank_b_get_brightness()
298 brightness = (rval & 0x01) << 8; in lm3630a_bank_b_get_brightness()
299 rval = lm3630a_read(pchip, REG_PWM_OUTLOW); in lm3630a_bank_b_get_brightness()
300 if (rval < 0) in lm3630a_bank_b_get_brightness()
302 brightness |= rval; in lm3630a_bank_b_get_brightness()
307 rval = lm3630a_update(pchip, REG_CTRL, 0x80, 0x00); in lm3630a_bank_b_get_brightness()
308 if (rval < 0) in lm3630a_bank_b_get_brightness()
311 rval = lm3630a_read(pchip, REG_BRT_B); in lm3630a_bank_b_get_brightness()
312 if (rval < 0) in lm3630a_bank_b_get_brightness()
314 brightness = rval; in lm3630a_bank_b_get_brightness()
372 int rval; in lm3630a_probe() local
387 rval = PTR_ERR(pchip->regmap); in lm3630a_probe()
388 dev_err(&client->dev, "fail : allocate reg. map: %d\n", rval); in lm3630a_probe()
389 return rval; in lm3630a_probe()
410 rval = lm3630a_chip_init(pchip); in lm3630a_probe()
411 if (rval < 0) { in lm3630a_probe()
413 return rval; in lm3630a_probe()
416 rval = lm3630a_backlight_register(pchip); in lm3630a_probe()
417 if (rval < 0) { in lm3630a_probe()
419 return rval; in lm3630a_probe()
439 rval = lm3630a_intr_config(pchip); in lm3630a_probe()
440 if (rval < 0) in lm3630a_probe()
441 return rval; in lm3630a_probe()
449 int rval; in lm3630a_remove() local
452 rval = lm3630a_write(pchip, REG_BRT_A, 0); in lm3630a_remove()
453 if (rval < 0) in lm3630a_remove()
456 rval = lm3630a_write(pchip, REG_BRT_B, 0); in lm3630a_remove()
457 if (rval < 0) in lm3630a_remove()