Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp512756pxa; Tue, 4 Aug 2020 10:51:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGLoH4DCUUw50hVKSEhqvT3Hv5GptYIFj944XkBbg7YYDue7GTFLHq3ch7hkTF8RQis8AW X-Received: by 2002:a05:6402:3110:: with SMTP id dc16mr21670806edb.218.1596563459797; Tue, 04 Aug 2020 10:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596563459; cv=none; d=google.com; s=arc-20160816; b=uQVoP/8FMf6qEqAhEywQVc7vjChja2JfTlD00v3pGhA4e0IgltasEH93kJKFEzCcgR bzkqfm4ZcMNOfWCu69DZQ4xGIm71+9oYAWSW/qfjvoR2Bgd2QeoyoVOMIRLXkQMWD+ZU X7sc4PfJEYGS1rUTtysGXqla0sIVN7pcwV8uuPu7rJ1oia9kFYhx8PXaUZ0xP5uEdWig lVxIespn0wyvFY0W+wjcjFaHnupTe/DpA4Tq2hkEIluitEcc35hV8IJcUlcVvRQeBqwJ Y7G5PuZC3K2HZ5V44oD00AumLk3QtTDU8oszOBx0LmnjgkQhc/nfUKngjxzTPbq+RSGb N6Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vJQZtv+ow+YbDJRfhWQ9Vcz7jUjTYioprT+26YJF36A=; b=0zftFVX9nkpwjoQsjBAqDa7ybBSe7unLA52KtN5waRY62gQICJfpz9p9bt4fc1Sf1X mAU7OuOUnX/lOqDFMb6I+PjUYiUELHMn7K0SVCGZJEBuTck92PJ5jIEfIMfXu9SBAU8p wAxbHRii+vm3EVi7r7mvk2zskyjamSyQTBcPwzgp7BeXdOiH81aL7+Ty8k3ReHH4jwK6 4cwMTjGmo6vp/54VABddo32j4VrEeCZ2aaNn6PXeFmOmzN1UJFlQE8eQRfU7ii61pgpw QkPmab2QE4hvP9oB5ILMK4yJt7mTCiyb8zpUG2/9mll5Jir/kdoK8QNcJl7A9fku2G4b nMXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=IFMbREdn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k10si13605629ejr.155.2020.08.04.10.50.36; Tue, 04 Aug 2020 10:50:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=IFMbREdn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730142AbgHDRr4 (ORCPT + 99 others); Tue, 4 Aug 2020 13:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729197AbgHDRrz (ORCPT ); Tue, 4 Aug 2020 13:47:55 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D0AAC06174A for ; Tue, 4 Aug 2020 10:47:55 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id 6so31618365qtt.0 for ; Tue, 04 Aug 2020 10:47:55 -0700 (PDT) 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; bh=vJQZtv+ow+YbDJRfhWQ9Vcz7jUjTYioprT+26YJF36A=; b=IFMbREdnSywh01d/8n0vqGeCkKX0UfmKFrN1Tvu3eFG34JVWSRXLe8u1ZN7BHiCoe4 1KZ+oMGQMvJPPTVOiNiGtdXG4NRgwihXeI0NTMkKiPoO3Gh1VbYGxgJxDfQHTlJJtyRQ CpYXD2sK6kSR9soFySDloPfnakYOwvAFKrTFhNasuJ8GCobev408Qd545YoRtUvS2r2t 5p6YIn9iZiPITNf2LD/SPtyBx7n8ouN53crP3bOmD9ANaDFC9+lDf4q7pBm+Opf6c0SZ rWSG7+rne0nxrJc1itsSLNzuT0wsKSiCesA81pBzsp/Mm8S5Ec951eddaD+LjQVBTY8m YKkA== 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; bh=vJQZtv+ow+YbDJRfhWQ9Vcz7jUjTYioprT+26YJF36A=; b=rmtK3qIXreIihgLKCDCt7UXjk4eR9+l5xqX+0dBvLslbE7EmCyIVHdP1ZpT9z+FZmU Y3/lop3tx4coXliZKvyYPIoYH2JE3YHonQF7IBd1pqsClIQKZcAjwNi5sv0M+8B+3acJ gOzsNMdqLqdxoDyY6xB/lLxIkyNQbOOTaIoBH4tyDtrEBcDbkI03GlS2oiVXRiyHM2rZ 7ijK89M03DC5eRFCdvFdwBHeJR4kBsazK0QvtYEBJPa2tzux0qCewYaLp9cQidbm67Ae 6ALwsxfd0AP061Y/HH4Y+55j2xaE3QCWoeHLmdzSBwjlWmgArgBtDnr8BYn7ZDT2G85j stww== X-Gm-Message-State: AOAM531NIf1VPWAjIyxzyk5PbW1Ayu8INxqh307s/cM8E2U3mLLfPvIa gipIxD8RFoRIXXQJvTcUMWX63ub4Y1BRVCGm2mNdjw== X-Received: by 2002:ac8:1488:: with SMTP id l8mr23068578qtj.131.1596563274360; Tue, 04 Aug 2020 10:47:54 -0700 (PDT) MIME-Version: 1.0 References: <20200725041955.9985-1-warthog618@gmail.com> <20200725041955.9985-6-warthog618@gmail.com> <20200726011244.GA6587@sol> <20200802033158.GA13174@sol> <20200803230118.GA3650@sol> In-Reply-To: <20200803230118.GA3650@sol> From: Bartosz Golaszewski Date: Tue, 4 Aug 2020 19:47:43 +0200 Message-ID: Subject: Re: [PATCH v2 05/18] gpiolib: cdev: support GPIO_GET_LINE_IOCTL and GPIOLINE_GET_VALUES_IOCTL To: Kent Gibson Cc: Andy Shevchenko , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Linus Walleij Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 4, 2020 at 1:01 AM Kent Gibson wrote: > [snip] > > > Also: I just started going through the patches - nice idea with the > > GPIO attributes, I really like it. Although I need to give it a longer > > thought tomorrow - I'm wondering if we can maybe unify them and the > > flags. > > > > I had an earlier draft that did just that - and that is partially why > the loop is last in wins - I was using slot 0 as the default flags. > But the default flags cover a lot of use cases, including all of v1, and > it was simple and cheap to provide a default - and it simplified the > initial port of libgpiod to v2... > If porting libgpiod to v2 is the only concern then I wouldn't stress about it. At the same time I'm wondering - is there any use-case where we wouldn't need the flags attribute for at least some lines? Because if it's always required than maybe having a default isn't that bad. Bartosz