• Home
  • Raw
  • Download

Lines Matching refs:ret

51 	int ret = 0;  in adc_supply_enable()  local
55 ret = regulator_set_enable(uc_pdata->vdd_supply, true); in adc_supply_enable()
58 if (!ret && uc_pdata->vss_supply) { in adc_supply_enable()
60 ret = regulator_set_enable(uc_pdata->vss_supply, true); in adc_supply_enable()
63 if (ret) in adc_supply_enable()
66 return ret; in adc_supply_enable()
93 int ret; in adc_start_channel() local
98 ret = check_channel(dev, channel, CHECK_NUMBER, __func__); in adc_start_channel()
99 if (ret) in adc_start_channel()
100 return ret; in adc_start_channel()
102 ret = adc_supply_enable(dev); in adc_start_channel()
103 if (ret) in adc_start_channel()
104 return ret; in adc_start_channel()
112 int ret; in adc_start_channels() local
117 ret = check_channel(dev, channel_mask, CHECK_MASK, __func__); in adc_start_channels()
118 if (ret) in adc_start_channels()
119 return ret; in adc_start_channels()
121 ret = adc_supply_enable(dev); in adc_start_channels()
122 if (ret) in adc_start_channels()
123 return ret; in adc_start_channels()
133 int ret; in adc_channel_data() local
138 ret = check_channel(dev, channel, CHECK_NUMBER, __func__); in adc_channel_data()
139 if (ret) in adc_channel_data()
140 return ret; in adc_channel_data()
143 ret = ops->channel_data(dev, channel, data); in adc_channel_data()
144 if (!ret || ret != -EBUSY) in adc_channel_data()
151 return ret; in adc_channel_data()
160 int ret; in adc_channels_data() local
165 ret = check_channel(dev, channel_mask, CHECK_MASK, __func__); in adc_channels_data()
166 if (ret) in adc_channels_data()
167 return ret; in adc_channels_data()
170 ret = ops->channels_data(dev, channel_mask, channels); in adc_channels_data()
171 if (!ret || ret != -EBUSY) in adc_channels_data()
178 return ret; in adc_channels_data()
184 int ret; in adc_channel_single_shot() local
186 ret = uclass_get_device_by_name(UCLASS_ADC, name, &dev); in adc_channel_single_shot()
187 if (ret) in adc_channel_single_shot()
188 return ret; in adc_channel_single_shot()
190 ret = adc_start_channel(dev, channel); in adc_channel_single_shot()
191 if (ret) in adc_channel_single_shot()
192 return ret; in adc_channel_single_shot()
194 ret = adc_channel_data(dev, channel, data); in adc_channel_single_shot()
195 if (ret) in adc_channel_single_shot()
196 return ret; in adc_channel_single_shot()
206 int channel, ret; in _adc_channels_single_shot() local
213 ret = adc_start_channel(dev, channel); in _adc_channels_single_shot()
214 if (ret) in _adc_channels_single_shot()
215 return ret; in _adc_channels_single_shot()
217 ret = adc_channel_data(dev, channel, &data); in _adc_channels_single_shot()
218 if (ret) in _adc_channels_single_shot()
219 return ret; in _adc_channels_single_shot()
233 int ret; in adc_channels_single_shot() local
235 ret = uclass_get_device_by_name(UCLASS_ADC, name, &dev); in adc_channels_single_shot()
236 if (ret) in adc_channels_single_shot()
237 return ret; in adc_channels_single_shot()
239 ret = adc_start_channels(dev, channel_mask); in adc_channels_single_shot()
240 if (ret) in adc_channels_single_shot()
243 ret = adc_channels_data(dev, channel_mask, channels); in adc_channels_single_shot()
244 if (ret) in adc_channels_single_shot()
245 return ret; in adc_channels_single_shot()
250 if (ret != -ENOSYS) in adc_channels_single_shot()
251 return ret; in adc_channels_single_shot()
259 int ret; in adc_vdd_platdata_update() local
267 ret = device_get_supply_regulator(dev, "vdd-supply", in adc_vdd_platdata_update()
269 if (ret) in adc_vdd_platdata_update()
270 return ret; in adc_vdd_platdata_update()
272 ret = regulator_get_value(uc_pdata->vdd_supply); in adc_vdd_platdata_update()
273 if (ret < 0) in adc_vdd_platdata_update()
274 return ret; in adc_vdd_platdata_update()
276 uc_pdata->vdd_microvolts = ret; in adc_vdd_platdata_update()
284 int ret; in adc_vss_platdata_update() local
286 ret = device_get_supply_regulator(dev, "vss-supply", in adc_vss_platdata_update()
288 if (ret) in adc_vss_platdata_update()
289 return ret; in adc_vss_platdata_update()
291 ret = regulator_get_value(uc_pdata->vss_supply); in adc_vss_platdata_update()
292 if (ret < 0) in adc_vss_platdata_update()
293 return ret; in adc_vss_platdata_update()
295 uc_pdata->vss_microvolts = ret; in adc_vss_platdata_update()
303 int ret, value_sign = uc_pdata->vdd_polarity_negative ? -1 : 1; in adc_vdd_value() local
309 ret = adc_vdd_platdata_update(dev); in adc_vdd_value()
310 if (ret) in adc_vdd_value()
311 return ret; in adc_vdd_value()
324 int ret, value_sign = uc_pdata->vss_polarity_negative ? -1 : 1; in adc_vss_value() local
330 ret = adc_vss_platdata_update(dev); in adc_vss_value()
331 if (ret) in adc_vss_value()
332 return ret; in adc_vss_value()
345 int ret; in adc_vdd_platdata_set() local
351 ret = adc_vdd_platdata_update(dev); in adc_vdd_platdata_set()
352 if (ret != -ENOENT) in adc_vdd_platdata_set()
353 return ret; in adc_vdd_platdata_set()
365 int ret; in adc_vss_platdata_set() local
371 ret = adc_vss_platdata_update(dev); in adc_vss_platdata_set()
372 if (ret != -ENOENT) in adc_vss_platdata_set()
373 return ret; in adc_vss_platdata_set()
384 int ret; in adc_pre_probe() local
387 ret = adc_vdd_platdata_set(dev); in adc_pre_probe()
388 if (ret) in adc_pre_probe()
389 pr_err("%s: Can't update Vdd. Error: %d", dev->name, ret); in adc_pre_probe()
392 ret = adc_vss_platdata_set(dev); in adc_pre_probe()
393 if (ret) in adc_pre_probe()
394 pr_err("%s: Can't update Vss. Error: %d", dev->name, ret); in adc_pre_probe()