From mboxrd@z Thu Jan 1 00:00:00 1970 From: Przemyslaw Marczak Date: Mon, 11 May 2015 09:33:47 +0200 Subject: [U-Boot] [PATCH 09/12] sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator In-Reply-To: References: <1431102040-745-1-git-send-email-p.marczak@samsung.com> <1431102040-745-10-git-send-email-p.marczak@samsung.com> Message-ID: <55505B5B.1090706@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, On 05/10/2015 03:57 PM, Simon Glass wrote: > Hi Przemyslaw, > > On 8 May 2015 at 10:20, Przemyslaw Marczak wrote: >> This commit adds emulation of sandbox PMIC device, which includes: >> - PMIC I2C emulation driver >> - PMIC I/O driver (UCLASS_PMIC) >> - PMIC regulator driver (UCLASS_REGULATOR) >> >> The sandbox PMIC has 12 significant registers and 4 as padding to 16 bytes, >> which allows using 'i2c md' command with the default count (16). >> >> The sandbox PMIC provides regulators: >> - 2x BUCK >> - 2x LDO >> >> Each, with adjustable output: >> - Enable state >> - Voltage >> - Current limit (LDO1/BUCK1 only) >> - Operation mode (different for BUCK and LDO) >> >> Each attribute has it's own register, beside the enable state, which depends >> on operation mode. >> >> The header file: sandbox_pmic.h includes PMIC's default register values, >> which are set on i2c pmic emul driver's probe() method. >> >> Signed-off-by: Przemyslaw Marczak >> --- >> doc/device-tree-bindings/pmic/sandbox.txt | 35 +++ >> doc/device-tree-bindings/regulator/sandbox.txt | 45 ++++ >> drivers/power/pmic/Kconfig | 25 ++ >> drivers/power/pmic/Makefile | 3 +- >> drivers/power/pmic/i2c_pmic_emul.c | 145 ++++++++++ >> drivers/power/pmic/sandbox.c | 79 ++++++ >> drivers/power/regulator/Kconfig | 30 +++ >> drivers/power/regulator/Makefile | 1 + >> drivers/power/regulator/sandbox.c | 355 +++++++++++++++++++++++++ >> include/power/sandbox_pmic.h | 189 +++++++++++++ >> 10 files changed, 906 insertions(+), 1 deletion(-) >> create mode 100644 doc/device-tree-bindings/pmic/sandbox.txt >> create mode 100644 doc/device-tree-bindings/regulator/sandbox.txt >> create mode 100644 drivers/power/pmic/i2c_pmic_emul.c >> create mode 100644 drivers/power/pmic/sandbox.c >> create mode 100644 drivers/power/regulator/sandbox.c >> create mode 100644 include/power/sandbox_pmic.h > > Acked-by: Simon Glass > Tested on sandbox: > Tested-by: Simon Glass > > I expected i2c_pmic_emul to get its settings from the device tree too > - is that not possible for some reason? > > Regards, > Simon > Hmm, I could add some reg default array to the emul node, will check it. Best regards, -- Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com