Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp85824ybl; Tue, 7 Jan 2020 02:39:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzHmaHch5mzCDUIEFrXG6WiWWY44FiqqeTTGOERYJ6eBv5rv+dGNjLCkbs3ohXKR0pjPIbj X-Received: by 2002:a9d:3676:: with SMTP id w109mr105003505otb.35.1578393599498; Tue, 07 Jan 2020 02:39:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578393599; cv=none; d=google.com; s=arc-20160816; b=ZQ1yT7WML+VWxGQmUzVsQ5NGu7bJ1kav+hrGkTKScA2lUZIrT2x1VfEhk1FIrt7XvO 2FvdhUjuZfjq4UtcGyRs/WIpuamhuSF2iDAQbv4qAFG5qhUotjrwj3lGuwyRBAS83E9d sykWucwk20PbP9k13sRlFG/44Q23zV6LtbE3ZzWRKTi36TGIo+8uYfB+3D4KOPdrI3Zs Xe5BAVa854FjfV8QuDvrH/u+FWEZJHMp7Z9Ll1Cg30XfXdhc9cr5Ut8epWpRuoqGwPdx E3foklr4rMrvrSv3QDk7jpvkelvxgUWtpfDhlej0PWI/Io3yuRU/+y7eoNK5Akfp6M/R MrKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fpJndPxyZ4R+jrK+jYf8rr5h0Mx9Gx0vV4jnzYZ9o90=; b=ekbUUFL4RYa0Q/bDiiTp6jfre4TSViXKGShtsfWQS457m6UrnZefe4UkvDNmGzX7Ry UUWWKIZnDYJS6JjVbSLoNT5qTOaMnFDHOOn28S5ntFQCYKVruh3F+1jqFUsJ5V7zK4Av /4ES9z0MlWbivoB+ngzLIUPVBgwFAFSWQNbdW0BZfbrrSCojecdNBX0NG1Y/4WA3n4cb XtGI4pn3DyyIX9JiaE9ykuAVeRkvxwh06cs+8G/mGzuxs2lMcVlXY7NV4wcbt0p2DdB3 AbO60pMdq8gUxRrVAyXhuk8dh4k0h+1+2hQXEk9+FF8t8Jjk6x273Jen3XZ/cUpoctpj 4Mqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ZRYo76yK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si34823634otn.108.2020.01.07.02.39.46; Tue, 07 Jan 2020 02:39:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ZRYo76yK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727854AbgAGKit (ORCPT + 99 others); Tue, 7 Jan 2020 05:38:49 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:43938 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbgAGKit (ORCPT ); Tue, 7 Jan 2020 05:38:49 -0500 Received: by mail-qk1-f193.google.com with SMTP id t129so42188589qke.10 for ; Tue, 07 Jan 2020 02:38:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fpJndPxyZ4R+jrK+jYf8rr5h0Mx9Gx0vV4jnzYZ9o90=; b=ZRYo76yK4Ep4lXuT3n8Ha2XS6sXPq73ctrxZg83MQEjRpIl4t+6y4n+h/bjxe1vLbg hCW9PizMi6zlo5oAScKGk0BsUz+mXQdA10p1IYRBvAev5hjg/UQuzrEHMKN6heFOHXdw GFPs1uH6Sxxwt8QHadQAndwGb2+q61QVCrBBx1S0xduB3Tiiyd8GYWmbKJXaLRYKHoSq kb5qM4jUpZwnWb0rjin3K4uokTrbMcNkYHWR9HLPyLNlgSBIZ4k7PLYKC3aKP7gXH6v1 681NWvHC0KZLpD2uxAX4KHfcC4zRN94sNCDo9g7AFUaokK6X6NK2VR384HY5TKXuQ1Zw pcJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fpJndPxyZ4R+jrK+jYf8rr5h0Mx9Gx0vV4jnzYZ9o90=; b=AkLx1OwxZEjzWWqV1FFDkAk30XiG8GgxAQiIgUT6gMgXr8DwCpkKnG0bbBksNxvsh6 UN8ZMUOJzzEAzKvAz0lP/SzNZt3GUyjvqLHNt7qEEcLaukO7bpX52e9hiw8aprx/o/qT CUeBJvA/D5Z0uuuyBwzUqR0JwLLYBHU6GxTfNiA38onwSBHwBU4oG5xoqmOO4P9Ehvyl AIO2lrdd1ya/MgweAxxaJ/9hbME692VFLSvVOmQ8fpTYLPhqMfC88oiTCJq1YtgzclNE 9jjl64NCbw8lsSYlw/jkpgeJcGw7+DW2kVQQkcpONY2P1sJPcZ9wPoEPbuEOIUTbLpWJ eBJA== X-Gm-Message-State: APjAAAXg3jR36mepQL5ZauZFnbYd4BQLXRVnI8p84aUa/1R9asA7DrHs fAM3Bv24pLOAqSRErV+9Vegs/wDXkcfqQov/1Q/Wyw== X-Received: by 2002:a37:6255:: with SMTP id w82mr88081222qkb.330.1578393528231; Tue, 07 Jan 2020 02:38:48 -0800 (PST) MIME-Version: 1.0 References: <20191224120709.18247-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Tue, 7 Jan 2020 11:38:37 +0100 Message-ID: Subject: Re: [PATCH v4 00/13] gpiolib: add an ioctl() for monitoring line status changes To: Linus Walleij Cc: Bartosz Golaszewski , Kent Gibson , Andy Shevchenko , Greg Kroah-Hartman , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 7 sty 2020 o 11:07 Linus Walleij napisa=C5= =82(a): > > On Tue, Dec 24, 2019 at 1:07 PM Bartosz Golaszewski wrote= : > > > From: Bartosz Golaszewski > > > > When discussing the recent user-space changes with Kent and while worki= ng > > on dbus API for libgpiod I noticed that we really don't have any way of > > keeping the line info synchronized between the kernel and user-space > > processes. We can of course periodically re-read the line information o= r > > even do it every time we want to read a property but this isn't optimal= . > > > > This series adds a new ioctl() that allows user-space to set up a watch= on > > the GPIO chardev file-descriptor which can then be polled for events > > emitted by the kernel when the line is requested, released or its statu= s > > changed. This of course doesn't require the line to be requested. Multi= ple > > user-space processes can watch the same lines. > > > > This series also includes a variety of minor tweaks & fixes for problem= s > > discovered during development. For instance it addresses a race-conditi= on > > in current line event fifo. > > The patch set overall looks good to me, I don't understand the kfifo > parts but I trust you on this, though we need review from a FIFO > maintainer. Ha! This may be a problem - there doesn't seem to be one. This is why I Cc'd Greg. > > Could you send me a pull request of the first patches before the > FIFO changes start, they are good cleanups on their own, also > it brings down the size of your patch stack. Sure, will do. > > Yours, > Linus Walleij Bart