From owner-freebsd-mips@freebsd.org Fri Oct 20 15:00:35 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBBBEE37D6E for ; Fri, 20 Oct 2017 15:00:35 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE46B7E30B for ; Fri, 20 Oct 2017 15:00:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4e6bf308-b5a7-11e7-b50b-53dc5ecda239 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 4e6bf308-b5a7-11e7-b50b-53dc5ecda239; Fri, 20 Oct 2017 14:59:44 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9KF0Rh8011250; Fri, 20 Oct 2017 09:00:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1508511627.1383.48.camel@freebsd.org> Subject: Re: about iicdev_writeto() on ralink soc From: Ian Lepore To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Date: Fri, 20 Oct 2017 09:00:27 -0600 In-Reply-To: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> References: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 15:00:36 -0000 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 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