From: Courtney Cavin Subject: Re: [RFC PATCH 0/6] Support for QPNP PMIC's Date: Tue, 24 Jun 2014 15:36:04 -0700 Message-ID: <20140624223604.GB10905@sonymobile.com> References: <1403266885-911-1-git-send-email-svarbanov@mm-sol.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Received: from seldrel01.sonyericsson.com ([212.209.106.2]:14851 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbaFXWdk (ORCPT ); Tue, 24 Jun 2014 18:33:40 -0400 Content-Disposition: inline In-Reply-To: <1403266885-911-1-git-send-email-svarbanov@mm-sol.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Stanimir Varbanov Cc: "linux-arm-msm@vger.kernel.org" , "Ivan T. Ivanov" , Josh Cartwright , Stephen Boyd On Fri, Jun 20, 2014 at 02:21:19PM +0200, Stanimir Varbanov wrote: > Hello to all, > > The goal of this WIP set is to provide support for sub-functional > hw blocks inside Qualcomm QPNP PMIC chips by creating a new qpnp > bus (device-driver modeled). On SPMI interface we attach a so called > Slaves. For example one PMIC chip like pm8941 has two slave id's. On > every slaveid the PMIC chip has various peripherials. Every peripheral > driver should expose qpnp_driver structure and implement the .probe > and .remove callbacks. Every peripheral driver will reside on the > proper place in /drivers directory. > > The fisrt patch describes the devicetree binding of the slave devices > attached to the SPMI interface. The second patch adds implemetation of > the qpnp-bus and a layer connection with the SPMI interface. The third > patch adds spmi arbiter and underlying slaveid devicetree nodes for > msm8974 SoC. The other patches are example of rtc-qpnp driver and > binding documentation. > > Since this set is a WIP, it will be used as a starting point for future > duscussions about implementing QPNP PMIC sub-function hw blocks. Ok. I have a few critical problems with this approach to implementing support for the PMICs: - It's *way* more code than needed if done with of_platform_populate() - AFAICT, the only direct relation between this and 'QPNP' is the 256 byte block size, which I would argue can be clearly expressed in DT instead with #size-cells == 1, and #address-cells == 1 - The resource code from drivers/{base,of}/platform.c is reimplemented here, without any added benefit What am I missing? -Courtney