Re: Question about MFD devices.

From: Mark Brown
Date: Fri May 27 2011 - 11:17:52 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/