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

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

spmi: add PM855 PMIC simulator



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

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

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

Supported Properties:

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

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

pm855-sim {
	compatible = "qcom,pm855-sim";
	qcom,spmi-sim = <&spmi_sim>;
	qcom,sid-offset = <0>;
};
+8 −0
Original line number Diff line number Diff line
@@ -11,4 +11,12 @@ menuconfig SPMI_SIMULATOR

if SPMI_SIMULATOR

config PM855_PMIC_SIMULATOR
	tristate "Qualcomm Technologies, Inc. PM855 PMIC Simulator"
	help
	  The PM855 PMIC Simulator configures the read/write permissions of all
	  PM855 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
@@ -2,3 +2,4 @@
# Makefile for kernel SPMI Simulator.
#
obj-$(CONFIG_SPMI_SIMULATOR)	+= spmi-sim.o
obj-$(CONFIG_PM855_PMIC_SIMULATOR)	+= pm855-sim.o
+2933 −0

File added.

Preview size limit exceeded, changes collapsed.