Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757056Ab3GVIi1 (ORCPT ); Mon, 22 Jul 2013 04:38:27 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:58574 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756936Ab3GVIhG (ORCPT ); Mon, 22 Jul 2013 04:37:06 -0400 X-AuditID: cbfee68f-b7f436d000000f81-ec-51ecef2e924a Date: Mon, 22 Jul 2013 08:37:02 +0000 (GMT) From: NAVEEN KRISHNA CHATRADHI Subject: Re: Re: [PATCH] of: provide of_platform_unpopulate() To: Sebastian Andrzej Siewior Cc: Rob Herring , Grant Likely , "linux-omap@vger.kernel.org" , "linux-samsung-soc@vger.kernel.org" , "devicetree-discuss@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , Tony Lindgren , Doug Anderson , Vivek Gautam , Kukjin Kim , Kishon Vijay Abraham I , Roger Quadros , George Cherian , Felipe Balbi Reply-to: ch.naveen@samsung.com MIME-version: 1.0 X-MTR: 20130722083454010@ch.naveen Msgkey: 20130722083454010@ch.naveen X-EPLocale: en_US.windows-1252 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-EPTrCode: X-EPTrName: X-MLAttribute: X-RootMTR: 20130722083454010@ch.naveen X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 Message-id: <23795036.212591374482218972.JavaMail.weblogic@epml23> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42JZI2JSrav3/k2gwfLlQhaXd81hc2D0+LxJ LoAxissmJTUnsyy1SN8ugSvj+JEzzAVHhCvmvb/N0sDYINzFyMkhJKAi8XfHdFYQW0LAROLp jG9sELaYxIV764FsLqCapYwSzUu62GGKDi2ZxA6RmM8osXPGIbBuFgFViasvF4MVsQmYS7w7 8Q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JY7d3MEGM55V4cj8YZszuzV/YIGwBialnDjJClKhLrG4U hAjzSaxZ+JYFZsquU8uZYVrvb5kLdg2zgKLElO6H7BC2gcSRRXNY0T3FK+AkcfZs4QRGuVlI MrOQdM9C0o2sZgEjyypG0dSC5ILipPQKY73ixNzi0rx0veT83E2M4NT0bPEOxv/nrQ8xCnAw KvHw3gh6EyjEmlhWXJl7iFGCg1lJhNdzFVCINyWxsiq1KD++qDQntfgQYzIw+iYyS4km5wPT Zl5JvKGxibmpsamFgaG5uRlpwkrivM9arQOFBNITS1KzU1MLUotgtjBxcEo1MDpte+qXFv3Y 0bEp6JjXq5bgzCeNMvwM85V7xU5Lqi955vE4ev/8t+yH98sfWcXTGScVOeVVxoJ73qvd+I9Z /Xz1dcvE6QLr7sV2uoZ7XDR4puAepqY308Z53f6f1kZJ9rO8eRZO2TNl66N0if0hhjGTfn04 wLSUJSv9lu2y+dtn36k48o/7MIsSS3FGoqEWc1FxIgDArFIKkQMAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id r6M8cXEl008533 Content-Length: 1982 Lines: 55 Hello Sebastian, ------- Original Message ------- Sender : Sebastian Andrzej Siewior Date : Jul 22, 2013 13:55 (GMT+05:30) Title : Re: [PATCH] of: provide of_platform_unpopulate() On 07/20/2013 07:42 AM, NAVEEN KRISHNA CHATRADHI wrote: > Hello Sebastian, Hello Naveen, > > I just did one more testing. > > In case of iio/adc/exynos_adc.c there is a bug in the remove path. > If I fix the bug in the driver, with below patch > > --- a/drivers/iio/adc/exynos_adc.c > +++ b/drivers/iio/adc/exynos_adc.c > @@ -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); > regulator_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 > Regards, > Naveen Sebastian ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?