From: Michael Barkowski <michaelbarkowski@ruggedcom.com>
To: linuxppc-dev@ozlabs.org
Subject: Bug in of_mpc8xxx_spi chipselect
Date: Wed, 09 Sep 2009 09:42:03 -0400 [thread overview]
Message-ID: <4AA7B0AB.10309@ruggedcom.com> (raw)
Just want to document this bug, since I don't have time to make a patch:
In of_mpc8xxx_spi_get_chipselects():
pinfo->alow_flags[i] = flags & OF_GPIO_ACTIVE_LOW;
ret = gpio_direction_output(pinfo->gpios[i],
pinfo->alow_flags[i]);
The initial value of the chip should be disabled. If SPI_CS_HIGH, value of 0 means disabled - ok, but...
If not SPI_CS_HIGH for a given device (which is the case for most devices), that device will be enabled until it is disabled at the end of the first transaction to that device. If there are transactions to other devices on the same bus in the meantime, this device may be confused and fail the first transaction.
Maybe the chip select should be disabled until the device entry is initialized with full knowledge of its configuration. Not sure of the right solution.
--
Michael Barkowski
905-482-4577
reply other threads:[~2009-09-09 13:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4AA7B0AB.10309@ruggedcom.com \
--to=michaelbarkowski@ruggedcom.com \
--cc=linuxppc-dev@ozlabs.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.