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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Jul 2015 15:14:15 -0500
From:	Felipe Balbi <balbi@...com>
To:	"Franklin S Cooper Jr." <fcooper@...com>
CC:	<balbi@...com>, <linux-omap@...r.kernel.org>,
	<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<kishon@...com>, <rogerq@...com>,
	Lokesh Vutla <lokeshvutla@...com>,
	Murali Karicheri <m-karicheri2@...com>
Subject: Re: [PATCH] mmc: omap_hsmmc: Update driver to support without
 regulators

On Tue, Jul 21, 2015 at 03:11:21PM -0500, Franklin S Cooper Jr. wrote:
> 
> 
> On 07/21/2015 02:57 PM, Felipe Balbi wrote:
> > On Tue, Jul 14, 2015 at 02:29:46PM -0500, Franklin S Cooper Jr wrote:
> >> From: Roger Quadros <rogerq@...com>
> >>
> >> Update driver to support without regulators.
> >>
> >> Without this patch boards that do not enable regulator config options will
> >> fail to boot with a kernel panic.
> >>
> >> Signed-off-by: Roger Quadros <rogerq@...com>
> >> Signed-off-by: Lokesh Vutla <lokeshvutla@...com>
> >> Signed-off-by: Murali Karicheri <m-karicheri2@...com>
> >> Signed-off-by: Franklin S Cooper Jr <fcooper@...com>
> >> ---
> >>  Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt |  2 ++
> >>  drivers/mmc/host/omap_hsmmc.c                           | 14 ++++++++++----
> >>  2 files changed, 12 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> >> index 76bf087..2408e87 100644
> >> --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> >> +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
> >> @@ -22,6 +22,8 @@ ti,dual-volt: boolean, supports dual voltage cards
> >>  ti,non-removable: non-removable slot (like eMMC)
> >>  ti,needs-special-reset: Requires a special softreset sequence
> >>  ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
> >> +voltage-ranges: Specify the voltage range supported if regulator framework
> >> +isn't enabled.
> >>  dmas: List of DMA specifiers with the controller specific format
> >>  as described in the generic DMA client binding. A tx and rx
> >>  specifier is required.
> >> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> >> index b2b411d..16c870f 100644
> >> --- a/drivers/mmc/host/omap_hsmmc.c
> >> +++ b/drivers/mmc/host/omap_hsmmc.c
> >> @@ -1551,10 +1551,13 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> >>  	if (ios->power_mode != host->power_mode) {
> >>  		switch (ios->power_mode) {
> >>  		case MMC_POWER_OFF:
> >> -			mmc_pdata(host)->set_power(host->dev, 0, 0);
> >> +			if (host->use_reg)
> >> +				mmc_pdata(host)->set_power(host->dev, 0, 0);
> > looks like this driver should just be use regulator_get_optional(), then
> > ->set_power() would still work, no ?
> Wouldn't there still be a dependency on the regulator framework to get
> that to work?

I didn't look at the code, but I'd expect us to have a sensible stub on
!REGULATOR builds

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ