From owner-freebsd-arm@freebsd.org Wed Feb 19 09:27:20 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52C4925425C for ; Wed, 19 Feb 2020 09:27:20 +0000 (UTC) (envelope-from nikolay.kostirya@i11.co) Received: from mx.i11.co (mx.i11.co [159.69.78.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48MsnL4g7bz40d7 for ; Wed, 19 Feb 2020 09:27:18 +0000 (UTC) (envelope-from nikolay.kostirya@i11.co) Received: from [82.207.42.188] (helo=localhost) by mx.i11.co with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j4LdP-0008DS-Gi for freebsd-arm@freebsd.org; Wed, 19 Feb 2020 09:27:11 +0000 Date: Wed, 19 Feb 2020 11:27:09 +0200 From: Nick Kostirya To: freebsd-arm Subject: Re: gpioiic and APDS9960 sensors Message-ID: <20200219112709.3d895f58@i11.co> In-Reply-To: <20200214141531.5bb948e5@i11.co> References: <20200214141531.5bb948e5@i11.co> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48MsnL4g7bz40d7 X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.17 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[i11.co:s=omicron]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:159.69.78.69]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[i11.co:+]; DMARC_POLICY_ALLOW(-0.50)[i11.co,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.17)[ip: (-9.65), ipnet: 159.69.0.0/16(0.39), asn: 24940(-1.55), country: DE(-0.02)]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2020 09:27:20 -0000 On Fri, 14 Feb 2020 14:15:31 +0200 Nick Kostirya via freebsd-arm wrote: > Hello. > I use iicbus over gpioiic on NanoPi NEO. > All my sensors work fine, except for APDS9960 sensors. > I have two APDS9960 sensors and and both give an error: > > > > i2c -f /dev/iic0 -s > Scanning I2C devices on /dev/iic0: 39 > > > ktrace -t+ i2c -f /dev/iic0 -a 0x39 -d r -o 0 -c 1 > > 1654 i2c CALL ioctl(0x3,I2CSTART,0xbfbfebf0) > 1654 i2c RET ioctl 0 > 1654 i2c CALL ioctl(0x3,I2CWRITE,0xbfbfebf0) > 1654 i2c RET ioctl -1 errno 2 No such file or directory > 1654 i2c CALL ioctl(0x3,I2CSTOP,0x20056010) > 1654 i2c RET ioctl 0 > > > > ktrace -t+ i2c -f /dev/iic0 -a 0x39 -d r -o 0 -c 1 -m tr > > 1657 i2c CALL ioctl(0x3,I2CRDWR,0xbfbfebd8) > 1657 i2c RET ioctl -1 errno 2 No such file or directory Maybe it is IIC_ENOACK from iicbb_ack function in iicbb.c file? IIC_ENOACK is also 2. Maybe sensors is very slow for iicbb?