Lines Matching refs:dev
109 struct device *dev; member
808 dev_dbg(bq->dev, "S:CHG/PG/HIZ/VSYS=%d/%d/%d/%d, F:CHG/BOOST/BAT/NTC=%d/%d/%d/%d\n", in bq25890_get_chip_state()
856 dev_err(bq->dev, "Error communicating with the chip: %pe\n", in __bq25890_handle_irq()
930 dev_dbg(bq->dev, "Accessing init data failed %d\n", ret); in bq25890_rw_init_data()
945 dev_dbg(bq->dev, "Reset failed %d\n", ret); in bq25890_hw_init()
956 dev_dbg(bq->dev, "Enabling charging failed %d\n", ret); in bq25890_hw_init()
964 dev_dbg(bq->dev, "Disabling watchdog failed %d\n", ret); in bq25890_hw_init()
975 dev_dbg(bq->dev, "Get state failed %d\n", ret); in bq25890_hw_init()
982 dev_dbg(bq->dev, "Config ADC failed %d\n", ret); in bq25890_hw_init()
1040 bq->charger = devm_power_supply_register(bq->dev, &bq->desc, &psy_cfg); in bq25890_power_supply_init()
1051 dev_err(bq->dev, "Error switching to boost/charger mode: %d\n", ret); in bq25890_set_otg_cfg()
1063 dev_dbg(bq->dev, "Start to request input voltage increasing\n"); in bq25890_pump_express_work()
1080 dev_dbg(bq->dev, "input voltage = %d uV\n", voltage); in bq25890_pump_express_work()
1107 dev_info(bq->dev, "Hi-voltage charging requested, input voltage is %d mV\n", in bq25890_pump_express_work()
1115 dev_err(bq->dev, "Failed to request hi-voltage charging\n"); in bq25890_pump_express_work()
1245 struct bq25890_platform_data *pdata = dev_get_platdata(bq->dev); in bq25890_register_regulator()
1247 .dev = bq->dev, in bq25890_register_regulator()
1255 reg = devm_regulator_register(bq->dev, &bq25890_vbus_desc, &cfg); in bq25890_register_regulator()
1257 return dev_err_probe(bq->dev, PTR_ERR(reg), in bq25890_register_regulator()
1263 reg = devm_regulator_register(bq->dev, &bq25890_vsys_desc, &cfg); in bq25890_register_regulator()
1265 return dev_err_probe(bq->dev, PTR_ERR(reg), in bq25890_register_regulator()
1285 dev_err(bq->dev, "Cannot read chip ID: %d\n", id); in bq25890_get_chip_version()
1291 dev_err(bq->dev, "Cannot read chip revision: %d\n", rev); in bq25890_get_chip_version()
1310 dev_err(bq->dev, in bq25890_get_chip_version()
1322 dev_err(bq->dev, "Unknown chip ID %d\n", id); in bq25890_get_chip_version()
1333 irq = devm_gpiod_get(bq->dev, BQ25890_IRQ_PIN, GPIOD_IN); in bq25890_irq_probe()
1335 return dev_err_probe(bq->dev, PTR_ERR(irq), in bq25890_irq_probe()
1373 ret = device_property_read_u32(bq->dev, props[i].name, in bq25890_fw_read_u32_props()
1379 dev_err(bq->dev, "Unable to read property %d %s\n", ret, in bq25890_fw_read_u32_props()
1399 ret = device_property_read_string(bq->dev, "linux,secondary-charger-name", &str); in bq25890_fw_probe()
1407 device_property_read_u32(bq->dev, "linux,pump-express-vbus-max", in bq25890_fw_probe()
1410 ret = device_property_read_u32(bq->dev, "linux,iinlim-percentage", &val); in bq25890_fw_probe()
1413 dev_err(bq->dev, "Error linux,iinlim-percentage %u > 100\n", val); in bq25890_fw_probe()
1421 bq->skip_reset = device_property_read_bool(bq->dev, "linux,skip-reset"); in bq25890_fw_probe()
1422 bq->read_back_init_data = device_property_read_bool(bq->dev, in bq25890_fw_probe()
1431 init->ilim_en = device_property_read_bool(bq->dev, "ti,use-ilim-pin"); in bq25890_fw_probe()
1432 init->boostf = device_property_read_bool(bq->dev, "ti,boost-low-freq"); in bq25890_fw_probe()
1452 struct device *dev = &client->dev; in bq25890_probe() local
1456 bq = devm_kzalloc(dev, sizeof(*bq), GFP_KERNEL); in bq25890_probe()
1461 bq->dev = dev; in bq25890_probe()
1469 return dev_err_probe(dev, PTR_ERR(bq->rmap), in bq25890_probe()
1472 ret = devm_regmap_field_bulk_alloc(dev, bq->rmap, bq->rmap_fields, in bq25890_probe()
1481 dev_err(dev, "Cannot read chip ID or unknown chip: %d\n", ret); in bq25890_probe()
1487 return dev_err_probe(dev, ret, "reading device properties\n"); in bq25890_probe()
1491 dev_err(dev, "Cannot initialize the chip: %d\n", ret); in bq25890_probe()
1499 dev_err(dev, "No irq resource found.\n"); in bq25890_probe()
1504 bq->usb_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); in bq25890_probe()
1510 ret = devm_add_action_or_reset(dev, bq25890_non_devm_cleanup, bq); in bq25890_probe()
1520 return dev_err_probe(dev, ret, "registering power supply\n"); in bq25890_probe()
1522 ret = devm_request_threaded_irq(dev, client->irq, NULL, in bq25890_probe()
1576 static int bq25890_suspend(struct device *dev) in bq25890_suspend() argument
1578 struct bq25890_device *bq = dev_get_drvdata(dev); in bq25890_suspend()
1587 static int bq25890_resume(struct device *dev) in bq25890_resume() argument
1590 struct bq25890_device *bq = dev_get_drvdata(dev); in bq25890_resume()