From owner-freebsd-arch@freebsd.org Wed Jul 1 07:46:14 2020 Return-Path: Delivered-To: freebsd-arch@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 A8C12365F9D for ; Wed, 1 Jul 2020 07:46:14 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 49xYFL3JLYz43rB for ; Wed, 1 Jul 2020 07:46:14 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 6F759365D3D; Wed, 1 Jul 2020 07:46:14 +0000 (UTC) Delivered-To: arch@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 6F3DA365D3C for ; Wed, 1 Jul 2020 07:46:14 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xYFL0xwpz444Y; Wed, 1 Jul 2020 07:46:13 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm1-x32e.google.com with SMTP id q15so21329981wmj.2; Wed, 01 Jul 2020 00:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=48+efyE1jejnfkmqwAMU/vNkf8tN6fVUj1Lz23HaFHQ=; b=Fkz63XxAptX39v3Z1H+ZKyzV1oLlZ0k17NlEaMWkPNEOsgrNSRPTEUDnH77GYUR6Xz jaDEZa+nEKC9hkwP++igVkx6goOHRoXWQzj6mDMoyUnOYd0VpsQTsSQTaQJAsxh6TYml RyUc52uW6EY+4JifhOL1JUyKf0rMVfN2VJi65BLkdSDfE/UqDgLchSCSTJswDL9DUvml DDTy+c0zShYm6sGBILk+I+VcjVHNlKXHTf0AZPSRvbOTGaDmX6PI7a0tJnK854AA/ua6 rjbQoP+riwZ95A0tX6q0AHAyw0ph1BvH2YnCWm9D3QmGhzj+00cfqPEQ6Zsko/NwvWRm n0og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=48+efyE1jejnfkmqwAMU/vNkf8tN6fVUj1Lz23HaFHQ=; b=GlO3tPjHRnbquY/G6TLXQEYnv9RWqjPevbAjtVal3vBYuVs80tFea/4uLJPqBddc9U qqBkSk0goznZKkOWKa9BGIrm0IZjMU+xfNyv3ar6SJIS0Re1/BIcolN0lGWCv8snc8we ZWP5fqGRZjNXs27WcbtQiv95BtHtUGW+lcizWbChKEDmlSM8et7jNioAB8WJr2uploCm 66urkOtVKzbdVvL3r7upgBrIjvoxtdNXTr+Ob+R8NHynRF62JN/2AyqmkxTklb7YbraU VGk9wa1AUumNyLh4sT3CdsPGwPw9HlzxL+mJb+uNooRHLaXWuH64p3uRq6tz6sugfdMZ 0DwQ== X-Gm-Message-State: AOAM531mFL4j1/aPlNwPssgGKmx5GoGDsk+7jVN9vr0GoLOVBMu0tu6A aZSa3+2cDDnd4dNCAttbBBALS4Ri X-Google-Smtp-Source: ABdhPJzhGIrDQzyUX6xCCYFWUwpmktd2698vEoOL7z629GQtMu55F7KMwvR05K55THR25dq86kN5DQ== X-Received: by 2002:a1c:a304:: with SMTP id m4mr26853973wme.49.1593589572658; Wed, 01 Jul 2020 00:46:12 -0700 (PDT) Received: from ernst.home (p5b02319b.dip0.t-ipconnect.de. [91.2.49.155]) by smtp.gmail.com with ESMTPSA id x5sm6348508wmg.2.2020.07.01.00.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 00:46:12 -0700 (PDT) Date: Wed, 1 Jul 2020 09:46:11 +0200 From: Gary Jennejohn To: Andriy Gapon Cc: arch@FreeBSD.org Subject: Re: INTR_POLARITY_BOTH_EDGES? Message-ID: <20200701094611.3ea1e996@ernst.home> In-Reply-To: References: <20200630164613.0ca1d6d3@ernst.home> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49xYFL0xwpz444Y X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spam: Yes X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 07:46:14 -0000 On Tue, 30 Jun 2020 23:07:22 +0300 Andriy Gapon wrote: > On 30/06/2020 17:46, Gary Jennejohn wrote: > > On Tue, 30 Jun 2020 11:22:42 +0300 > > Andriy Gapon wrote: > > > >> What do you think about adding this to intr_polarity ? > >> I think that it's useful for two reasons: > >> - support for GPIO interrupts of that kind (GPIO_INTR_EDGE_BOTH) > >> - symmetry with ACPI's ACPI_ACTIVE_BOTH (which probably exists for GPIO as well) > >> This new polarity is to be valid only with INTR_TRIGGER_EDGE as the name (and > >> sanity) implies. > >> > >> By the way, the name is a open for bikeshedding. > >> > > > > Seems reasonable, but to my embedded-software developer's ear INTR_ACTIVE_BOTH_EDGES > > makes more sense. I mean, a signal may have a polarity, but an interrupt does not. > > > > Well, the enumeration is named intr_polarity and all its existing members are > prefixed with INTR_POLARITY_. This is probably not the best naming convention > -- in retrospect. It sounds natural for level interrupts, but somewhat weird > for edge interrupts. But I'll leave changing it for another day (if ever). > OK. Seems like weird terminology. But consistency is important -- Gary Jennejohn