|
@@ -550,6 +550,14 @@ static int gpio_fan_probe(struct platform_device *pdev)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void gpio_fan_shutdown(struct platform_device *pdev)
|
|
|
|
+{
|
|
|
|
+ struct gpio_fan_data *fan_data = dev_get_drvdata(&pdev->dev);
|
|
|
|
+
|
|
|
|
+ if (fan_data->ctrl)
|
|
|
|
+ set_fan_speed(fan_data, 0);
|
|
|
|
+}
|
|
|
|
+
|
|
#ifdef CONFIG_PM_SLEEP
|
|
#ifdef CONFIG_PM_SLEEP
|
|
static int gpio_fan_suspend(struct device *dev)
|
|
static int gpio_fan_suspend(struct device *dev)
|
|
{
|
|
{
|
|
@@ -581,6 +589,7 @@ static SIMPLE_DEV_PM_OPS(gpio_fan_pm, gpio_fan_suspend, gpio_fan_resume);
|
|
|
|
|
|
static struct platform_driver gpio_fan_driver = {
|
|
static struct platform_driver gpio_fan_driver = {
|
|
.probe = gpio_fan_probe,
|
|
.probe = gpio_fan_probe,
|
|
|
|
+ .shutdown = gpio_fan_shutdown,
|
|
.driver = {
|
|
.driver = {
|
|
.name = "gpio-fan",
|
|
.name = "gpio-fan",
|
|
.pm = GPIO_FAN_PM,
|
|
.pm = GPIO_FAN_PM,
|