Lines Matching refs:ret
124 int ret;
127 ret = pmbus_write_word_data(client, page, reg, word);
130 return ret;
137 int ret;
140 ret = pmbus_write_byte(client, page, value);
143 return ret;
163 int ret = 0;
171 ret = ucd9000_get_fan_config(client, 0);
172 if (ret < 0)
173 return ret;
174 fan_config = ret << 4;
175 ret = ucd9000_get_fan_config(client, 1);
176 if (ret < 0)
177 return ret;
178 fan_config |= ret;
179 ret = fan_config;
185 ret = ucd9000_get_fan_config(client, 2);
186 if (ret < 0)
187 return ret;
188 fan_config = ret << 4;
189 ret = ucd9000_get_fan_config(client, 3);
190 if (ret < 0)
191 return ret;
192 fan_config |= ret;
193 ret = fan_config;
196 ret = -ENODATA;
199 return ret;
251 int ret;
254 ret = i2c_smbus_write_byte_data(client, UCD9000_GPIO_SELECT, offset);
255 if (ret < 0)
256 return ret;
264 int ret;
266 ret = ucd9000_gpio_read_config(client, offset);
267 if (ret < 0)
268 return ret;
270 return !!(ret & UCD9000_GPIO_CONFIG_STATUS);
277 int ret;
279 ret = ucd9000_gpio_read_config(client, offset);
280 if (ret < 0) {
282 offset, ret);
287 if (ret & UCD9000_GPIO_CONFIG_STATUS)
290 ret |= UCD9000_GPIO_CONFIG_STATUS;
292 if (!(ret & UCD9000_GPIO_CONFIG_STATUS))
295 ret &= ~UCD9000_GPIO_CONFIG_STATUS;
298 ret |= UCD9000_GPIO_CONFIG_ENABLE;
301 ret = i2c_smbus_write_byte_data(client, UCD9000_GPIO_CONFIG, ret);
302 if (ret < 0) {
304 offset, ret);
308 ret &= ~UCD9000_GPIO_CONFIG_ENABLE;
310 ret = i2c_smbus_write_byte_data(client, UCD9000_GPIO_CONFIG, ret);
311 if (ret < 0)
313 offset, ret);
320 int ret;
322 ret = ucd9000_gpio_read_config(client, offset);
323 if (ret < 0)
324 return ret;
326 return !(ret & UCD9000_GPIO_CONFIG_OUT_ENABLE);
334 int ret, config, out_val;
336 ret = ucd9000_gpio_read_config(client, offset);
337 if (ret < 0)
338 return ret;
343 if (ret & UCD9000_GPIO_CONFIG_OUT_ENABLE) {
344 if ((ret & UCD9000_GPIO_CONFIG_OUT_VALUE) == out_val)
347 ret |= UCD9000_GPIO_CONFIG_OUT_ENABLE;
351 ret |= UCD9000_GPIO_CONFIG_OUT_VALUE;
353 ret &= ~UCD9000_GPIO_CONFIG_OUT_VALUE;
356 if (!(ret & UCD9000_GPIO_CONFIG_OUT_ENABLE))
359 ret &= ~UCD9000_GPIO_CONFIG_OUT_ENABLE;
362 ret |= UCD9000_GPIO_CONFIG_ENABLE;
363 config = ret;
366 ret = i2c_smbus_write_byte_data(client, UCD9000_GPIO_CONFIG, config);
367 if (ret < 0)
368 return ret;
443 int ret = pmbus_set_page(client, 0, 0xff);
445 if (ret < 0)
446 return ret;
456 int ret, i;
458 ret = ucd9000_get_mfr_status(client, buffer);
459 if (ret < 0)
460 return ret;
465 i = ret - 3 - entry->index / 8;
567 int i, ret;
574 ret = i2c_smbus_read_block_data(client, UCD9000_DEVICE_ID,
576 if (ret < 0) {
578 return ret;
580 block_buffer[ret] = '\0';
608 ret = i2c_smbus_read_byte_data(client, UCD9000_NUM_PAGES);
609 if (ret < 0) {
612 return ret;
614 info->pages = ret;
624 ret = i2c_smbus_read_block_data(client, UCD9000_MONITOR_CONFIG,
626 if (ret <= 0) {
630 for (i = 0; i < ret; i++) {
660 ret = i2c_smbus_read_block_data(client,
663 if (ret < 0)
664 return ret;
680 ret = pmbus_do_probe(client, info);
681 if (ret)
682 return ret;
684 ret = ucd9000_init_debugfs(client, mid, data);
685 if (ret)
687 ret);