linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shc_work@mail.ru (Alexander Shiyan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] mfd: mc13xxx: Add missing spi_setup()
Date: Sun,  2 Mar 2014 11:44:34 +0400	[thread overview]
Message-ID: <1393746275-9253-3-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1393746275-9253-1-git-send-email-shc_work@mail.ru>

The probe routine should call spi_setup() to configure the SPI bus
so it can properly communicate with the device.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/mfd/mc13xxx-spi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
index cd27c32..f35624a 100644
--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -139,6 +139,9 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
 	mc13xxx->irq = spi->irq;
 
 	spi->max_speed_hz = spi->max_speed_hz ? : 26000000;
+	ret = spi_setup(spi);
+	if (ret)
+		return ret;
 
 	mc13xxx->regmap = devm_regmap_init(&spi->dev, &regmap_mc13xxx_bus,
 					   &spi->dev,
-- 
1.8.3.2

  parent reply	other threads:[~2014-03-02  7:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02  7:44 [PATCH 1/4] mfd: mc13xxx: Honor designed SPI mode Alexander Shiyan
2014-03-02  7:44 ` [PATCH 2/4] mfd: mc13xxx: Limit maximum SPI speed Alexander Shiyan
2014-03-03  7:36   ` Lee Jones
2014-03-02  7:44 ` Alexander Shiyan [this message]
2014-03-03  7:37   ` [PATCH 3/4] mfd: mc13xxx: Add missing spi_setup() Lee Jones
2014-03-02  7:44 ` [PATCH 4/4] regulator: mc13xxx: Fix probing with DT Alexander Shiyan
2014-03-03  1:58   ` Mark Brown
2014-03-03  7:35 ` [PATCH 1/4] mfd: mc13xxx: Honor designed SPI mode Lee Jones
2014-03-03  7:55   ` Alexander Shiyan
2014-03-03  9:23     ` Lee Jones
2014-03-03  9:41 ` Sascha Hauer
2014-03-03  9:51   ` Alexander Shiyan
2014-03-04 20:13     ` Sascha Hauer
2014-03-04 20:51       ` Alexander Shiyan
2014-03-05 11:57         ` Sascha Hauer

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=1393746275-9253-3-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=linux-arm-kernel@lists.infradead.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 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).