From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [RFC PATCH] mfd: pm8x41: Naive function devices registration Date: Fri, 25 Apr 2014 08:43:59 -0500 Message-ID: References: <1398429171-8566-1-git-send-email-iivanov@mm-sol.com> <1398432541.4724.243.camel@iivanov-dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-ve0-f177.google.com ([209.85.128.177]:59250 "EHLO mail-ve0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751891AbaDYNoA (ORCPT ); Fri, 25 Apr 2014 09:44:00 -0400 In-Reply-To: <1398432541.4724.243.camel@iivanov-dev> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: "Ivan T. Ivanov" Cc: Courtney Cavin , Josh Cartwright , Samuel Ortiz , Lee Jones , "linux-kernel@vger.kernel.org" , linux-arm-msm On Fri, Apr 25, 2014 at 8:29 AM, Ivan T. Ivanov wrote: > On Fri, 2014-04-25 at 08:00 -0500, Rob Herring wrote: >> On Fri, Apr 25, 2014 at 7:32 AM, Ivan T. Ivanov wrote: >> > From: "Ivan T. Ivanov" >> > >> > Currently functions that exist in both the controller at the >> > same address offset can not be specified with the same names. >> > >> > Adding Unique Slave ID device address to prefix function >> > device names fixes this. >> > >> > Function devices are SPMI devices, so register them on >> > SPMI bus. >> > >> > Signed-off-by: Ivan T. Ivanov >> > --- >> > drivers/mfd/pm8x41.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++---- >> >> No, this should be fixed in the core, not the driver. > > I think that at core level they are no issues. By core, I mean the device naming conventions used by the DT platform device code. There is a problem and it should be handled. As I mentioned in the other thread, either we should not use the address on non-translatable addresses like this or append the parent address. > There is no name clashes with "top level" devices. > > spmi@...{ > ... > child@0 { > compatible = "qcom,pm8941"; > reg = <0x0 SPMI_USID>; > > #address-cells = <1>; > #size-cells = <0>; > > revid@100 { > compatible = "qcom,qpnp-revid"; > reg = <0x100>; > }; > }; > > child@4 { > compatible = "qcom,pm8841"; > reg = <0x4 SPMI_USID>; > > #address-cells = <1>; > #size-cells = <0>; > > revid@100 { > compatible = "qcom,qpnp-revid"; > reg = <0x100>; > }; > }; > }; > > I don't have experience with SPMI devices, but it looks > like address partitioning is specific to this "PMIC" > controllers. > > Regards, > Ivan > >> >> Rob > >