Lines Matching refs:dev
88 struct device *dev; member
248 return dev_err_probe(rdev_map->dev, ret, "Failed to clr buck irqs\n"); in rtq2208_init_irq_mask()
253 return dev_err_probe(rdev_map->dev, ret, "Failed to clr general irqs\n"); in rtq2208_init_irq_mask()
258 return dev_err_probe(rdev_map->dev, ret, "Failed to unmask buck irqs\n"); in rtq2208_init_irq_mask()
338 static int rtq2208_of_get_fixed_voltage(struct device *dev, in rtq2208_of_get_fixed_voltage() argument
347 if (!dev->of_node) in rtq2208_of_get_fixed_voltage()
350 np = of_get_child_by_name(dev->of_node, "regulators"); in rtq2208_of_get_fixed_voltage()
352 np = dev->of_node; in rtq2208_of_get_fixed_voltage()
354 ret = of_regulator_match(dev, np, rtq2208_ldo_match, n_fixed); in rtq2208_of_get_fixed_voltage()
445 struct rtq2208_regulator_desc *rdesc[RTQ2208_LDO_MAX], struct device *dev) in rtq2208_parse_regulator_dt_data() argument
451 mtp_sel = device_property_read_bool(dev, "richtek,mtp-sel-high"); in rtq2208_parse_regulator_dt_data()
456 rdesc[i] = devm_kcalloc(dev, 1, sizeof(*rdesc[0]), GFP_KERNEL); in rtq2208_parse_regulator_dt_data()
464 ret = rtq2208_of_get_fixed_voltage(dev, rtq2208_ldo_match, ldo_idx); in rtq2208_parse_regulator_dt_data()
466 return dev_err_probe(dev, ret, "Failed to get ldo fixed_uV\n"); in rtq2208_parse_regulator_dt_data()
512 struct device *dev = &i2c->dev; in rtq2208_probe() local
522 rdev_map = devm_kzalloc(dev, sizeof(struct rtq2208_rdev_map), GFP_KERNEL); in rtq2208_probe()
528 return dev_err_probe(dev, PTR_ERR(regmap), "Failed to allocate regmap\n"); in rtq2208_probe()
533 return dev_err_probe(dev, ret, "Failed to check used regulators\n"); in rtq2208_probe()
536 rdev_map->dev = dev; in rtq2208_probe()
538 cfg.dev = dev; in rtq2208_probe()
541 ret = rtq2208_parse_regulator_dt_data(n_regulator, regulator_idx_table, rdesc, dev); in rtq2208_probe()
549 rdev = devm_regulator_register(dev, &rdesc[i]->desc, &cfg); in rtq2208_probe()
562 return devm_request_threaded_irq(dev, i2c->irq, NULL, rtq2208_irq_handler, in rtq2208_probe()
563 IRQF_ONESHOT, dev_name(dev), rdev_map); in rtq2208_probe()