Hello,
On 2015-02-02 09:59, Javier Martinez Canillas wrote:
On Mon, Feb 2, 2015 at 9:33 AM, Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html