Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jul 2019 16:16:33 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        FreeBSD Current <freebsd-current@FreeBSD.org>
Subject:   Re: i2c bit banging timeout for SCL
Message-ID:  <92906.1561997793@critter.freebsd.dk>
In-Reply-To: <a3538c10-2438-a287-77db-ad390078b274@FreeBSD.org>
References:  <a3538c10-2438-a287-77db-ad390078b274@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--------
In message <a3538c10-2438-a287-77db-ad390078b274@FreeBSD.org>, Andriy Gapo=
n writes:

>iicbb driver has a hardcoded timeout that defines how long the driver wai=
ts for
> SCL line to go high after the driver releases it to float.  Sometimes sl=
aves
>hold the line low until they are ready to continue with the communication=
.
>As a side note, the timeout means that the driver just goes on as if the =
line
>became high.  Maybe it should produce an error instead.
>
>Anyway, I would like to increase the current timeout of 100 x 10us to 100=
0 x
>10us.  The rationale is that there are many slave devices, like sensors, =
that
>take about 10 ms to return a result.  So, I think that it makes sense to =
play
>nice with such devices by default.
>
>Probably I'll add a sysctl for that parameter while I'll be there.

sysctl or ioctl ?

-- =

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    =

Never attribute to malice what can adequately be explained by incompetence=
.



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