mirror of https://gitee.com/openkylin/linux.git
greybus: arche-platform: Do not export any gpios
With addition of operational state in driver, user/developer can switch to FW flashing state through sysfs. So no need to export any gpios to userspace now. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
fd60ac5856
commit
b032493908
|
@ -123,19 +123,6 @@ static void svc_delayed_work(struct work_struct *work)
|
||||||
gpio_direction_output(arche_pdata->wake_detect_gpio, 1);
|
gpio_direction_output(arche_pdata->wake_detect_gpio, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Export gpio's to user space */
|
|
||||||
static void export_gpios(struct arche_platform_drvdata *arche_pdata)
|
|
||||||
{
|
|
||||||
gpio_export(arche_pdata->svc_reset_gpio, false);
|
|
||||||
gpio_export(arche_pdata->svc_sysboot_gpio, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unexport_gpios(struct arche_platform_drvdata *arche_pdata)
|
|
||||||
{
|
|
||||||
gpio_unexport(arche_pdata->svc_reset_gpio);
|
|
||||||
gpio_unexport(arche_pdata->svc_sysboot_gpio);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdata)
|
static int arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -383,8 +370,6 @@ static int arche_platform_probe(struct platform_device *pdev)
|
||||||
INIT_DELAYED_WORK(&arche_pdata->delayed_work, svc_delayed_work);
|
INIT_DELAYED_WORK(&arche_pdata->delayed_work, svc_delayed_work);
|
||||||
schedule_delayed_work(&arche_pdata->delayed_work, msecs_to_jiffies(2000));
|
schedule_delayed_work(&arche_pdata->delayed_work, msecs_to_jiffies(2000));
|
||||||
|
|
||||||
export_gpios(arche_pdata);
|
|
||||||
|
|
||||||
dev_info(dev, "Device registered successfully\n");
|
dev_info(dev, "Device registered successfully\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -407,7 +392,6 @@ static int arche_platform_remove(struct platform_device *pdev)
|
||||||
device_for_each_child(&pdev->dev, NULL, arche_remove_child);
|
device_for_each_child(&pdev->dev, NULL, arche_remove_child);
|
||||||
arche_platform_poweroff_seq(arche_pdata);
|
arche_platform_poweroff_seq(arche_pdata);
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
unexport_gpios(arche_pdata);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue