Loading Documentation/devicetree/bindings/misc/qcom-liquid-dock.txt +4 −4 Original line number Diff line number Diff line Loading @@ -11,12 +11,12 @@ Required properties: also supported but deprecated. - qcom,dock-detect-gpio: phandle to a GPIO node corresponding to the input signal indicating when the dock is connected - qcom,dock-hub-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the USB ports - qcom,dock-eth-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the Ethernet ports - qcom,usb-host: phandle to the USB host controller connected to the dock port Optional properties: - qcom,dock-enable-gpio: phandle to a GPIO node corresponding to the output signal that turns on/off power to the ports - qcom,dock-hub-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the USB ports - qcom,dock-eth-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the Ethernet ports drivers/misc/qcom_liquid_dock.c +19 −15 Original line number Diff line number Diff line Loading @@ -82,7 +82,9 @@ static void dock_detected_work(struct work_struct *w) if (docked) { /* assert RESETs before turning on power */ if (dock->dock_hub_reset >= 0) gpio_direction_output(dock->dock_hub_reset, 1); if (dock->dock_eth_reset >= 0) gpio_direction_output(dock->dock_eth_reset, 1); if (device_attach(&dock->usb3_pdev->dev) != 1) { Loading @@ -95,7 +97,9 @@ static void dock_detected_work(struct work_struct *w) gpio_direction_output(dock->dock_enable, 1); msleep(20); /* short delay before de-asserting RESETs */ if (dock->dock_hub_reset >= 0) gpio_direction_output(dock->dock_hub_reset, 0); if (dock->dock_eth_reset >= 0) gpio_direction_output(dock->dock_eth_reset, 0); } else { device_release_driver(&dock->usb3_pdev->dev); Loading Loading @@ -153,25 +157,25 @@ static int liquid_dock_probe(struct platform_device *pdev) "qcom,dock-hub-reset-gpio", 0); if (dock->dock_hub_reset < 0) { dev_err(dock->dev, "unable to get dock-hub-reset-gpio\n"); return dock->dock_hub_reset; } } else { ret = devm_gpio_request(dock->dev, dock->dock_hub_reset, "dock_hub_reset"); if (ret) return ret; } dock->dock_eth_reset = of_get_named_gpio(node, "qcom,dock-eth-reset-gpio", 0); if (dock->dock_eth_reset < 0) { dev_err(dock->dev, "unable to get dock-eth-reset-gpio\n"); return dock->dock_eth_reset; } } else { ret = devm_gpio_request(dock->dev, dock->dock_eth_reset, "dock_eth_reset"); if (ret) return ret; } dock->dock_enable = of_get_named_gpio(node, "qcom,dock-enable-gpio", 0); if (dock->dock_enable < 0) { /* optional */ Loading Loading
Documentation/devicetree/bindings/misc/qcom-liquid-dock.txt +4 −4 Original line number Diff line number Diff line Loading @@ -11,12 +11,12 @@ Required properties: also supported but deprecated. - qcom,dock-detect-gpio: phandle to a GPIO node corresponding to the input signal indicating when the dock is connected - qcom,dock-hub-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the USB ports - qcom,dock-eth-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the Ethernet ports - qcom,usb-host: phandle to the USB host controller connected to the dock port Optional properties: - qcom,dock-enable-gpio: phandle to a GPIO node corresponding to the output signal that turns on/off power to the ports - qcom,dock-hub-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the USB ports - qcom,dock-eth-reset-gpio: phandle to a GPIO node corresponding to the output signal that resets the Ethernet ports
drivers/misc/qcom_liquid_dock.c +19 −15 Original line number Diff line number Diff line Loading @@ -82,7 +82,9 @@ static void dock_detected_work(struct work_struct *w) if (docked) { /* assert RESETs before turning on power */ if (dock->dock_hub_reset >= 0) gpio_direction_output(dock->dock_hub_reset, 1); if (dock->dock_eth_reset >= 0) gpio_direction_output(dock->dock_eth_reset, 1); if (device_attach(&dock->usb3_pdev->dev) != 1) { Loading @@ -95,7 +97,9 @@ static void dock_detected_work(struct work_struct *w) gpio_direction_output(dock->dock_enable, 1); msleep(20); /* short delay before de-asserting RESETs */ if (dock->dock_hub_reset >= 0) gpio_direction_output(dock->dock_hub_reset, 0); if (dock->dock_eth_reset >= 0) gpio_direction_output(dock->dock_eth_reset, 0); } else { device_release_driver(&dock->usb3_pdev->dev); Loading Loading @@ -153,25 +157,25 @@ static int liquid_dock_probe(struct platform_device *pdev) "qcom,dock-hub-reset-gpio", 0); if (dock->dock_hub_reset < 0) { dev_err(dock->dev, "unable to get dock-hub-reset-gpio\n"); return dock->dock_hub_reset; } } else { ret = devm_gpio_request(dock->dev, dock->dock_hub_reset, "dock_hub_reset"); if (ret) return ret; } dock->dock_eth_reset = of_get_named_gpio(node, "qcom,dock-eth-reset-gpio", 0); if (dock->dock_eth_reset < 0) { dev_err(dock->dev, "unable to get dock-eth-reset-gpio\n"); return dock->dock_eth_reset; } } else { ret = devm_gpio_request(dock->dev, dock->dock_eth_reset, "dock_eth_reset"); if (ret) return ret; } dock->dock_enable = of_get_named_gpio(node, "qcom,dock-enable-gpio", 0); if (dock->dock_enable < 0) { /* optional */ Loading