From: "Huang, Tao" <huangtao@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: Huibin Hong <huibin.hong@rock-chips.com>,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
"shawn.lin" <shawn.lin@kernel-upstream.org>,
linux-rockchip@lists.infradead.org,
Addy Ke <addy.ke@rock-chips.com>
Subject: Re: [PATCH] spi/rockchip: Make sure spi clk is on in rockchip_spi_set_cs
Date: Fri, 26 Feb 2016 10:31:50 +0800 [thread overview]
Message-ID: <56CFB916.5010403@rock-chips.com> (raw)
In-Reply-To: <20160226015829.GC18327@sirena.org.uk>
On 2016年02月26日 09:58, Mark Brown wrote:
>
>> Another way to solve this bug is add runtime PM support while spi setup.
>> Some other chips may have some problem, for example mt65xx and orion,
>> which access hardware register too.
>
> No, this is telling you you're doing something wrong - setup() might be
> called while another transfer is in progress so you shouldn't be
> changing the hardware setup (see Documentation/spi/spi-summary). This
> means that you normally shouldn't be writing to registers there. Moving
> this to prepare_message() instead is probably what you want.
>
You misunderstand me. I talk about spi_setup, as
Documentation/spi/spi-summary, which would normally be called from
probe() before the first I/O is done to the device.
spi_setup will call spi_set_cs(spi, false), which introduced with commit
1a7b7ee72c21 ("spi: Ensure that CS line is in non-active state after
spi_setup()"). And spi_set_cs will call spi->master->set_cs, and set_cs
callback will access register. Without clk enable, I believe some
drivers will failed to run.
Best Regards,
Huang, Tao
next prev parent reply other threads:[~2016-02-26 2:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 10:00 [PATCH] spi/rockchip: Make sure spi clk is on in rockchip_spi_set_cs Huibin Hong
2016-02-24 11:09 ` Huang, Tao
2016-02-26 1:58 ` Mark Brown
2016-02-26 2:31 ` Huang, Tao [this message]
2016-03-05 4:45 ` Mark Brown
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=56CFB916.5010403@rock-chips.com \
--to=huangtao@rock-chips.com \
--cc=addy.ke@rock-chips.com \
--cc=broonie@kernel.org \
--cc=huibin.hong@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=shawn.lin@kernel-upstream.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