linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Huang, Tao" <huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Huibin Hong <huibin.hong-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"shawn.lin"
	<shawn.lin-NgiFYW8Wbx6Ta72+1OMJgUB+6BGkLq7r@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Addy Ke <addy.ke-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
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-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-02-26  2:31 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
     [not found]   ` <56CD8F85.2090204-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-02-26  1:58     ` Mark Brown
     [not found]       ` <20160226015829.GC18327-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-02-26  2:31         ` Huang, Tao [this message]
     [not found]           ` <56CFB916.5010403-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
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-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=addy.ke-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=huibin.hong-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shawn.lin-NgiFYW8Wbx6Ta72+1OMJgUB+6BGkLq7r@public.gmane.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).