From nobody Tue Jan 24 15:43:52 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P1WV30r6bz30tWc for ; Tue, 24 Jan 2023 15:43:55 +0000 (UTC) (envelope-from 01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com) Received: from b224-8.smtp-out.eu-central-1.amazonses.com (b224-8.smtp-out.eu-central-1.amazonses.com [69.169.224.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4P1WV15VtZz3Dl9 for ; Tue, 24 Jan 2023 15:43:53 +0000 (UTC) (envelope-from 01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cyclaero.com header.s=ez3m2wtglgbm5wj4q3hdyvc7qtjtqmlb header.b=NFW5OIiD; dkim=pass header.d=amazonses.com header.s=sokbgaaqhfgd6qjht2wmdajpuuanpimv header.b=GYg5wMo8; spf=pass (mx1.freebsd.org: domain of 01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com designates 69.169.224.8 as permitted sender) smtp.mailfrom=01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ez3m2wtglgbm5wj4q3hdyvc7qtjtqmlb; d=cyclaero.com; t=1674575032; h=From:Content-Type:Mime-Version:Subject:Date:References:To:In-Reply-To:Message-Id; bh=sFDBwOg0psorh5Y3uNyXV9IUUM7h/+8AoE1hzUJO+Rg=; b=NFW5OIiD5J73fFuUrKJDAu2JfhcCa4buOqmMOx7ld6Bvt6bkOrKjyp47qzGHLjJf 89dN3harLbO8kJgVUKenpY8CZ2ta4L1X84y8tkIT04isP4IKFkIqRz6igzqLVm8wzOY ItQ7+ba3buKJAoz5053cWv2Nj9yRqRirgcQ1nDhi1llE/0jQz50j7+GhsnAMIUIpum/ ZY5ewkqPvYrg2CyWuv/kV8xBLwpP4MsA9HzFLie16quOfccca7it1k3gfLvDafIonqx Xm+NTs+d0Anv7WlrR3hj7nDemJzNO2V7HA3CD2DIHPoHPWfxYFTmeRMASfWAhL3+eS8 3ES82jz7ng== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=sokbgaaqhfgd6qjht2wmdajpuuanpimv; d=amazonses.com; t=1674575032; h=From:Content-Type:Mime-Version:Subject:Date:References:To:In-Reply-To:Message-Id:Feedback-ID; bh=sFDBwOg0psorh5Y3uNyXV9IUUM7h/+8AoE1hzUJO+Rg=; b=GYg5wMo8TF656DH6nam+gTyAeFQJrrrlx/TDG1+ygE5coCNIMknl4ipFlbQKjmnt P+AqJOGI45lQHZmEGjhPQud2H7a8hCNmDY5ZISko6jHPb4vHjFbp/SLY8UMrX8rto8H X4+X3nrYfYeq8u9KOd2Rx50xzMhxQGcWo2ygVFmo= From: "Dr. Rolf Jansen" Content-Type: multipart/alternative; boundary="Apple-Mail=_C69401B8-1DDE-4319-AE6A-B62FC4FF9828" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: GPIO inputs on Pis? Date: Tue, 24 Jan 2023 15:43:52 +0000 References: <0b235f83-7cb3-1d14-7c64-aee7c1c0c23d@denninger.net> <01070185e46b1a6e-ee34b885-1215-45c7-ac18-83320c02cac2-000000@eu-central-1.amazonses.com> To: freebsd-arm In-Reply-To: Message-ID: <01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com> X-Mailer: Apple Mail (2.3445.104.15) Feedback-ID: 1.eu-central-1.i3TZMOZE/rJo3HQG0qvfyolMxXljeCj2Qj8Jp3rxK3c=:AmazonSES X-SES-Outgoing: 2023.01.24-69.169.224.8 X-Spamd-Result: default: False [0.35 / 15.00]; FROM_NAME_HAS_TITLE(1.00)[dr]; SUBJECT_ENDS_QUESTION(1.00)[]; URI_COUNT_ODD(1.00)[17]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.994]; NEURAL_HAM_LONG(-0.96)[-0.958]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[freebsd-rj@cyclaero.com,01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com]; R_DKIM_ALLOW(-0.20)[cyclaero.com:s=ez3m2wtglgbm5wj4q3hdyvc7qtjtqmlb,amazonses.com:s=sokbgaaqhfgd6qjht2wmdajpuuanpimv]; R_SPF_ALLOW(-0.20)[+ip4:69.169.224.0/20]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[cyclaero.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[69.169.224.8:from]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[amazonses.com:dkim]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; DKIM_TRACE(0.00)[cyclaero.com:+,amazonses.com:+]; TO_DN_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; ASN(0.00)[asn:16509, ipnet:69.169.224.0/23, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[freebsd-rj@cyclaero.com,01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[69.169.224.8:from] X-Rspamd-Queue-Id: 4P1WV15VtZz3Dl9 X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_C69401B8-1DDE-4319-AE6A-B62FC4FF9828 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I sent an old ink to the thread on the mailing list, which does not work = anymore. Here ist the new link: = https://lists.freebsd.org/pipermail/freebsd-arm/2020-November/022738.html = > Am 24.01.2023 um 12:35 schrieb Karl Denninger >: >=20 > Thank you -- will check it out. >=20 > On 1/24/2023 10:35, Dr. Rolf Jansen wrote: >>> Am 23.01.2023 um 11:41 schrieb Karl Denninger >: >>>=20 >>> Is there support somewhere in the 13.x for other than "read current = state" / "set current state"? >>>=20 >>> Specifically, there is evidence in the sys/gpio.h header file that I = can open up a file descriptor and then use select()/read() to grab the = contents of a ring buffer of some size (presumably interrupt-posted) of = events since last look, and determine if there's anything in there. = Provided you're reasonably fast this might be enough to, for example, = read an optical encoder that has a modest pulse rate. >>>=20 >>> I see apparent review code at https://reviews.freebsd.org/D27398 = from late 2020, but nothing else I = can find digging around; an example (assuming it is actually implemented = and works) would be helpful >>>=20 >> See >>=20 >> = https://forums.freebsd.org/threads/gpio-api-general-orange-pi-h3.83950/pos= t-556728 = >>=20 >> And the messages in that thread that follow the one linked above. >>=20 >> There is a respective thread on this mailing list as well: >>=20 >> Porting FreeBSD to ARM processors: User Space GPIO Interrupt = programming - GSoC-2018 = = --=20 > Karl Denninger > karl@denninger.net > The Market Ticker > [S/MIME encrypted email preferred] --Apple-Mail=_C69401B8-1DDE-4319-AE6A-B62FC4FF9828 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
I sent an old ink to the thread on the mailing list, which does not work anymore. Here ist the new link:


Am 24.01.2023 um 12:35 schrieb Karl Denninger <karl@denninger.net>:

Thank you -- will check it out.

On 1/24/2023 10:35, Dr. Rolf Jansen wrote:
Am 23.01.2023 um 11:41 schrieb Karl Denninger <karl@denninger.net>:

Is there support somewhere in the 13.x for other than "read current state" / "set current state"?

Specifically, there is evidence in the sys/gpio.h header file that I can open up a file descriptor and then use select()/read() to grab the contents of a ring buffer of some size (presumably interrupt-posted) of events since last look, and determine if there's anything in there.  Provided you're reasonably fast this might be enough to, for example, read an optical encoder that has a modest pulse rate.

I see apparent review code at https://reviews.freebsd.org/D27398 from late 2020, but nothing else I can find digging around; an example (assuming it is actually implemented and works) would be helpful

See


And the messages in that thread that follow the one linked above.

There is a respective thread on this mailing list as well:

--
Karl Denninger
karl@denninger.net
The Market Ticker
[S/MIME encrypted email preferred]

--Apple-Mail=_C69401B8-1DDE-4319-AE6A-B62FC4FF9828--