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] [day] [month] [year] [list]
Date:	Mon, 1 Dec 2008 13:28:13 -0800
From:	David Brownell <david-b@...bell.net>
To:	Samuel Ortiz <sameo@...nedhand.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Tony Lindgren <tony@...mide.com>,
	Mark Brown <broonie@...ena.org.uk>
Subject: Re: [patch 2.6.28-rc6 1/3] mfd: twl4030: simplified child creation code

On Sunday 30 November 2008, Samuel Ortiz wrote:
> All 3 patches pushed to my for-next branch, thanks.

Great ... here's a small tweak, which you may want to just
merge with the last one.

- Dave


========== CUT HERE
From: David Brownell <dbrownell@...rs.sourceforge.net>

This contains two bugfixes to the initial twl4030 regulator
support patch related to USB:

 (a) always overwrite the old list of consumers ... else
     the regulator handles all use the same "usb1v5" name;
 (b) don't set up the "usbcp" regulator, which turns out
     to be managed through separate controls, usually ULPI
     directly from the OTG controller.

Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
---
 drivers/mfd/twl4030-core.c  |   11 +----------
 include/linux/i2c/twl4030.h |    1 -
 2 files changed, 1 insertion(+), 11 deletions(-)

--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -433,7 +433,7 @@ add_regulator_linked(int num, struct reg
 	if (!pdata)
 		return NULL;
 
-	if (consumers && !pdata->consumer_supplies) {
+	if (consumers) {
 		pdata->consumer_supplies = consumers;
 		pdata->num_consumer_supplies = num_consumers;
 	}
@@ -556,9 +556,6 @@ add_children(struct twl4030_platform_dat
 		static struct regulator_consumer_supply usb3v1 = {
 			.supply =	"usb3v1",
 		};
-		static struct regulator_consumer_supply usbcp = {
-			.supply =	"usbcp",
-		};
 
 		/* this is a template that gets copied */
 		struct regulator_init_data usb_fixed = {
@@ -573,7 +570,6 @@ add_children(struct twl4030_platform_dat
 		usb1v5.dev = usb_transceiver;
 		usb1v8.dev = usb_transceiver;
 		usb3v1.dev = usb_transceiver;
-		usbcp.dev = usb_transceiver;
 
 		child = add_regulator_linked(TWL4030_REG_VUSB1V5, &usb_fixed,
 				&usb1v5, 1);
@@ -589,11 +585,6 @@ add_children(struct twl4030_platform_dat
 				&usb3v1, 1);
 		if (IS_ERR(child))
 			return PTR_ERR(child);
-
-		child = add_regulator_linked(TWL4030_REG_VUSBCP, &usb_fixed,
-				&usbcp, 1);
-		if (IS_ERR(child))
-			return PTR_ERR(child);
 	}
 
 	/* maybe add LDOs that are omitted on cost-reduced parts */
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -351,6 +351,5 @@ int twl4030_sih_setup(int module);
 #define TWL4030_REG_VUSB1V5	17
 #define TWL4030_REG_VUSB1V8	18
 #define TWL4030_REG_VUSB3V1	19
-#define TWL4030_REG_VUSBCP	20
 
 #endif /* End of __TWL4030_H */

--
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