Lines Matching +full:hsic +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0+
3 * Driver for SMSC USB4604 USB HSIC 4-port 2.0 hub controller driver
6 * Copyright (c) 2012-2013 Dongjin Kim (tobetter@gmail.com)
23 enum usb4604_mode mode; member
30 gpiod_set_value_cansleep(hub->gpio_reset, state); in usb4604_reset()
39 struct device *dev = hub->dev; in usb4604_connect()
52 hub->mode = USB4604_MODE_HUB; in usb4604_connect()
53 dev_dbg(dev, "switched to HUB mode\n"); in usb4604_connect()
58 static int usb4604_switch_mode(struct usb4604 *hub, enum usb4604_mode mode) in usb4604_switch_mode() argument
60 struct device *dev = hub->dev; in usb4604_switch_mode()
63 switch (mode) { in usb4604_switch_mode()
70 dev_dbg(dev, "switched to STANDBY mode\n"); in usb4604_switch_mode()
74 dev_err(dev, "unknown mode is requested\n"); in usb4604_switch_mode()
75 err = -EINVAL; in usb4604_switch_mode()
84 struct device *dev = hub->dev; in usb4604_probe()
85 struct device_node *np = dev->of_node; in usb4604_probe()
87 u32 mode = USB4604_MODE_HUB; in usb4604_probe() local
92 hub->gpio_reset = gpio; in usb4604_probe()
94 if (of_property_read_u32(np, "initial-mode", &hub->mode)) in usb4604_probe()
95 hub->mode = mode; in usb4604_probe()
97 return usb4604_switch_mode(hub, hub->mode); in usb4604_probe()
104 hub = devm_kzalloc(&i2c->dev, sizeof(*hub), GFP_KERNEL); in usb4604_i2c_probe()
106 return -ENOMEM; in usb4604_i2c_probe()
109 hub->dev = &i2c->dev; in usb4604_i2c_probe()
129 usb4604_switch_mode(hub, hub->mode); in usb4604_i2c_resume()