All of lore.kernel.org
 help / color / mirror / Atom feed
From: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
To: Vinicius Maciel <viniciusfre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	wens-jdAy2FN1RRM@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org
Subject: Re: [PATCH v2] ARM: spi/sun7i: Add Master Sample Data Mode for SPI
Date: Sat, 11 Feb 2017 14:58:54 +0800	[thread overview]
Message-ID: <20170212033109.V3xe2GIs@smtp2p.mail.yandex.net> (raw)


ARM: is not needed.

2017年2月11日 11:54于 Vinicius Maciel <viniciusfre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>写道:
>
> In order to work appropriately, the max11043 ADC chip and probably 
> others, needs SPI master samples the data at the correct edge. From 
> max11043 datasheet: "The data at DIN is latched on the rising edge 
> of SCLK". Same to DOUT. 
>
> This patch add Master Sample Data Mode bit in normal sample mode. 
> It will affect only A20. 
>
> Signed-off-by: Vinicius Maciel <viniciusfre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
> Reviewed-by: Siarhei Siamashka <siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
> --- 
> drivers/spi/spi-sun4i.c | 4 +++- 
> 1 file changed, 3 insertions(+), 1 deletion(-) 
>
> diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c 
> index c5cd635c28f3..6325be2ce8d9 100644 
> --- a/drivers/spi/spi-sun4i.c 
> +++ b/drivers/spi/spi-sun4i.c 
> @@ -44,6 +44,7 @@ 
> #define SUN4I_CTL_CS_MANUAL BIT(16) 
> #define SUN4I_CTL_CS_LEVEL BIT(17) 
> #define SUN4I_CTL_TP BIT(18) 
> +#define SUN4I_CTL_SDM BIT(20) 
>
> #define SUN4I_INT_CTL_REG 0x0c 
> #define SUN4I_INT_CTL_RF_F34 BIT(4) 
> @@ -407,7 +408,8 @@ static int sun4i_spi_runtime_resume(struct device *dev) 
> } 
>
> sun4i_spi_write(sspi, SUN4I_CTL_REG, 
> - SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP); 
> + SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP | 
> + SUN4I_CTL_SDM); 
>
> return 0; 
>
> -- 
> 2.11.0 
>
> -- 
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group. 
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> For more options, visit https://groups.google.com/d/optout. 

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

             reply	other threads:[~2017-02-11  6:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11  6:58 Icenowy Zheng [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-02-11  3:54 [PATCH v2] ARM: spi/sun7i: Add Master Sample Data Mode for SPI Vinicius Maciel
2017-02-11  3:54 ` Vinicius Maciel
     [not found] ` <20170211035447.3819-1-viniciusfre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-13  7:12   ` Maxime Ripard
2017-02-13  7:12     ` Maxime Ripard
2017-02-13 12:52   ` Mark Brown
2017-02-13 12:52     ` Mark Brown
     [not found]     ` <20170213125239.f5vsxrfwz5t6gqyp-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2017-02-26 14:10       ` Vinicius Maciel
     [not found]         ` <186c0f31-01d0-4a1b-889b-a390a57bd1d9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-03-02 20:44           ` Siarhei Siamashka
2017-03-02 20:44             ` Siarhei Siamashka
2017-03-02 22:00             ` Vinicius Maciel

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=20170212033109.V3xe2GIs@smtp2p.mail.yandex.net \
    --to=icenowy-ymacfijhrkm@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=siarhei.siamashka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=viniciusfre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@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 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.