Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1249821ybg; Thu, 4 Jun 2020 05:09:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj6TfmZCON3o5pn3CyrJki/YmLCPvvp3C0M5uCNM+AmsMbvpab044fvT93bxTaW8xmuPgp X-Received: by 2002:a05:6402:1243:: with SMTP id l3mr4136843edw.64.1591272578483; Thu, 04 Jun 2020 05:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591272578; cv=none; d=google.com; s=arc-20160816; b=VbzdPIfwAB9sypAf2Czs3HoIGJ+eNgZcwS3pSTPpgswGQEssf2odYLX/f6jhY1Ni5L KKgrORcWLo3fxfhkR4xG367pydqi+JQtmvkEiyiJGzH5noiifiX4yVrDlxh5GwV5RTKA UxVgQo4kEQKTMBhnsLluMg7/k6UxjD1GI+E55Ja0P0n/jnx3yPdedGocGHf5r7zXrOXn X8IoP8RPofN9v0fXxb0WGNl68DaAQQmoDjTYsvESHuje8bEd0Gw3gj/0sKlwgudIXbH8 ynmMC29w6WIRxGfTGDNNiNL0+fFR0Cpze/QOKicoiRWIutmoEqrc+MaBKHLmFyxTRdEV 0Ncw== 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=jSQHC1o3f5m5emzxu9YBcPNRqKngKwzMlx+TKTi0XtU=; b=Ng5d8xzPZfmwCCCN+kAzYs++ih0YQfogCK/g5tOjsSrT8bsHrGeI0dPv6s5Fw5pogP ht/uFbnHF0VBcYPH96eBp4kpJge8KIpKeGStCY/mCnEniwpP595FXg4962ifcdCdUd8N KRZ3xTqKvldPY6FrAEJBNkLkODMcrZRESiZ7UtQY9qr4Q2rbhKFvvDDvEAeGkWrDO86q yLwfB1XXI5Dalg+wP22Wx7Vno8JDVVB7d3xXiWyAYnKf0BUhWRbAkYIBDvJfqfkJbOd1 bwitnpQT89KTwFLUlHsBNG4SWnIhmwYXlZghmYCiz6xZuTiPVThi/fcvf/oZLJZCVkT+ oSTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=JDruNPPk; 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 y13si1594275edm.63.2020.06.04.05.09.16; Thu, 04 Jun 2020 05:09:38 -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=JDruNPPk; 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 S1728577AbgFDMGr (ORCPT + 99 others); Thu, 4 Jun 2020 08:06:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728554AbgFDMGm (ORCPT ); Thu, 4 Jun 2020 08:06:42 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FE99C03E96E for ; Thu, 4 Jun 2020 05:06:42 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id w3so5658068qkb.6 for ; Thu, 04 Jun 2020 05:06:42 -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:content-transfer-encoding; bh=jSQHC1o3f5m5emzxu9YBcPNRqKngKwzMlx+TKTi0XtU=; b=JDruNPPkDTGBxJQk+jI2G9ZRH1SJmQtyus/t8H9KtBs8Rb9bGj1e1/ClynWK9gEbBt HNqs7c/AEdpw4zCNLIOrzC5Ucd6TqJ/WwrO92NFNQ7GuGw4DK8IcjKP4jYtD7snAe5TV EbAhGhVO9jTc/GFjwupNGZYe+owFtDNwy+IiVXJwWWYCw/LvGGu3mvWmnTLKootUzVYp wBUdWNuAD+BbmlCaVCq8otnoeyQhpefh5XQbTMZbDph6YeNPhYhZ0mSQgHl0VzmNxUi2 7bp0NDj74Krnv/WHb1hoA6WXqF+9hYvtvmnAD5KROSA5bDkPaAHjX3DiaAuzTy5BhyzC M70A== 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=jSQHC1o3f5m5emzxu9YBcPNRqKngKwzMlx+TKTi0XtU=; b=A5/azaVOWTYU6Dm4Np5lt95Z5vdeJegZtSU5UdbXtciZecJMw0rUkNP+UgCq+DL2f5 1coSGLkHh27KibtbSGwfR21lAxn0Jtn1yandMFq4DBW6Luq/HIoiWRCfkhb5+sN0X/0p z//3OvxMXijPJldNDojPi8zjIWJJwSf4G+GtXtropDBdA8IgM+rFlxouRmK19pGcNQMo nN5DMWR9W9fkVa6xSbhfs7sqMbhuyqMgAMPJG/aIWas6A/i77Kw6hrbFHcr1idYt05Vv 3YguLgwyDfGoE9oN/swc4xNTFdnHS/lfPWDYF/jpkJeA2lVWiYtsH6h9sKJC2Uup8zP4 J5PA== X-Gm-Message-State: AOAM533HYToDLFq9VaB45UXsroMYHYguO8SujG9VfymylLHaN+nb1pLo WJTeH6PK78iIIMUsVlm2FSZ5/A2hXvkVWORTK+Ktvw== X-Received: by 2002:a37:aac4:: with SMTP id t187mr3933753qke.263.1591272401774; Thu, 04 Jun 2020 05:06:41 -0700 (PDT) MIME-Version: 1.0 References: <20200516064507.19058-1-warthog618@gmail.com> <20200525141902.GA27938@sol> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 4 Jun 2020 14:06:31 +0200 Message-ID: Subject: Re: [RFC PATCH] gpio: uapi: v2 proposal To: Linus Walleij Cc: Kent Gibson , "linux-kernel@vger.kernel.org" , "open list:GPIO SUBSYSTEM" 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 =C5=9Br., 27 maj 2020 o 07:58 Linus Walleij napi= sa=C5=82(a): > > On Mon, May 25, 2020 at 4:19 PM Kent Gibson wrote: > > > > > +struct gpioline_config { > > > > + __u8 default_values[GPIOLINES_MAX]; > > > > > > So 32 bytes > > > > > > > Actually that one is 64 bytes, which is the same as v1, i.e. GPIOLINES_= MAX > > is the same as GPIOHANDLES_MAX - just renamed. > > > > On the subject of values, is there any reason to use a byte for each li= ne > > rather value than a bit? > > Not really, other than making things simple for userspace. > I'm in favor of using bits here. I think we can rely on libgpiod to make things simple for user-space, the kernel interface can be as brief as possible. Bart