Lines Matching full:ulpi
3 * tusb1210.c - TUSB1210 USB ULPI PHY driver
12 #include <linux/ulpi/driver.h>
13 #include <linux/ulpi/regs.h>
55 struct ulpi *ulpi; member
75 ret = ulpi_write(tusb->ulpi, reg, val); in tusb1210_ulpi_write()
77 dev_err(&tusb->ulpi->dev, "error %d writing val 0x%02x to reg 0x%02x\n", in tusb1210_ulpi_write()
87 ret = ulpi_read(tusb->ulpi, reg); in tusb1210_ulpi_read()
92 dev_err(&tusb->ulpi->dev, "error %d reading reg 0x%02x\n", ret, reg); in tusb1210_ulpi_read()
180 dev_dbg(&tusb->ulpi->dev, "charger type: %d\n", type); in tusb1210_chg_det_set_type()
191 dev_dbg(&tusb->ulpi->dev, "chg_det new state %s in %d ms\n", in tusb1210_chg_det_set_state()
260 dev_dbg(&tusb->ulpi->dev, "chg_det state %s vbus_present %d\n", in tusb1210_chg_det_work()
268 ret = pm_runtime_resume_and_get(tusb->ulpi->dev.parent); in tusb1210_chg_det_work()
270 dev_err(&tusb->ulpi->dev, "error %d runtime-resuming\n", ret); in tusb1210_chg_det_work()
339 pm_runtime_put(tusb->ulpi->dev.parent); in tusb1210_chg_det_work()
435 struct device *dev = &tusb->ulpi->dev; in tusb1210_probe_charger_detect()
441 if (tusb->ulpi->id.product != 0x1508) { in tusb1210_probe_charger_detect()
487 static int tusb1210_probe(struct ulpi *ulpi) in tusb1210_probe() argument
493 tusb = devm_kzalloc(&ulpi->dev, sizeof(*tusb), GFP_KERNEL); in tusb1210_probe()
497 tusb->ulpi = ulpi; in tusb1210_probe()
499 tusb->gpio_reset = devm_gpiod_get_optional(&ulpi->dev, "reset", in tusb1210_probe()
506 tusb->gpio_cs = devm_gpiod_get_optional(&ulpi->dev, "cs", in tusb1210_probe()
523 if (!device_property_read_u8(&ulpi->dev, "ihstx", &val)) in tusb1210_probe()
527 if (!device_property_read_u8(&ulpi->dev, "zhsdrv", &val)) in tusb1210_probe()
531 if (!device_property_read_u8(&ulpi->dev, "datapolarity", &val)) in tusb1210_probe()
542 tusb->phy = ulpi_phy_create(ulpi, &phy_ops); in tusb1210_probe()
549 ulpi_set_drvdata(ulpi, tusb); in tusb1210_probe()
557 static void tusb1210_remove(struct ulpi *ulpi) in tusb1210_remove() argument
559 struct tusb1210 *tusb = ulpi_get_drvdata(ulpi); in tusb1210_remove()
561 ulpi_phy_destroy(ulpi, tusb->phy); in tusb1210_remove()
572 MODULE_DEVICE_TABLE(ulpi, tusb1210_ulpi_id);
588 MODULE_DESCRIPTION("TUSB1210 ULPI PHY driver");