18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * phy-companion.h -- phy companion to indicate the comparator part of PHY 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com 68c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 78c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by 88c2ecf20Sopenharmony_ci * the Free Software Foundation; either version 2 of the License, or 98c2ecf20Sopenharmony_ci * (at your option) any later version. 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Author: Kishon Vijay Abraham I <kishon@ti.com> 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * This program is distributed in the hope that it will be useful, 148c2ecf20Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 158c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 168c2ecf20Sopenharmony_ci * GNU General Public License for more details. 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci */ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#ifndef __DRIVERS_PHY_COMPANION_H 218c2ecf20Sopenharmony_ci#define __DRIVERS_PHY_COMPANION_H 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#include <linux/usb/otg.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci/* phy_companion to take care of VBUS, ID and srp capabilities */ 268c2ecf20Sopenharmony_cistruct phy_companion { 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci /* effective for A-peripheral, ignored for B devices */ 298c2ecf20Sopenharmony_ci int (*set_vbus)(struct phy_companion *x, bool enabled); 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci /* for B devices only: start session with A-Host */ 328c2ecf20Sopenharmony_ci int (*start_srp)(struct phy_companion *x); 338c2ecf20Sopenharmony_ci}; 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#endif /* __DRIVERS_PHY_COMPANION_H */ 36