Re: [PATCH 1/8] ARM: OMAP3: mmc-twl4030 uses regulator framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Seg, 2009-05-25 às 10:48 -0700, Tony Lindgren escreveu:
> +			/* UGLY HACK:  workaround regulator framework bugs.
> +			 * When the bootloader leaves a supply active, it's
> +			 * initialized with zero usecount ... and we can't
> +			 * disable it without first disabling it.  Until the
> +			 * framework is fixed, we need a workaround like this
> +			 * (which is safe for MMC, but not in general).
> +			 */
> +			if (regulator_is_enabled(hsmmc[i].vcc) > 0) {
> +				regulator_enable(hsmmc[i].vcc);
> +				regulator_disable(hsmmc[i].vcc);
> +			}
> +			if (hsmmc[i].vcc_aux) {
> +				if (regulator_is_enabled(reg) > 0) {
> +					regulator_enable(reg);
> +					regulator_disable(reg);
> +				}
> +			}
> +

This hack would look less ugly on twl4030reg_probe(). There you can
disable the regulator without first enabling it.

(btw, there is a typo in the comment: "disable it without first
disabling it").

-- 
Daniel Ribeiro

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux