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]
Message-ID: <CAPDyKFoegdoRQU0tOp0V=D4Gd=kbrE4i8EJdE668hU7+a=p4sg@mail.gmail.com>
Date:	Wed, 16 Oct 2013 16:42:07 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc:	Ludovic Desroches <ludovic.desroches@...el.com>,
	Chris Ball <cjb@...top.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: atmel-mci: add vmmc-supply support

On 16 October 2013 16:32, Alexandre Belloni
<alexandre.belloni@...e-electrons.com> wrote:
> Other MMC hosts handle a regulator named vmmc-supply that allows to power the
> MMC card or SDIO device before communicating on the bus.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
> ---
>  drivers/mmc/host/atmel-mci.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 69e438e..deffa1f 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -23,6 +23,7 @@
>  #include <linux/of_device.h>
>  #include <linux/of_gpio.h>
>  #include <linux/platform_device.h>
> +#include <linux/regulator/consumer.h>
>  #include <linux/scatterlist.h>
>  #include <linux/seq_file.h>
>  #include <linux/slab.h>
> @@ -2355,6 +2356,7 @@ static int __init atmci_probe(struct platform_device *pdev)
>         struct mci_platform_data        *pdata;
>         struct atmel_mci                *host;
>         struct resource                 *regs;
> +       struct regulator                *reg_vmmc;
>         unsigned int                    nr_slots;
>         int                             irq;
>         int                             ret;
> @@ -2371,6 +2373,16 @@ static int __init atmci_probe(struct platform_device *pdev)
>                 }
>         }
>
> +       reg_vmmc = devm_regulator_get(&pdev->dev, "vmmc");

Use "mmc_regulator_get_supply" instead. This will also try to setup
the "ocr_avail" mask, which is likely what you need as well.

Kind regards
Ulf Hansson

> +       if (!IS_ERR(reg_vmmc)) {
> +               ret = regulator_enable(reg_vmmc);
> +               if (ret) {
> +                       dev_err(&pdev->dev,
> +                               "Failed to enable vmmc regulator: %d\n", ret);
> +                       return ret;
> +               }
> +       }
> +
>         irq = platform_get_irq(pdev, 0);
>         if (irq < 0)
>                 return irq;
> --
> 1.8.1.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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