Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Sep 2013 15:47:32 -0700
From:      Sean Bruno <sean_bruno@yahoo.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-embedded <freebsd-embedded@freebsd.org>
Subject:   Re: off by one error, maxpins
Message-ID:  <1378421252.1647.21.camel@localhost>
In-Reply-To: <FA19C2B0-8128-4A30-AF38-DDFD7F41AE82@bsdimp.com>
References:  <1378420702.1647.18.camel@localhost> <FA19C2B0-8128-4A30-AF38-DDFD7F41AE82@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-Zo4EkIJP+zCyRlLuIRAr
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

On Thu, 2013-09-05 at 16:42 -0600, Warner Losh wrote:
> Shouldn't npins and/or maxpin just be bumped by 1 instead?
>=20
> Warner
>=20
> On Sep 5, 2013, at 4:38 PM, Sean Bruno wrote:
>=20
> > http://people.freebsd.org/~sbruno/maxpin_plus_one.txt
> >=20

It looks like its  *intentionally* assigned as the h/w specific (GPIO
COUNT) -1 in ar71xx_gpio_pin_max()

Userland assumes that this value is a 0-based thing. =20

--=-Zo4EkIJP+zCyRlLuIRAr
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (FreeBSD)

iQEcBAABAgAGBQJSKQoEAAoJEBkJRdwI6BaHxrQH/0m3wO1mF4MvA+3+xVAmY4cg
P/9hky7zgMo3CKc1aDRGwMa/hAi1haw8RPyEJTrRVdsJHo3eplvPUR7w1CkjWfdO
IsS4x/GkiLFf7mIvf207LsbOEwyeZp7FPlhdvNz9DIvzUBfGlMXTYGsgkSN1ccYa
wydOZ8DaaGrOr4A4Yp0AKJzxczR6edJ+kcmYN8bGLwmRxFBi8srAsh7lBV4yeGoT
fg/KqCUhsln/wLTz+UxVp9D2ctmEOwpzJ5ou5wxlZk05AK0CTaUraPpUcs3Ia9Rg
tdip8ZVAwfyPvdKl3eoLpVv4aYogqzrQsRdEiv4OfVTYUX68pe0P81V5pSmxmso=
=xos9
-----END PGP SIGNATURE-----

--=-Zo4EkIJP+zCyRlLuIRAr--




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