if (!pdata) {
dev_dbg(&pdev->dev, "missing platform data\n");
} else {
+ /*
+ * if we have no gpio to control external PLL, we are using
+ * the internal clock.
+ */
if (pdata->phy_init)
- pdata->phy_init(pdev, pdata->phy_type);
+ pdata->phy_init(pdev, pdata->phy_type,
+ gpio_is_valid(exynos->phyclk_gpio));
}
pm_runtime_set_active(&pdev->dev);
dev_dbg(dev, "entering runtime suspend\n");
- if (!pdata) {
- dev_dbg(&pdev->dev, "missing platform data\n");
- } else {
- if (pdata->phyclk_switch)
- pdata->phyclk_switch(pdev, false);
- }
+ if (gpio_is_valid(exynos->phyclk_gpio)) {
+ if (!pdata) {
+ dev_dbg(&pdev->dev, "missing platform data\n");
+ } else {
+ if (pdata->phyclk_switch)
+ pdata->phyclk_switch(pdev, false);
+ }
- if (gpio_is_valid(exynos->phyclk_gpio))
gpio_set_value(exynos->phyclk_gpio, 0);
+ }
return 0;
}
* and cross our fingers that it's enough.
*/
msleep(10);
- }
- if (!pdata) {
- dev_dbg(&pdev->dev, "missing platform data\n");
- } else {
- if (pdata->phyclk_switch)
- pdata->phyclk_switch(pdev, true);
+ if (!pdata) {
+ dev_dbg(&pdev->dev, "missing platform data\n");
+ } else {
+ if (pdata->phyclk_switch)
+ pdata->phyclk_switch(pdev, true);
+ }
}
return 0;
dev_dbg(&pdev->dev, "missing platform data\n");
} else {
if (pdata->phy_init)
- pdata->phy_init(pdev, pdata->phy_type);
+ pdata->phy_init(pdev, pdata->phy_type,
+ gpio_is_valid(exynos->phyclk_gpio));
}
/* runtime set active to reflect active state. */