Lines Matching +full:hsic +full:- +full:state
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)
28 static void usb4604_reset(struct usb4604 *hub, int state) in usb4604_reset() argument
30 gpiod_set_value_cansleep(hub->gpio_reset, state); in usb4604_reset()
33 if (state) in usb4604_reset()
39 struct device *dev = hub->dev; in usb4604_connect()
52 hub->mode = USB4604_MODE_HUB; in usb4604_connect()
60 struct device *dev = hub->dev; 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()
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()