| .. | .. |
|---|
| 136 | 136 | struct tps65132_reg_pdata *rpdata = &tps->reg_pdata[desc->id]; |
|---|
| 137 | 137 | int ret; |
|---|
| 138 | 138 | |
|---|
| 139 | | - rpdata->en_gpiod = devm_fwnode_get_index_gpiod_from_child(tps->dev, |
|---|
| 140 | | - "enable", 0, &np->fwnode, |
|---|
| 141 | | - GPIOD_OUT_HIGH, "enable"); |
|---|
| 142 | | - if (IS_ERR_OR_NULL(rpdata->en_gpiod)) { |
|---|
| 139 | + rpdata->en_gpiod = devm_fwnode_gpiod_get(tps->dev, of_fwnode_handle(np), |
|---|
| 140 | + "enable", GPIOD_ASIS, |
|---|
| 141 | + "enable"); |
|---|
| 142 | + if (IS_ERR(rpdata->en_gpiod)) { |
|---|
| 143 | 143 | ret = PTR_ERR(rpdata->en_gpiod); |
|---|
| 144 | 144 | |
|---|
| 145 | 145 | /* Ignore the error other than probe defer */ |
|---|
| .. | .. |
|---|
| 148 | 148 | return 0; |
|---|
| 149 | 149 | } |
|---|
| 150 | 150 | |
|---|
| 151 | | - rpdata->act_dis_gpiod = devm_fwnode_get_index_gpiod_from_child( |
|---|
| 152 | | - tps->dev, "active-discharge", 0, |
|---|
| 153 | | - &np->fwnode, 0, "active-discharge"); |
|---|
| 154 | | - if (IS_ERR_OR_NULL(rpdata->act_dis_gpiod)) { |
|---|
| 151 | + rpdata->act_dis_gpiod = devm_fwnode_gpiod_get(tps->dev, |
|---|
| 152 | + of_fwnode_handle(np), |
|---|
| 153 | + "active-discharge", |
|---|
| 154 | + GPIOD_ASIS, |
|---|
| 155 | + "active-discharge"); |
|---|
| 156 | + if (IS_ERR(rpdata->act_dis_gpiod)) { |
|---|
| 155 | 157 | ret = PTR_ERR(rpdata->act_dis_gpiod); |
|---|
| 156 | 158 | |
|---|
| 157 | 159 | /* Ignore the error other than probe defer */ |
|---|
| .. | .. |
|---|
| 218 | 220 | .wr_table = &tps65132_no_reg_table, |
|---|
| 219 | 221 | }; |
|---|
| 220 | 222 | |
|---|
| 221 | | -static int tps65132_probe(struct i2c_client *client, |
|---|
| 222 | | - const struct i2c_device_id *client_id) |
|---|
| 223 | +static int tps65132_probe(struct i2c_client *client) |
|---|
| 223 | 224 | { |
|---|
| 224 | 225 | struct device *dev = &client->dev; |
|---|
| 225 | 226 | struct tps65132_regulator *tps; |
|---|
| .. | .. |
|---|
| 270 | 271 | .driver = { |
|---|
| 271 | 272 | .name = "tps65132", |
|---|
| 272 | 273 | }, |
|---|
| 273 | | - .probe = tps65132_probe, |
|---|
| 274 | + .probe_new = tps65132_probe, |
|---|
| 274 | 275 | .id_table = tps65132_id, |
|---|
| 275 | 276 | }; |
|---|
| 276 | 277 | |
|---|