Lines Matching refs:dev
248 struct device *dev = &i2c->dev; in rt5739_probe() local
258 desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); in rt5739_probe()
262 enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_HIGH); in rt5739_probe()
264 return dev_err_probe(dev, PTR_ERR(enable_gpio), "Failed to get 'enable' gpio\n"); in rt5739_probe()
270 return dev_err_probe(dev, PTR_ERR(regmap), "Failed to init regmap\n"); in rt5739_probe()
274 return dev_err_probe(dev, ret, "Failed to read VID\n"); in rt5739_probe()
278 return dev_err_probe(dev, -ENODEV, "Incorrect VID (0x%02x)\n", vid); in rt5739_probe()
280 vsel_acth = device_property_read_bool(dev, "richtek,vsel-active-high"); in rt5739_probe()
284 cfg.dev = dev; in rt5739_probe()
285 cfg.of_node = dev_of_node(dev); in rt5739_probe()
286 cfg.init_data = of_get_regulator_init_data(dev, dev_of_node(dev), desc); in rt5739_probe()
287 rdev = devm_regulator_register(dev, desc, &cfg); in rt5739_probe()
289 return dev_err_probe(dev, PTR_ERR(rdev), "Failed to register regulator\n"); in rt5739_probe()