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

Commit 8ced075a authored by David Collins's avatar David Collins
Browse files

spmi: add PM855B PMIC simulator



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

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

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

Supported Properties:

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

- qcom,sid-offset
	Usage:      required
	Value type: <u32>
	Definition: Global slave ID (SID) offset of PM855B 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:

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

config PM855B_PMIC_SIMULATOR
	tristate "Qualcomm Technologies, Inc. PM855B PMIC Simulator"
	help
	  The PM855B PMIC Simulator configures the read/write permissions of all
	  PM855B 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
@@ -3,3 +3,4 @@
#
obj-$(CONFIG_SPMI_SIMULATOR)	+= spmi-sim.o
obj-$(CONFIG_PM855_PMIC_SIMULATOR)	+= pm855-sim.o
obj-$(CONFIG_PM855B_PMIC_SIMULATOR)	+= pm855b-sim.o
+1514 −0

File added.

Preview size limit exceeded, changes collapsed.