From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752714Ab3IQLm0 (ORCPT ); Tue, 17 Sep 2013 07:42:26 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:16439 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340Ab3IQLmY (ORCPT ); Tue, 17 Sep 2013 07:42:24 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 17 Sep 2013 04:39:05 -0700 Message-ID: <5238450F.6090303@nvidia.com> Date: Tue, 17 Sep 2013 17:33:27 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: Mark Brown CC: "lee.jones@linaro.org" , "sameo@linux.intel.com" , "linus.walleij@linaro.org" , "akpm@linux-foundation.org" , "devicetree@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "rtc-linux@googlegroups.com" , "rob.herring@calxeda.com" , "mark.rutland@arm.com" , "pawel.moll@arm.com" , "swarren@wwwdotorg.org" , "rob@landley.net" , "ijc+devicetree@hellion.org.uk" , "grant.likely@linaro.org" , "florian.lobmaier@ams.com" Subject: Re: [PATCH 1/4] mfd: add support for AMS AS3722 PMIC References: <1379400338-20704-1-git-send-email-ldewangan@nvidia.com> <1379400338-20704-2-git-send-email-ldewangan@nvidia.com> <20130917112444.GU21013@sirena.org.uk> In-Reply-To: <20130917112444.GU21013@sirena.org.uk> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 17 September 2013 04:54 PM, Mark Brown wrote: > * PGP Signed by an unknown key > > On Tue, Sep 17, 2013 at 12:15:35PM +0530, Laxman Dewangan wrote: > >> +MFD driver adds following mfd devices with their compatible values: >> +as3722-gpio: The compatible value of this as3722 gpio driver is >> + "ams,as3722-gpio"; >> +as3722-regulator: The compatible value of this as3722 regulator driver is >> + "ams,as3722-regulator"; >> +as3722-rtc: The compatible value of this as3722 rtc driver is >> + "ams,as3722-rtc"; >> +as3722-adc: The compatible value of this as3722 adc driver is >> + "ams,as3722-adc"; >> +as3722-power-off: he compatible value of this as3722 power off driver is >> + "ams,as3722-power-off". > Personally I find this to be exposing implementation details of Linux - > unless there is something reusable about the binding that'd allow it to > be used to describe the contents of the chip the subnodes really aren't > adding any information that wasn't present from just knowing the parent > chip. If there were relocatable IPs it'd be a bit different. Ok, then can we fix the the sub node name and parse these when adding mfd devices and set the pdev->dev.of_node of child devices. Like parent_node { ... child1_node { ... }; child1_node { ... }; }; and fix the node name of child1 and child2 and have this as part of mfd-cell's of_node_name. So when we add the mfd devices, we look for these fixed name and if matches then set the dev->of_node for that child sub device. This will avoid the code for getting child node pointer from parent node in each driver. We fix the child node name in any case.