From: Uri Mashiach <uri.mashiach@compulab.co.il>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
Kalle Valo <kvalo@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>,
Tony Lindgren <tony@atomide.com>
Cc: Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
bcousson@baylibre.com, Igor Grinberg <grinberg@compulab.co.il>,
Eliad Peller <eliad@wizery.com>,
devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 1/3] wlcore/wl12xx: spi: add power operation function
Date: Sun, 27 Dec 2015 19:14:32 +0200 [thread overview]
Message-ID: <56801C78.9040102@compulab.co.il> (raw)
In-Reply-To: <567C1E3B.3020404@ti.com>
Hello Grygorii,
On 12/24/2015 06:32 PM, Grygorii Strashko wrote:
> On 12/24/2015 05:35 PM, Uri Mashiach wrote:
>> The power function uses a consumer regulator access to update the WiFi
>> enable GPIO value.
>>
>> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
>> ---
>> v1 -> v2: oops fix was removed to a separate fix.
>>
>> drivers/net/wireless/ti/wlcore/spi.c | 37
>> ++++++++++++++++++++++++++++++++++++
>> 1 file changed, 37 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ti/wlcore/spi.c
>> b/drivers/net/wireless/ti/wlcore/spi.c
>>
>
> [...]
>
>> +
>> static struct wl1271_if_operations spi_ops = {
>> .read = wl12xx_spi_raw_read,
>> .write = wl12xx_spi_raw_write,
>> .reset = wl12xx_spi_reset,
>> .init = wl12xx_spi_init,
>> + .power = wl12xx_spi_set_power,
>> .set_block_size = NULL,
>> };
>>
>> @@ -353,6 +384,12 @@ static int wl1271_probe(struct spi_device *spi)
>> * comes from the board-peripherals file */
>> spi->bits_per_word = 32;
>>
>> + glue->reg = devm_regulator_get(&spi->dev, "vwlan");
>> + if (IS_ERR(glue->reg)) {
>
> It will be more correct to handle -EPROBE_DEFER here also. Like:
> if (PTR_ERR(glue->reg) == -EPROBE_DEFER)
> return PTR_ERR(glue->reg);
>
It seems that the IS_ERR(glue->reg) condition covers the EPROBE_DEFER case.
>> + dev_err(glue->dev, "can't get regulator\n");
>> + return PTR_ERR(glue->reg);
>> + }
>> +
>> ret = spi_setup(spi);
>> if (ret < 0) {
>> dev_err(glue->dev, "spi_setup failed\n");
>>
>
>
--
Thanks,
Uri
next prev parent reply other threads:[~2015-12-27 17:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-24 15:35 [PATCH v2 0/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach
2015-12-24 15:35 ` [PATCH v2 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach
2015-12-24 16:32 ` Grygorii Strashko
2015-12-27 17:14 ` Uri Mashiach [this message]
2015-12-28 11:59 ` Grygorii Strashko
2015-12-28 14:16 ` Uri Mashiach
2015-12-24 15:35 ` [PATCH v2 2/3] wlcore/wl12xx: spi: add device tree support Uri Mashiach
2015-12-24 16:25 ` Javier Martinez Canillas
2015-12-24 17:21 ` Uri Mashiach
2015-12-24 16:32 ` Grygorii Strashko
2015-12-24 17:24 ` Uri Mashiach
2015-12-24 15:35 ` [PATCH v2 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach
2015-12-24 16:33 ` Javier Martinez Canillas
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=56801C78.9040102@compulab.co.il \
--to=uri.mashiach@compulab.co.il \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=eliad@wizery.com \
--cc=galak@codeaurora.org \
--cc=grinberg@compulab.co.il \
--cc=grygorii.strashko@ti.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kvalo@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).