Lines Matching refs:dev
126 struct device *dev; member
184 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error); in cpcap_charger_get_charge_voltage()
200 dev_warn(ddata->dev, "%s failed: %i\n", __func__, error); in cpcap_charger_get_charge_current()
212 struct cpcap_charger_ddata *ddata = dev_get_drvdata(psy->dev.parent); in cpcap_charger_get_property()
317 struct cpcap_charger_ddata *ddata = dev_get_drvdata(psy->dev.parent); in cpcap_charger_set_property()
378 dev_warn(ddata->dev, "unknown state: %i\n", state); in cpcap_charger_update_state()
402 dev_dbg(ddata->dev, "state: %s\n", status); in cpcap_charger_update_state()
413 dev_err(ddata->dev, "%s failed with %i\n", __func__, error); in cpcap_charger_disable()
427 dev_dbg(ddata->dev, "enable: %i %i %i\n", in cpcap_charger_enable()
438 dev_err(ddata->dev, "%s failed with %i\n", __func__, error); in cpcap_charger_enable()
453 dev_err(ddata->dev, "error reading VBUS: %i\n", error); in cpcap_charger_vbus_valid()
471 dev_dbg(ddata->dev, "VBUS already provided\n"); in cpcap_charger_vbus_work()
518 dev_err(ddata->dev, "%s could not %s vbus: %i\n", __func__, in cpcap_charger_vbus_work()
693 dev_err(ddata->dev, "battery power_supply not available %li\n", in cpcap_usb_detect()
706 dev_info(ddata->dev, "battery not inserted, charging disabled\n"); in cpcap_usb_detect()
735 dev_err(ddata->dev, "%s failed with %i\n", __func__, error); in cpcap_usb_detect()
761 error = devm_request_threaded_irq(ddata->dev, irq, NULL, in cpcap_usb_init_irq()
766 dev_err(ddata->dev, "could not get irq %s: %i\n", in cpcap_usb_init_irq()
772 d = devm_kzalloc(ddata->dev, sizeof(*d), GFP_KERNEL); in cpcap_usb_init_irq()
813 ddata->gpio[i] = devm_gpiod_get_index(ddata->dev, "mode", in cpcap_charger_init_optional_gpios()
816 dev_info(ddata->dev, "no mode change GPIO%i: %li\n", in cpcap_charger_init_optional_gpios()
831 ddata->channels[i] = devm_iio_channel_get(ddata->dev, in cpcap_charger_init_iio()
848 dev_err(ddata->dev, "could not initialize VBUS or ID IIO: %i\n", in cpcap_charger_init_iio()
886 &pdev->dev); in cpcap_charger_probe()
890 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); in cpcap_charger_probe()
894 ddata->dev = &pdev->dev; in cpcap_charger_probe()
898 ddata->reg = dev_get_regmap(ddata->dev->parent, NULL); in cpcap_charger_probe()
913 psy_cfg.of_node = pdev->dev.of_node; in cpcap_charger_probe()
918 ddata->usb = devm_power_supply_register(ddata->dev, in cpcap_charger_probe()
923 dev_err(ddata->dev, "failed to register USB charger: %i\n", in cpcap_charger_probe()
936 dev_info(ddata->dev, "charger needs phy, deferring probe\n"); in cpcap_charger_probe()
955 dev_warn(ddata->dev, "could not clear USB comparator: %i\n", in cpcap_charger_shutdown()
961 dev_warn(ddata->dev, "could not clear charger: %i\n", in cpcap_charger_shutdown()