| .. | .. |
|---|
| 1094 | 1094 | |
|---|
| 1095 | 1095 | w1_write_8(dev_master, W1_CONVERT_TEMP); |
|---|
| 1096 | 1096 | |
|---|
| 1097 | | - if (strong_pullup) { /*some device need pullup */ |
|---|
| 1097 | + if (SLAVE_FEATURES(sl) & W1_THERM_POLL_COMPLETION) { |
|---|
| 1098 | + ret = w1_poll_completion(dev_master, W1_POLL_CONVERT_TEMP); |
|---|
| 1099 | + if (ret) { |
|---|
| 1100 | + dev_dbg(&sl->dev, "%s: Timeout\n", __func__); |
|---|
| 1101 | + goto mt_unlock; |
|---|
| 1102 | + } |
|---|
| 1103 | + mutex_unlock(&dev_master->bus_mutex); |
|---|
| 1104 | + } else if (!strong_pullup) { /*no device need pullup */ |
|---|
| 1098 | 1105 | sleep_rem = msleep_interruptible(t_conv); |
|---|
| 1099 | 1106 | if (sleep_rem != 0) { |
|---|
| 1100 | 1107 | ret = -EINTR; |
|---|
| 1101 | 1108 | goto mt_unlock; |
|---|
| 1102 | 1109 | } |
|---|
| 1103 | 1110 | mutex_unlock(&dev_master->bus_mutex); |
|---|
| 1104 | | - } else { /*no device need pullup */ |
|---|
| 1105 | | - if (SLAVE_FEATURES(sl) & W1_THERM_POLL_COMPLETION) { |
|---|
| 1106 | | - ret = w1_poll_completion(dev_master, W1_POLL_CONVERT_TEMP); |
|---|
| 1107 | | - if (ret) { |
|---|
| 1108 | | - dev_dbg(&sl->dev, "%s: Timeout\n", __func__); |
|---|
| 1109 | | - goto mt_unlock; |
|---|
| 1110 | | - } |
|---|
| 1111 | | - mutex_unlock(&dev_master->bus_mutex); |
|---|
| 1112 | | - } else { |
|---|
| 1113 | | - /* Fixed delay */ |
|---|
| 1114 | | - mutex_unlock(&dev_master->bus_mutex); |
|---|
| 1115 | | - sleep_rem = msleep_interruptible(t_conv); |
|---|
| 1116 | | - if (sleep_rem != 0) { |
|---|
| 1117 | | - ret = -EINTR; |
|---|
| 1118 | | - goto dec_refcnt; |
|---|
| 1119 | | - } |
|---|
| 1111 | + } else { /*some device need pullup */ |
|---|
| 1112 | + mutex_unlock(&dev_master->bus_mutex); |
|---|
| 1113 | + sleep_rem = msleep_interruptible(t_conv); |
|---|
| 1114 | + if (sleep_rem != 0) { |
|---|
| 1115 | + ret = -EINTR; |
|---|
| 1116 | + goto dec_refcnt; |
|---|
| 1120 | 1117 | } |
|---|
| 1121 | 1118 | } |
|---|
| 1122 | 1119 | ret = read_scratchpad(sl, info); |
|---|