lkml.org 
[lkml]   [2014]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sdhci: Forward EPROBE_DEFER on vmmc and vqmmc regulators
On Wed, Apr 16, 2014 at 01:15:53PM -0700, Andrew Bresticker wrote:

> Not true. If !CONFIG_REGULATOR, regulator_get() and co. will return
> NULL. Normally it is ok to ignore this case, but the sdhci driver
> will call regulator_is_supported_voltage() on vqmmc to determine
> whether 1.8V signalling is supported. With !CONFIG_REGULATOR,
> regulator_is_supported_voltage() will always return false, causing the
> sdhci driver to disable all UHS modes. So we still need to handle the
> NULL (!CONFIG_REGULATOR) case. One possibility is to guard the
> voltage check with #ifdef CONFIG_REGULATOR, as is done later with
> vmmc.

It seems better to just fix regulator_get_optional() to return an error
if the API is disabled, that case didn't really get considered since
it's a bit surprising that something actively using regulators (rather
than simply ensuring they're enabled) would be using that function.
Though if you already have ifdefs the ifdef is probably fine.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-04-16 23:21    [W:0.111 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site