Jagan Teki | 21fc42d | 2018-05-07 13:03:27 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __GENERIC_PHY_SUN4I_USB_H |
| 8 | #define __GENERIC_PHY_SUN4I_USB_H |
| 9 | |
| 10 | /** |
| 11 | * sun4i_usb_phy_id_detect - detect ID pin of USB PHY |
| 12 | * |
| 13 | * @phy: USB PHY port to detect ID pin |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 14 | * Return: 0 if OK, or a negative error code |
Jagan Teki | 21fc42d | 2018-05-07 13:03:27 +0530 | [diff] [blame] | 15 | */ |
| 16 | int sun4i_usb_phy_id_detect(struct phy *phy); |
| 17 | |
| 18 | /** |
| 19 | * sun4i_usb_phy_vbus_detect - detect VBUS pin of USB PHY |
| 20 | * |
| 21 | * @phy: USB PHY port to detect VBUS pin |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 22 | * Return: 0 if OK, or a negative error code |
Jagan Teki | 21fc42d | 2018-05-07 13:03:27 +0530 | [diff] [blame] | 23 | */ |
| 24 | int sun4i_usb_phy_vbus_detect(struct phy *phy); |
| 25 | |
Jagan Teki | 37671e1 | 2018-05-07 13:03:37 +0530 | [diff] [blame] | 26 | /** |
| 27 | * sun4i_usb_phy_set_squelch_detect() - Enable/disable squelch detect |
| 28 | * |
| 29 | * @phy: reference to a sun4i usb phy |
| 30 | * @enabled: wether to enable or disable squelch detect |
| 31 | */ |
| 32 | void sun4i_usb_phy_set_squelch_detect(struct phy *phy, bool enabled); |
| 33 | |
Jagan Teki | 21fc42d | 2018-05-07 13:03:27 +0530 | [diff] [blame] | 34 | #endif /*__GENERIC_PHY_SUN4I_USB_H */ |