PMIC/producer driver interface
The producer is the device generating the regulated voltage or current. The name of such a device is PMIC and it can be used for power sequencing, battery management, DC-to-DC conversion, or simple power switches (on/off). It regulates the output power from the input power, with the help of (and under) software control.
It deals with regulator drivers, and especially the producer PMIC side, which requires a few headers:
#include <linux/platform_device.h> #include <linux/regulator/driver.h> #include <linux/regulator/of_regulator.h>
Driver data structures
We will start with a short walkthrough of data structures used by the regulator framework. Only the producer interface is described in this section.
Description structure
The kernel describes every regulator provided by a PMIC by means of a struct regulator_desc
structure, which characterizes a regulator. By regulator, I mean any independent regulated output. For example, the ISL6271A from Intersil...