From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193AbcBOGyr (ORCPT ); Mon, 15 Feb 2016 01:54:47 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57128 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbcBOGyp (ORCPT ); Mon, 15 Feb 2016 01:54:45 -0500 X-AuditID: cbfec7f4-f79026d00000418a-c1-56c17632746d Subject: Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of subsys initcall To: Javier Martinez Canillas , linux-kernel@vger.kernel.org References: <1455251419-8919-1-git-send-email-javier@osg.samsung.com> <1455251419-8919-3-git-send-email-javier@osg.samsung.com> Cc: Andi Shyti , linux-samsung-soc@vger.kernel.org, Lee Jones , Laxman Dewangan From: Krzysztof Kozlowski X-Enigmail-Draft-Status: N1110 Message-id: <56C1762E.9040208@samsung.com> Date: Mon, 15 Feb 2016 15:54:38 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-version: 1.0 In-reply-to: <1455251419-8919-3-git-send-email-javier@osg.samsung.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t/xq7pGZQfDDNZf4LHYfuQZq8Wbt2uY LF6/MLRYum81i8X9r0cZLS7vmsNmMeP8PiYHdo871/awefQ2v2Pz2NJ/l92jb8sqRo/Pm+QC WKO4bFJSczLLUov07RK4Mnp6p7AUnOSsWDX3LHsD4w32LkZODgkBE4kJr5czQthiEhfurWfr YuTiEBJYyiix691rNpCEkMBTRom5P5S7GDk4hAViJF51O4KERQRCJf5dvM0IUd/IKHF12WF2 EIdZYBqQM/cS2FQ2AWOJzcuXsEFskJPo7Z7EAjKIV0BLYsNBLhCTRUBVYl9zHkiFqECExOHO LrDbeAUEJX5MvscCYnMKuEl0HlzNBlLOLKAncf+iFkiYWUBeYvOat8wTGAVnIemYhVA1C0nV AkbmVYyiqaXJBcVJ6bmGesWJucWleel6yfm5mxghQf9lB+PiY1aHGAU4GJV4eCPOHAgTYk0s K67MPcQowcGsJMLrl34wTIg3JbGyKrUoP76oNCe1+BCjNAeLkjjv3F3vQ4QE0hNLUrNTUwtS i2CyTBycUg2MzBs0F95e1VsnyP9u8uc/wRHcKWf+i16I+pB6V+712ekJjguFrf7sjXhhbWv8 sXiXf8+6tykLLG9PXdK78tlp9z1nm9utyk+q1T3Ykjzr8CEG6XYj6zduj5KmZVxgFaiZ+b7t WCdbxNGbBfynuf1+zTqiL8Hx00h2abpS1j0bBSZ7bZUnC2qWKbEUZyQaajEXFScCALrhG812 AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12.02.2016 13:30, Javier Martinez Canillas wrote: > The driver's init and exit function don't do anything besides adding and > deleting the I2C driver so the module_i2c_driver() macro could be used. > > Currently is not being used because the driver is initialized at subsys > initcall level, claiming that this is done to allow consumers devices to > use the resources provided by this driver. But dependencies should be in > the DT and consumers drivers should not rely in the registration order. > > Signed-off-by: Javier Martinez Canillas > --- > > drivers/mfd/max77686.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > In the past not all dependencies supported deferred probing so such ordering was required. I don't like the "dependencies should be in DT" reason for the change... because it is kind of wishful thinking. Yeah, the dependencies should be in DT, but are they? Instead *please check it* and write: "Dependencies are in DT so manual ordering of init calls is not necessary any more". My fast tests of this patch shown that it works good... but some more thorough tests should be done. Best regards, Krzysztof