From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Javier Martinez Canillas <javier@dowhile0.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
Kukjin Kim <kgene@kernel.org>,
Tobias Jakobi <liquid.acid@gmx.net>,
Daniel Drake <drake@endlessm.com>,
Sebastian Reichel <sre@kernel.org>,
Seungwon Jeon <tgih.jun@samsung.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Chris Ball <chris@printf.net>,
Joonyoung Shim <jy0922.shim@samsung.com>
Subject: Re: [PATCH v2 1/3] mmc: pwrseq: add driver for emmc hardware reset
Date: Mon, 02 Feb 2015 11:00:42 +0100 [thread overview]
Message-ID: <54CF4ACA.6060001@samsung.com> (raw)
In-Reply-To: <CABxcv=nF3SJK7p1j=F08_9kHU2n+v=hmgr7-ikfZ7Xraz3J0_g@mail.gmail.com>
Hello,
On 2015-02-02 09:59, Javier Martinez Canillas wrote:
> On Mon, Feb 2, 2015 at 9:33 AM, Marek Szyprowski
> <m.szyprowski@samsung.com> wrote:
>> +
>> +Required properties:
>> +- compatible : contains "mmc-pwrseq-emmc".
>> +- reset-gpios : contains a GPIO specifier. The reset GPIO is pulled
> The DT binding says that the "reset-gpios" is a required property...
>
>> +int mmc_pwrseq_emmc_alloc(struct mmc_host *host, struct device *dev)
>> +{
>> + struct mmc_pwrseq_emmc *pwrseq;
>> + int ret = 0;
>> +
>> + pwrseq = kzalloc(sizeof(struct mmc_pwrseq_emmc), GFP_KERNEL);
>> + if (!pwrseq)
>> + return -ENOMEM;
>> +
>> + pwrseq->reset_gpio = gpiod_get_index(dev, "reset", 0, GPIOD_OUT_LOW);
>> + if (IS_ERR(pwrseq->reset_gpio) &&
>> + PTR_ERR(pwrseq->reset_gpio) != -ENOENT &&
>> + PTR_ERR(pwrseq->reset_gpio) != -ENOSYS) {
>> + ret = PTR_ERR(pwrseq->reset_gpio);
>> + goto free;
>> + }
> ...but here the GPIO is made optional since this will return and
> propagate the error only for -EPROBE_DEFER error but won't do it for
> -ENOENT and -ENOSYS.
Thanks for spotting this. reset-gpios is required, this driver really
makes no
sense without a gpio pin. I copied code from mmc-pwrseq-simple, which
handled
optional gpio pins. I will fix this is a few minutes.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2015-02-02 10:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 8:33 [PATCH v2 0/3] Add support for hardware reset of eMMC card on reboot Marek Szyprowski
2015-02-02 8:33 ` [PATCH v2 1/3] mmc: pwrseq: add driver for emmc hardware reset Marek Szyprowski
2015-02-02 8:59 ` Javier Martinez Canillas
2015-02-02 10:00 ` Marek Szyprowski [this message]
2015-02-02 10:05 ` [PATCH v3 " Marek Szyprowski
2015-02-02 12:53 ` Ulf Hansson
2015-02-02 13:19 ` Marek Szyprowski
2015-02-03 13:07 ` [PATCH v4 " Marek Szyprowski
2015-02-04 8:48 ` Ulf Hansson
2015-02-02 8:33 ` [PATCH v2 2/3] ARM: dts: exynos4412-odroid*: add eMMC reset line Marek Szyprowski
2015-02-02 8:33 ` [PATCH v2 3/3] ARM: dts: exynos5422-odroidxu3: " Marek Szyprowski
2015-02-02 8:51 ` [PATCH v2 0/3] Add support for hardware reset of eMMC card on reboot Javier Martinez Canillas
2015-02-04 15:39 ` Kukjin Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54CF4ACA.6060001@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=chris@printf.net \
--cc=drake@endlessm.com \
--cc=javier@dowhile0.org \
--cc=jh80.chung@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=kgene@kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=liquid.acid@gmx.net \
--cc=sre@kernel.org \
--cc=tgih.jun@samsung.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.