mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
This converts the USB3503 to pick GPIO descriptors from the device tree instead of iteratively picking out GPIO number references and then referencing these from the global GPIO numberspace. The USB3503 is only used from device tree among the in-tree platforms. If board files would still desire to use it they can provide machine descriptor tables. Make sure to preserve semantics such as the reset delay introduced by Stefan. Cc: Chunfeng Yun <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Signed-off-by: Linus Walleij <[email protected]> [mszyprow: invert the logic behind reset GPIO line] Signed-off-by: Marek Szyprowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
23 lines
409 B
C
23 lines
409 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __USB3503_H__
|
|
#define __USB3503_H__
|
|
|
|
#define USB3503_I2C_NAME "usb3503"
|
|
|
|
#define USB3503_OFF_PORT1 (1 << 1)
|
|
#define USB3503_OFF_PORT2 (1 << 2)
|
|
#define USB3503_OFF_PORT3 (1 << 3)
|
|
|
|
enum usb3503_mode {
|
|
USB3503_MODE_UNKNOWN,
|
|
USB3503_MODE_HUB,
|
|
USB3503_MODE_STANDBY,
|
|
};
|
|
|
|
struct usb3503_platform_data {
|
|
enum usb3503_mode initial_mode;
|
|
u8 port_off_mask;
|
|
};
|
|
|
|
#endif
|