lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1259143495-9480-3-git-send-email-ext-juha.1.keski-saari@nokia.com>
Date:	Wed, 25 Nov 2009 12:04:54 +0200
From:	Juha Keski-Saari <ext-juha.1.keski-saari@...ia.com>
To:	lrg@...mlogic.co.uk, broonie@...nsource.wolfsonmicro.com,
	dbrownell@...rs.sourceforge.net, linux-kernel@...r.kernel.org
Cc:	peter.de-schrijver@...ia.com, eduardo.valentin@...ia.com,
	ext-juha.1.keski-saari@...ia.com
Subject: [PATCHv2 2/3] Reset REMAP configuration in regulator probe

This patch makes the probe recover the regulator REMAP configuration into
the state it is on reset to make sure the RegFW has proper control over
the regulator states

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@...ia.com>
---
 drivers/regulator/twl4030-regulator.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c
index 75da6af..7029fb9 100644
--- a/drivers/regulator/twl4030-regulator.c
+++ b/drivers/regulator/twl4030-regulator.c
@@ -420,6 +420,13 @@ static struct twlreg_info twl4030_regs[] = {
 	/* VUSBCP is managed *only* by the USB subchip */
 };
 
+static const u8 REG_REMAP_table[] = {
+	0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08,
+	0x08, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08,
+	0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
+	0x08,
+};
+
 static int twl4030reg_probe(struct platform_device *pdev)
 {
 	int				i;
@@ -458,6 +465,8 @@ static int twl4030reg_probe(struct platform_device *pdev)
 	}
 	platform_set_drvdata(pdev, rdev);
 
+       twl4030reg_write(info, VREG_REMAP, REG_REMAP_table[pdev->id]);
+
 	/* NOTE:  many regulators support short-circuit IRQs (presentable
 	 * as REGULATOR_OVER_CURRENT notifications?) configured via:
 	 *  - SC_CONFIG
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ