of: provide of_platform_unpopulate()
Hello Sebastian,
------- Original Message -------
Sender : Sebastian Andrzej Siewior<[email protected]>
Date : Jul 22, 2013 13:55 (GMT+05:30)
Title : Re: [PATCH] of: provide of_platform_unpopulate()
Quoted 1 line · NAVEEN KRISHNA CHATRADHI
Hello Sebastian,
Hello Naveen,
Quoted 14 lines
I just did one more testing.
In case of
iio/adc/exynos_adc.cthere is a bug in the remove path. If I fix the bug in the driver, with below patchdrivers/iio/adc/exynos_adc.c +0
-2@@ -375,14 +375,14 @@ static int exynos_adc_remove(struct platform_device *pdev)struct iio_dev *indio_dev =platform_get_drvdata (pdev);struct exynos_adc *info =iio_priv (indio_dev); -device_for_each_child (&pdev->dev,NULL , - exynos_adc_remove_devices);
drivers/iio/adc/exynos_adc.c static int exynos_adc_remove(struct platform_device *pdev) · line 387
Quoted 10 lines
drivers/iio/adc/exynos_adc.c +2
-0regulator_disable (info->vdd);clk_disable_unprepare (info->clk);writel (0 , info->enable_reg);iio_device_unregister (indio_dev);free_irq (info->irq, info);iio_device_free (indio_dev); +device_for_each_child (&pdev->dev,NULL , + exynos_adc_remove_devices); Even without your fix, I could configure it as a module and the rmmod, insmod are working fine. (no crash)
I have no idea why you moved it. I haven't found any .dts with this
regulator_disable(info->vdd);
has to happen before we free and remove the devices.
The dts part is not upstreamed yet.
binding but from the binding document I would assume that you do not
have any memory resources and therefore you don't see that crash.
Yes, my devices under ADC are 3rd party thermistors and they don't have memory resources. May be your explanation seems right.
Thanks,
Naveen
Quoted 2 lines
drivers/iio/adc/exynos_adc.c +0
-0Regards,Naveen
Sebastian