Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Apr 2019 11:34:34 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Mori Hiroki <yamori813@yahoo.co.jp>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: spigen problem
Message-ID:  <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org>
In-Reply-To: <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp>
References:  <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2019-04-30 at 02:18 +0900, Mori Hiroki wrote:
> Hi
> 
> I add small spi lcd on RT3050. This lcd controller is S6D0151.
> 
> S6D0151 transfer is tree byte command then tree byte data.
> 
> I use spigen mruby rapper. This rapper use SPIGENIOC_TRANSFER.
> 
> I try to send tree byte command. But spi transfer is six byte.
> 
> This is reason.
> 
> sys/dev/spibus/spigen.c
> 
>         error = copyin(st->st_command.iov_base, transfer.tx_cmd,
>            transfer.tx_cmd_sz = transfer.rx_cmd_sz = st-
> >st_command.iov_len);  
> 
> 
> This lcd not work six byte transfer.
> 
> How do I fix this ?
> 
> Regards
> 
> Hiroki Mori
> 

I'm not sure what you mean by "This is the reason", that code sets up
the transfer for exactly as many bytes as you requested in
st_command.iov_len.  If you set that to three bytes, only three bytes
will be transfered.

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?22b68b094cbe7ab1b07673e43f6473906bd2d648.camel>