LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ben Dooks <ben@fluff.org>
To: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Questions regarding mfd drivers
Date: Mon, 4 Feb 2008 23:01:55 +0000	[thread overview]
Message-ID: <20080204230155.GD27399@fluff.org.uk> (raw)
In-Reply-To: <20080204123714.4be6e10c.Kristoffer.ericson@gmail.com>

On Mon, Feb 04, 2008 at 12:37:14PM +0100, Kristoffer Ericson wrote:
> Greetings,
> 
> Trying to wrap my head around sm501. From what I can tell an mfd driver is a "master" driver that takes control of all
> memory and io areas. It then hands out areas of those to drivers. Anywhere near correct?

Yes, it is the central management for these, but also ensures that any
of the sub-drivers have properly locked access to the clocks, gpio and
other shared resources.

The mfd driver for the sm501 exports a number of functions for the
sub drivers to use, you should be able to see what is exported easily
by the fact they are exported with EXPORT_SYMBOL_GPL(). The header
files should document basic functionality of this.
 
> I can see some benefit but still hard for me to motivate. What am I missing? What will the mfd be able to do, that I lack now?
> 
> The sm501 driver seems way more advanced than I will need for hd64461/hd64465 anyhow, but still need to understand sm501 completely before
> attempting to write one on my own. Anyone know any documentation aside from example drivers?

Are you trying to write your own SM501, or something else? It seems
you are writing for something else.

If the chip you are targetting has shared resources, such as clock
gates, PLLs, or gpio that other drivers need to touch, then the best
way to go is for an mfd driver to provide this functionality and have
all the child drivers use the exported functionality.

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

  reply	other threads:[~2008-02-04 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 11:37 Kristoffer Ericson
2008-02-04 23:01 ` Ben Dooks [this message]
2008-02-05 11:21   ` Kristoffer Ericson

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=20080204230155.GD27399@fluff.org.uk \
    --to=ben@fluff.org \
    --cc=kristoffer.ericson@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: Questions regarding mfd drivers' \
    /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).