Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751472AbdFIAAI (ORCPT ); Thu, 8 Jun 2017 20:00:08 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:33125 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbdFIAAG (ORCPT ); Thu, 8 Jun 2017 20:00:06 -0400 MIME-Version: 1.0 X-Originating-IP: [90.68.25.6] In-Reply-To: References: <20170607103242.16008-1-enric.balletbo@collabora.com> <20170607103242.16008-4-enric.balletbo@collabora.com> <6359abe2-9a21-78a2-f5ea-87e2e3335af3@ti.com> <578f348c-509f-79d3-9770-73c9fcffe19c@ti.com> From: Javier Martinez Canillas Date: Fri, 9 Jun 2017 02:00:01 +0200 Message-ID: Subject: Re: [PATCH 4/4] mfd: tps65217: Instantiate sub-devices from device tree To: Grygorii Strashko Cc: Enric Balletbo Serra , Mark Brown , Dmitry Torokhov , Lee Jones , Rob Herring , Tony Lindgren , Enric Balletbo i Serra , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-omap@vger.kernel.org" , linux-kernel , linux-leds@vger.kernel.org, linux-input@vger.kernel.org, Daniel Thompson , Jingoo Han , Richard Purdie , Jacek Anaszewski , Pavel Machek , Mark Rutland , Russell King Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1588 Lines: 39 Hello Grygorii, [snip] >> >> For tps65218 couldn't instead of using mfd_add_devices() for all the >> sub-devs, had used of_platform_populate() for the ones that have >> device nodes and mfd_add_devices() only for the "tps65218-regulator"? >> >> The commit talks about nodes without compatibles but's actually about >> sub-devices without an associated device node. For me it makes sense >> to use of_platform_populate() when the MFD has device nodes for their >> sub-devices and mfd_add_devices() when DT knows nothing about the >> sub-devices. > > FYI. Below is link discussion I'm referring to between Mark Brown and Andrew F. Davis > https://lkml.org/lkml/2015/10/22/823 > the same - https://groups.google.com/forum/#!topic/linux.kernel/wQsdSpPMroQ > Thanks a lot for the pointer. There's a subtle difference between the argument you made and the one that Mark is making in this thread though. Because you said (sorry if I misunderstood) that mfd_add_devices() should be used instead of of_device_populate() even when sub-devices are described as DT nodes (as is the case in the commit you shared) while Mark is saying that if the sub-devs IP blocks are part of the MFD, then it shouldn't be exposed in the DT and be instantiated via mfd_add_devices() and I absolutely agree with that. So I was arguing for using of_device_populate() if the sub-devices are described in the DT. If that makes sense or not to expose the sub-devices in the DT for this particular driver is a different discussion and I can't comment on that since I'm not familiar with the HW. Best regards, Javier