From owner-freebsd-hackers@FreeBSD.ORG Thu May 21 06:53:43 2015 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D973C8E; Thu, 21 May 2015 06:53:43 +0000 (UTC) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 228131935; Thu, 21 May 2015 06:53:42 +0000 (UTC) Received: from th-04.cs.huji.ac.il ([132.65.80.125]) by kabab.cs.huji.ac.il with esmtp id 1YvKAp-000KZ0-OF; Thu, 21 May 2015 09:41:43 +0300 From: Daniel Braniss Subject: OF_getprop weirdness - raspberry pi Date: Thu, 21 May 2015 09:41:42 +0300 Message-Id: Cc: current@freebsd.org To: hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 06:53:43 -0000 Hi, I=E2=80=99m running current as of last week on a raspberry pi B. i don=E2=80=99t know if this only related to arm, but this is what I = have in my rpi-b.dts: =E2=80=A6. spi0 { rfid0 { compatible =3D "rfid,mfrc5"; spi-chipselect =3D <0>; reset { compatible =3D "pcd-reset"; gpios =3D <&gpio 6 2>; }; lock { compatible =3D "lock-1"; gpios =3D <&gpio 13 2>; }; sense { compatible =3D "sense-1"; gpios =3D <&gpio 19 1>; };=20 }; =E2=80=A6 and a call to uint32_t data[3]; =09 OF_getprop(node, =E2=80=9Cgpios=E2=80=9D, data, sizeof(data)); = // node is =E2=80=98pcd-reset' returns: data[0]: 0x03000000 data[1]: 0x06000000 data[2]: 0x02000000 which looks to me that it=E2=80=99s in the wrong endian? cheers, danny