Understanding Syscon and simple-mfd
Syscon stands for system controller. SoCs sometimes have a set of MMIO registers dedicated to miscellaneous features that don't relate to a specific IP. Clearly, there can't be a functional driver for this as these registers are neither representative nor cohesive enough to represent a specific type of device. The syscon driver handles this kind of situation. Syscon permits other nodes to access this register space through the regmap mechanism. It is actually just a set of wrapper APIs for regmap. When you request access to syscon, the regmap is created, if it doesn't exist yet.
The header required for using the syscon API is <linux/mfd/syscon.h>
. As this API is based on regmap, you must also include <linux/regmap.h>
. The syscon API is implemented in drivers/mfd/syscon.c
in the kernel source tree. Its main data structure is struct syscon
, though this structure is not to be used directly:
struct syscon { Â Â ...