From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stanimir Varbanov Subject: Re: [RFC PATCH 0/6] Support for QPNP PMIC's Date: Thu, 26 Jun 2014 18:12:06 +0300 Message-ID: <53AC3846.9010808@mm-sol.com> References: <1403266885-911-1-git-send-email-svarbanov@mm-sol.com> <20140624223604.GB10905@sonymobile.com> <53AAAD61.3020605@mm-sol.com> <20140625180415.GC10905@sonymobile.com> <20140625212811.GD10905@sonymobile.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from ns.mm-sol.com ([37.157.136.199]:55661 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbaFZPMJ (ORCPT ); Thu, 26 Jun 2014 11:12:09 -0400 In-Reply-To: <20140625212811.GD10905@sonymobile.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Courtney Cavin Cc: Rob Herring , Grant Likely , Greg Kroah-Hartman , "linux-arm-msm@vger.kernel.org" , "Ivan T. Ivanov" , Josh Cartwright , Stephen Boyd On 06/26/2014 12:28 AM, Courtney Cavin wrote: > On Wed, Jun 25, 2014 at 11:18:57PM +0200, Rob Herring wrote: >> On Wed, Jun 25, 2014 at 1:04 PM, Courtney Cavin >> wrote: >>> On Wed, Jun 25, 2014 at 01:07:13PM +0200, Stanimir Varbanov wrote: >>>> On 06/25/2014 01:36 AM, Courtney Cavin wrote: >>> Greg, Grant, Rob? What's the law? >> >> Generally sub-blocks of a device are handled as platform devices. If >> there is a good enough reason then creating a new device type may be >> okay, but we certainly wouldn't want every PMIC or MFD driver to go >> off and define their own bus. Probably not each vendor doing a bus >> either. > > Thanks for the clarification! OK, I tend to agree that creating a new bus only to define new device type is pointless. But using platform devices for sub-blocks attached to spmi-bus seems wrong too. Courtney, the other option could be to extend spmi.c::of_spmi_register_devices to create spmi_device for each sub-function per each slave. Currently the function creates devices only for every spmi slave. Thus every sub-function driver will be spmi_driver (something like i2c_driver for example). Sub-function resources could be embedded in spmi_device structure. I'm not sure how much code/efforts will be needed but it seems it is worth to do. Any thoughts? -- regards, Stan