From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752405AbbJZPr6 (ORCPT ); Mon, 26 Oct 2015 11:47:58 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:34461 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751590AbbJZPr4 (ORCPT ); Mon, 26 Oct 2015 11:47:56 -0400 Subject: Re: [PATCH v4 4/5] regulator: tps65912: Add regulator driver for the TPS65912 PMIC To: Mark Brown References: <1443731874-21362-1-git-send-email-afd@ti.com> <1443731874-21362-5-git-send-email-afd@ti.com> <20151022164724.GZ8232@sirena.org.uk> <562A2C2F.1020808@ti.com> <20151023231822.GQ29919@sirena.org.uk> <562ACCCC.503@ti.com> <20151024221457.GS29919@sirena.org.uk> <562D3F77.5040205@ti.com> <20151026004320.GU29919@sirena.org.uk> CC: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Alexandre Courbot , Grygorii Strashko , , From: "Andrew F. Davis" Message-ID: <562E4B1D.4060205@ti.com> Date: Mon, 26 Oct 2015 10:47:41 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151026004320.GU29919@sirena.org.uk> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/25/2015 07:43 PM, Mark Brown wrote: > On Sun, Oct 25, 2015 at 03:45:43PM -0500, Andrew F. Davis wrote: >> On 10/24/2015 05:14 PM, Mark Brown wrote: > >>> Tbe binding document is buggy and doesn't reflect the code, there's no >>> compatible string in the driver. > >> Sure there is: > >> drivers/mfd/mt6397-core.c:48: >> .of_compatible = "mediatek,mt6397-regulator", > > This is in the MFD, this is not used in actual systems. > Not sure what you mean by "actual systems", it looks like these use it?: arch/arm/boot/dts/mt8135-evbp1.dts arch/arm64/boot/dts/mediatek/mt8173-evb.dts >> Then mfd_add_devices uses this to find the regulator node and fill >> in .of_node, then in the regulator driver: > >> drivers/regulator/mt6397-regulator.c:48: >> .of_match = of_match_ptr(match), > >> which uses your helper to match the nodes in the filled in .of_node. > > This is in a regulator definition, it is using the regulator framework > support for parsing DT which must be used by modern drivers. It is not > part of how the Linux driver model device is instantiated, that is done > using the struct platform_driver which is what we are talking about > here. > I understand this, I thought we are talking about compatible strings in the regulator sub-node, not how the core instantiates the sub-driver. > Please stop this, it is getting very tiresome. > Sorry about that, I'm really not trying to prolong this, but I don't know what you want. New multifunction devices have compatible strings in their DT sub-nodes, the framework even helps support this (.of_compatible in struct mfd_cell), I'm not doing anything new here.