What the mfd_cell structure describes in the Linux kernel driver. Is this a description of assistive devices or a node hierarchy for sub-devices

I am trying to understand the mfd structure in the linux kernel for writing drivers, but there seems to be hardly any documentation, and the mfd kernel itself does not have many useful comments. So, I'm trying to understand what the mfd_cell structure describes. This, apparently, is the foundation here. What I am particularly interested in knowing is that it is used as a general abstraction for the "x" number of sub-devices or is it intended / useful for a complete hierarchy of sub-devices.

+4
source share
1 answer

MFD is a device that contains several sub-devices. For example, in embedded systems, PMIC typically contains a battery manager, a charger, and sometimes devices with unrelated functions such as USB PHY, audio codec, real-time clock, ...

The cell is intended to describe the sub-device. The mfd subsystem will use the information registered in this structure to create a platform device for each sub-device along with platform_data parameters for the sub-device. You can specify more complex things, such as resources used by this device, and suspend resume operations (call from the driver for a sub-device).

The new platform devices that will be created will have a cell structure as their platform data and can access real platform data through cell->platform_data .

+4
source

All Articles