LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mattias Wallin <mattias.wallin@stericsson.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: Arun MURTHY <arun.murthy@stericsson.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus WALLEIJ <linus.walleij@stericsson.com>,
	Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Subject: Re: [PATCH] mfd: ab8500-gpadc Add new GPADC driver
Date: Wed, 2 Feb 2011 09:15:07 +0100	[thread overview]
Message-ID: <4D49128B.9030403@stericsson.com> (raw)
In-Reply-To: <20110201113617.GB10128@sortiz-mobl>

On 02/01/2011 12:36 PM, Samuel Ortiz wrote:
> As subdevices, I expect users to have an ab8500 pointer. So it would just be
> one dereference.
I do not want users to have or use the ab8500 pointer at all. I would 
like to move it from the .h file into the ab8500-core.c eventually.

> As I'm not familiar with your HW architecture, could you please describe how
> those accessories would wire into the ab8500 core ?
The accessories can for example be a simple phone headset, a carkit and 
so on. A headset wire into the 3.5mm plug and gpadc can be used to 
understand whats plugged in. Our analog baseband chip ab8500 is a 
container of subfunctionality like audio codec, digital encoder, voltage 
regulators and so on.
The idea behind ab8500-core driver is to provide register access and 
interrupt management to the subdrivers implementing the 
subfunctionality. The gpadc driver is one these subdrivers. A headset 
driver becomes a subdriver of the gpadc wich is a subdriver to 
ab8500-core so the question is how far we should enforce these hierarchy 
of drivers.
In my opinion the line goes here. The gpadc provides a service to 
convert. Open for not only subdrivers and the rational is to reduce 
complexity.
> If those devices really are independent drivers (i.e. not subdevices) needing
> to get an A/D conversion from the ab8500 adc (I don't see how that can happen,
> hence my above question), then it might make sense to use a conversion API
> independent from any ab8500 pointer. But otherwise, I prefer this API rather
> than the one in v2 of this patch.
You are absolutely right that really independent drivers of ab8500 will 
probably not be found and I understand your argument. But many parts in 
our platform have connections to ab8500 via regulators, clocks or other 
wires. The decision is instead based on design to reduce complexity. If 
a driver uses direct register access to ab8500 then it should be a 
subdriver (to enforce startup order for example) otherwise is is not 
required (in my oppinion). An accessory driver should easily be ported 
from other platforms and not be tied to ab8500.

Me and Arun got some feedback to keep our discussion internal first so 
sorry for keeping you out the last mails but the result is patch v2.

Thanks and regards,
Mattias Wallin

      reply	other threads:[~2011-02-02  8:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 10:28 Arun Murthy
2011-01-20 12:37 ` Mattias Wallin
2011-01-21 10:31   ` Arun MURTHY
2011-01-21 12:07     ` Mattias Wallin
2011-01-24  3:37       ` Arun MURTHY
2011-02-01 11:36       ` Samuel Ortiz
2011-02-02  8:15         ` Mattias Wallin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D49128B.9030403@stericsson.com \
    --to=mattias.wallin@stericsson.com \
    --cc=arun.murthy@stericsson.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=srinidhi.kasagar@stericsson.com \
    --subject='Re: [PATCH] mfd: ab8500-gpadc Add new GPADC driver' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).