Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c208771b authored by David Collins's avatar David Collins
Browse files

spmi: add PM855L PMIC simulator



Add a PM855L PMIC simulator which simulates the read/write
permissions and default values of all PM855L SPMI registers.

Change-Id: Ibb3016ca3fb9c6776d3a3f088d552f9938af626a
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 8ced075a
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
PM855L PMIC Simulator

This device simulates the registers found within a Qualcomm Technologies, Inc.
PM855L PMIC chip.

Supported Properties:

- compatible
	Usage:      required
	Value type: <string>
	Definition: Must be "qcom,pm855l-sim".

- qcom,sid-offset
	Usage:      required
	Value type: <u32>
	Definition: Global slave ID (SID) offset of PM855L local SID 0.
		    Supported values: 0 - 14
		    Typical values: 0, 2, or 4

- qcom,spmi-sim
	Usage:      required
	Value type: <phandle>
	Definition: phandle of the spmi-sim bus device that the simulated PMIC
		    device should be used with.

Example:

pm855l-sim {
	compatible = "qcom,pm855l-sim";
	qcom,spmi-sim = <&spmi_sim>;
	qcom,sid-offset = <4>;
};
+8 −0
Original line number Diff line number Diff line
@@ -27,4 +27,12 @@ config PM855B_PMIC_SIMULATOR
	  in conjunction with the SPMI Controller Simulator to help test PMIC
	  peripheral drivers before physical PMIC chips are available.

config PM855L_PMIC_SIMULATOR
	tristate "Qualcomm Technologies, Inc. PM855L PMIC Simulator"
	help
	  The PM855L PMIC Simulator configures the read/write permissions of all
	  PM855L SPMI registers and loads default register values.  It is used
	  in conjunction with the SPMI Controller Simulator to help test PMIC
	  peripheral drivers before physical PMIC chips are available.

endif
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@
obj-$(CONFIG_SPMI_SIMULATOR)	+= spmi-sim.o
obj-$(CONFIG_PM855_PMIC_SIMULATOR)	+= pm855-sim.o
obj-$(CONFIG_PM855B_PMIC_SIMULATOR)	+= pm855b-sim.o
obj-$(CONFIG_PM855L_PMIC_SIMULATOR)	+= pm855l-sim.o