From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device
Date: Wed, 16 May 2012 19:20:48 +0200 [thread overview]
Message-ID: <20120516172048.GT30400@pengutronix.de> (raw)
In-Reply-To: <1337169776-15407-1-git-send-email-shc_work@mail.ru>
On Wed, May 16, 2012 at 04:02:55PM +0400, Alexander Shiyan wrote:
> To avoid unnecessary preset initial state chipselect lines for SPI, set it to
> inactive state when adding devices to the system.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Applied, thanks
Sascha
> ---
> drivers/spi/imx_spi.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
> index 3b33b66..42358f2 100644
> --- a/drivers/spi/imx_spi.c
> +++ b/drivers/spi/imx_spi.c
> @@ -145,6 +145,10 @@ struct spi_imx_devtype_data {
>
> static int imx_spi_setup(struct spi_device *spi)
> {
> + struct imx_spi *imx = container_of(spi->master, struct imx_spi, master);
> +
> + imx->chipselect(spi, 0);
> +
> debug("%s mode 0x%08x bits_per_word: %d speed: %d\n",
> __FUNCTION__, spi->mode, spi->bits_per_word,
> spi->max_speed_hz);
> --
> 1.7.3.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2012-05-16 17:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 12:02 Alexander Shiyan
2012-05-16 12:02 ` [PATCH 2/2] PCM038: Remove now unused preset for SPI chipselect Alexander Shiyan
2012-05-16 17:20 ` Sascha Hauer [this message]
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=20120516172048.GT30400@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=shc_work@mail.ru \
/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