All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about MFD devices.
@ 2011-05-23  7:43 jocke at holstenhof.se
  0 siblings, 0 replies; 3+ messages in thread
From: jocke at holstenhof.se @ 2011-05-23  7:43 UTC (permalink / raw)
  To: kernelnewbies

Hi!

I'm trying to do a simple driver on an embedded (ARM) system that needs to
access some functionality in an MFD device. I've deducted that my driver
needs to be integrated into the MFD device structure, otherwise I won't
really be able to access the required functions.

I've been trying to figure out why we have these MFD devices, but I don't
see the logic behind them.

To me, they mailny seem to duplicate the standard kernel driver structure,
and it doesn't seem like the provided functionality should be used
in-kernel.

I guess that my conclusion are way wrong, so I hope that someone on the
list can enlighten me about this.

BRs,
/Jocke!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about MFD devices.
  2011-05-26 15:26 Joachim Holst
@ 2011-05-27 15:17 ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-05-27 15:17 UTC (permalink / raw)
  To: Joachim Holst; +Cc: linux-kernel

On Thu, May 26, 2011 at 05:26:24PM +0200, Joachim Holst wrote:

> In the process, I've been trying to figure out when these MFD devices are
> supposed to be used, but I don't see the logic behind them as of yet.
> Currently it seems to me that "if a chip has more than one function, it's
> an MFD" no matter what type of functions the chip supplies.

Yes.

> To me, MFD seems to somewhat duplicate the standard kernel driver
> structure, most implementations I've seen make it rather difficult to use
> exported interfaces without integrating your driver into the structure.

Right, and MFD driver is all about sharing the resources of a chip
between the various subsystems in Linux that implement the functionality
of the chip.  This means that the various subfunctions often know quite
a bit about how the core works.

> Personally, I really don't think that a simple driver that toggles a GPIO
> X times based on an ADC value should be integrated into an MFD device
> structure. A misc device seems a bit more appropriate for this.

This doesn't seem like an MFD to me - an MFD is more about sharing the
resources on a chip than pulling things together, that sounds like
taking multiple resources on the chip and gluing them together into a
single driver.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Question about MFD devices.
@ 2011-05-26 15:26 Joachim Holst
  2011-05-27 15:17 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Joachim Holst @ 2011-05-26 15:26 UTC (permalink / raw)
  To: linux-kernel

Hi List!

Sorry to bother you with a somewhat stupid newbie question, but I've
already tried this one on the "kernel-newbies" list without a reply :-(

I'm trying to do a simple driver on an embedded (ARM) system that needs to
access some functionality in an MFD device. I've deducted that my driver
needs to be integrated into the MFD device structure, otherwise I won't
really be able to access the required functions.

In the process, I've been trying to figure out when these MFD devices are
supposed to be used, but I don't see the logic behind them as of yet.
Currently it seems to me that "if a chip has more than one function, it's
an MFD" no matter what type of functions the chip supplies.

To me, MFD seems to somewhat duplicate the standard kernel driver
structure, most implementations I've seen make it rather difficult to use
exported interfaces without integrating your driver into the structure.

Personally, I really don't think that a simple driver that toggles a GPIO
X times based on an ADC value should be integrated into an MFD device
structure. A misc device seems a bit more appropriate for this.

I guess that my conclusion are way wrong, so I hope that someone on the
list can enlighten me about this.

BRs,
/Jocke!



-- 
If it can't be fixed with duct-tape, it's definitely borken...


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-27 15:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23  7:43 Question about MFD devices jocke at holstenhof.se
2011-05-26 15:26 Joachim Holst
2011-05-27 15:17 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.