Lines Matching refs:tusb
30 struct tusb1210 *tusb = phy_get_drvdata(phy); in tusb1210_power_on() local
32 gpiod_set_value_cansleep(tusb->gpio_reset, 1); in tusb1210_power_on()
33 gpiod_set_value_cansleep(tusb->gpio_cs, 1); in tusb1210_power_on()
36 if (tusb->vendor_specific2) in tusb1210_power_on()
37 ulpi_write(tusb->ulpi, TUSB1210_VENDOR_SPECIFIC2, in tusb1210_power_on()
38 tusb->vendor_specific2); in tusb1210_power_on()
45 struct tusb1210 *tusb = phy_get_drvdata(phy); in tusb1210_power_off() local
47 gpiod_set_value_cansleep(tusb->gpio_reset, 0); in tusb1210_power_off()
48 gpiod_set_value_cansleep(tusb->gpio_cs, 0); in tusb1210_power_off()
55 struct tusb1210 *tusb = phy_get_drvdata(phy); in tusb1210_set_mode() local
58 ret = ulpi_read(tusb->ulpi, ULPI_OTG_CTRL); in tusb1210_set_mode()
68 ulpi_write(tusb->ulpi, ULPI_OTG_CTRL, ret); in tusb1210_set_mode()
75 ulpi_write(tusb->ulpi, ULPI_OTG_CTRL, ret); in tusb1210_set_mode()
83 return ulpi_write(tusb->ulpi, ULPI_OTG_CTRL, ret); in tusb1210_set_mode()
95 struct tusb1210 *tusb; in tusb1210_probe() local
98 tusb = devm_kzalloc(&ulpi->dev, sizeof(*tusb), GFP_KERNEL); in tusb1210_probe()
99 if (!tusb) in tusb1210_probe()
102 tusb->gpio_reset = devm_gpiod_get_optional(&ulpi->dev, "reset", in tusb1210_probe()
104 if (IS_ERR(tusb->gpio_reset)) in tusb1210_probe()
105 return PTR_ERR(tusb->gpio_reset); in tusb1210_probe()
107 gpiod_set_value_cansleep(tusb->gpio_reset, 1); in tusb1210_probe()
109 tusb->gpio_cs = devm_gpiod_get_optional(&ulpi->dev, "cs", in tusb1210_probe()
111 if (IS_ERR(tusb->gpio_cs)) in tusb1210_probe()
112 return PTR_ERR(tusb->gpio_cs); in tusb1210_probe()
114 gpiod_set_value_cansleep(tusb->gpio_cs, 1); in tusb1210_probe()
135 tusb->vendor_specific2 = reg; in tusb1210_probe()
138 tusb->phy = ulpi_phy_create(ulpi, &phy_ops); in tusb1210_probe()
139 if (IS_ERR(tusb->phy)) in tusb1210_probe()
140 return PTR_ERR(tusb->phy); in tusb1210_probe()
142 tusb->ulpi = ulpi; in tusb1210_probe()
144 phy_set_drvdata(tusb->phy, tusb); in tusb1210_probe()
145 ulpi_set_drvdata(ulpi, tusb); in tusb1210_probe()
151 struct tusb1210 *tusb = ulpi_get_drvdata(ulpi); in tusb1210_remove() local
153 ulpi_phy_destroy(ulpi, tusb->phy); in tusb1210_remove()