Date: Sat, 21 Oct 2017 08:04:21 +0900 (JST) From: Mori Hiroki <yamori813@yahoo.co.jp> To: Ian Lepore <ian@freebsd.org> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: about iicdev_writeto() on ralink soc Message-ID: <405153.18836.qm@web101719.mail.ssk.yahoo.co.jp> In-Reply-To: <1508511627.1383.48.camel@freebsd.org> References: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> <1508511627.1383.48.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi ----- Original Message ----- > From: Ian Lepore <ian@freebsd.org> > To: Mori Hiroki <yamori813@yahoo.co.jp> > Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> > Date: 2017/10/21, Sat 00:00 > Subject: Re: about iicdev_writeto() on ralink soc > > On Fri, 2017-10-20 at 20:24 +0900, Mori Hiroki wrote: >> Hi >> >> I make mips mediatek iic driver. Mediatek(Ralink) soc(RT2880 and >> RT3050) is not support nostop option at I2C device. This soc i2c >> device is set transfer length and automatically send stop. And >> Always send device address at first byte. >> >> your added iicdev_writeto() not work in these soc i2c device. >> >> >> >> https://svnweb.freebsd.org/base?view=revision&revision=321583 >> >> >> Could you please change single transfer in iicdev_writeto() at >> iiconf.c. >> >> Regards >> >> Hiroki Mori > Thanks check RT datasheet. > iicdev_writeto() does the correct sequence of operations. > > I think if you set the ADDRDIS bit in the device control register and > ignore the NOSTOP flag in the messages, it will work for most slave > devices. Some slave devices require a repeat-start to work correctly, > and those will never work right on a controller like this. > > -- Ian > No. Ralink Datasheet is very confuse. ADDRDIR is register address disable. DEVADDIS is device address disable. If not set DEVADDIS and ADDRDIR then <Device address> <Register address> <data> ... If set ADDRDIR then <Device address> <data> ... If set DEVADDIS then ignore ADDRDIR <Register address> <data> ... always two more byte send this soc. Driver review is this. https://reviews.freebsd.org/D12736 Thanks Hiroki Mori
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?405153.18836.qm>
