]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- Added a patch, which allows SD card readers like SD Host controller:
authorLukasz Masko <lmasko@pld-linux.org>
Tue, 12 Feb 2013 19:25:21 +0000 (20:25 +0100)
committerLukasz Masko <lmasko@pld-linux.org>
Tue, 12 Feb 2013 19:25:21 +0000 (20:25 +0100)
  Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 18)
  to work again
  (taken from http://thread.gmane.org/gmane.linux.kernel.mmc/17643).

kernel-small_fixes.patch

index 788ac8107227c7c1a52ed455f25e606a10ddb12c..dea54c0fe6a0d00191f5a1a6eb118099fb0f63f6 100644 (file)
@@ -666,3 +666,36 @@ index 205af8d..22436f7 100644
 1.7.6.5
 
 
+diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
+index 042c1ff..d07c240 100644
+--- a/drivers/regulator/core.c
++++ b/drivers/regulator/core.c
+@@ -1872,7 +1872,14 @@ int regulator_count_voltages(struct regulator *regulator)
+ {
+       struct regulator_dev    *rdev = regulator->rdev;
+
+-      return rdev->desc->n_voltages ? : -EINVAL;
++      if (rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE) {
++              if (rdev->desc->n_voltages)
++                      return rdev->desc->n_voltages;
++              else
++                      return -EINVAL;
++      } else {
++              return 1;
++      }
+ }
+ EXPORT_SYMBOL_GPL(regulator_count_voltages);
+
+diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
+index c7851c0..6f6534e 100644
+--- a/drivers/mmc/host/sdhci.c
++++ b/drivers/mmc/host/sdhci.c
+@@ -2923,7 +2923,7 @@ int sdhci_add_host(struct sdhci_host *host)
+               regulator_enable(host->vmmc);
+
+ #ifdef CONFIG_REGULATOR
+-      if (host->vmmc) {
++      if (host->vmmc && regulator_count_voltages(host->vmmc) > 1) {
+               ret = regulator_is_supported_voltage(host->vmmc, 3300000,
+                       3300000);
+               if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330)))
This page took 0.0881 seconds and 4 git commands to generate.