Lines Matching refs:ret
26 int ret; in ufm_shift_data() local
30 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, 0); in ufm_shift_data()
31 if (ret < 0) in ufm_shift_data()
32 return ret; in ufm_shift_data()
33 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, UFM_CTRL_DCLK); in ufm_shift_data()
34 if (ret < 0) in ufm_shift_data()
35 return ret; in ufm_shift_data()
38 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, in ufm_shift_data()
40 if (ret < 0) in ufm_shift_data()
41 return ret; in ufm_shift_data()
47 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, UFM_CTRL_DSHIFT in ufm_shift_data()
49 if (ret < 0) in ufm_shift_data()
50 return ret; in ufm_shift_data()
52 ret = dm_i2c_reg_read(dev, REG_UFM_CTRL); in ufm_shift_data()
53 if (ret < 0) in ufm_shift_data()
54 return ret; in ufm_shift_data()
55 if (ret & UFM_CTRL_DOUT) in ufm_shift_data()
58 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, in ufm_shift_data()
60 if (ret < 0) in ufm_shift_data()
61 return ret; in ufm_shift_data()
65 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, UFM_CTRL_DCLK); in ufm_shift_data()
66 if (ret < 0) in ufm_shift_data()
67 return ret; in ufm_shift_data()
72 return ret; in ufm_shift_data()
77 int ret; in ufm_erase() local
80 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, in ufm_erase()
82 if (ret < 0) in ufm_erase()
83 return ret; in ufm_erase()
84 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, UFM_CTRL_DCLK); in ufm_erase()
85 if (ret < 0) in ufm_erase()
86 return ret; in ufm_erase()
94 int ret; in ufm_program() local
97 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, in ufm_program()
99 if (ret < 0) in ufm_program()
100 return ret; in ufm_program()
101 ret = dm_i2c_reg_write(dev, REG_UFM_CTRL, UFM_CTRL_DCLK); in ufm_program()
102 if (ret < 0) in ufm_program()
103 return ret; in ufm_program()
111 int ret; in ufm_write() local
113 ret = ufm_shift_data(dev, data, NULL); in ufm_write()
114 if (ret < 0) in ufm_write()
115 return ret; in ufm_write()
117 ret = ufm_erase(dev); in ufm_write()
118 if (ret < 0) in ufm_write()
119 return ret; in ufm_write()
134 int ret; in do_sl28_nvm() local
144 ret = -EINVAL; in do_sl28_nvm()
154 ret = ufm_write(dev, nvm); in do_sl28_nvm()
155 if (ret) in do_sl28_nvm()
159 ret = ufm_read(dev, &nvm); in do_sl28_nvm()
160 if (ret) in do_sl28_nvm()
170 printf("command failed (%d)\n", ret); in do_sl28_nvm()