Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp367848pxk; Thu, 24 Sep 2020 07:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsOQXX3tZDOp+P1+YY1y5CIEACMS5bd1xvJSccgQL/zJwQ3BxYdjRRmlU+vho2sWenBo7m X-Received: by 2002:a17:906:1f43:: with SMTP id d3mr150372ejk.395.1600957991569; Thu, 24 Sep 2020 07:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600957991; cv=none; d=google.com; s=arc-20160816; b=tKOteHOrpIzFHe0pU/B94ltinDMsQi/wKBz090G5+LNMxmihFN90ez2Lye7hIw7ANz BM5vVehsi17OwwNaJyxp30TtH/+b4skAEpW+IR4fl28I5VriSjAg1UIioJqQDUBJbgW+ nemjG3XkBJB4B0A4QfWvrRW/3tZlo+WDw7RpFvVU9wU639O88JY5lw1Fy20YX44QxiQK QwndGFn3te+0n2ZQbRZzXunl2ON2iBxyj7mquzG2KWetv1ABrIT00uO9kAXgmNN993CN LdtSvI76VmftQ+0/vNv+l77bh+GpcEBIJ3yq36zVxJPdgPA98Iyj4T7gJAKKVdT50jnQ 3gTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wyenqVgWWi4hktsJwzPOHau41VJA6ADzsTIaBtagdwg=; b=vfXFdIx2OOkk3I2uKEdQrf9Jt/CUgLRKFemDSYkDicmZNuFpe9cThp9UDlmUUXObEQ ZuW8YBYVT1sLM9CM2X8tGz3FFkyZHKHaU42Ej5TEUq7qJzplAXjbf9+l0NmC2YFx84Pu /NuXBtgqF+KATjZA5gegmn66sw6moOJW3bl9/5sAbEYyDdDlvem60+9nkDhC57VKgfnf bLgoH5Gktna2Ii/9kSTyujvah7cJcGa8/PT/YSxjKxvP7qiMFH9SjV8sVsFk70ZSuyI+ 5SXEak75vLU+PyIv96s31dYm+j2Q1f2f1JNQFN2PPpUCMKZgwKiSMVrPM87Iul1n2wgM 4i3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=oGg+bfbV; 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 m3si2052527ejk.485.2020.09.24.07.32.47; Thu, 24 Sep 2020 07:33:11 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=oGg+bfbV; 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 S1728210AbgIXO3S (ORCPT + 99 others); Thu, 24 Sep 2020 10:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728088AbgIXO3S (ORCPT ); Thu, 24 Sep 2020 10:29:18 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60443C0613D3 for ; Thu, 24 Sep 2020 07:29:18 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id q4so3522129iop.5 for ; Thu, 24 Sep 2020 07:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wyenqVgWWi4hktsJwzPOHau41VJA6ADzsTIaBtagdwg=; b=oGg+bfbV8u4czH/xcGWFrzD+5g+KopuhOxjfyLeiZw8qjVXfh1Kwq1IaAeS12RdXOD ulf9INUO+pqdf0SA8o2iNjo7d3TRsEqAseOjvAt0RRURntqGkEkP5SxTy6setnBoP0m8 rlPjYioEGWS15IuamLyhe5+3YvrWYyH01/F9KzhdBDA+emLdTvgDQkZMTb0g+z3SGSPB hzKcJAUse6H86OUeRe2CPbhH+owjg3Uyh82JiAd4q+qjaHXo7kCU0eWwIKJGBHNrvz05 5vTyOV6dG+zxUAEolmH6czPcmkVL16E6BDfdEBmGuumIaQ5HQNX971xEl/XSLk/zSHIy 9n4A== 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=wyenqVgWWi4hktsJwzPOHau41VJA6ADzsTIaBtagdwg=; b=YOgZ91G+9Q0M/nyBxt3VDKZU0Kw5QezHNVKcynR8HAb4S1zeUz2KmOxg1aWUMF+uat P1ce78V3hW+wgOsvOY4quLBy64U/PU2EQAeSY+LF3PSFj8yv7wJrMTx8sgMEpNsFfwXw ptZZpx04Vofaa8nrGPI9WSJEkKbByTgEt604IWKyjMv/kDFJBxpxlVL1sEFRREQQuNqX qL4MJBbhDhhNCSXApSuhMnOREWn9MpFX5iF1+CZ/CHgI6WgdHpqlkJB1V0ydu4i3SSSQ wXWyD5nADoQhBFuTRV97b/ZGI693xfhs/pk++xD5yk6ylOmbBNSXAi3RM5Z/eM+uKDNM 2k+g== X-Gm-Message-State: AOAM530umqhJ1nGMg4/IRaJOL7xwl9pwJZde9qV583wo1tHmqysajPBa xaftIgc8B5zJnk6rcmpdh6eCozKh0qMfxm8HD1ef8g== X-Received: by 2002:a5d:8352:: with SMTP id q18mr3623282ior.31.1600957757687; Thu, 24 Sep 2020 07:29:17 -0700 (PDT) MIME-Version: 1.0 References: <20200922023151.387447-1-warthog618@gmail.com> <20200922023151.387447-8-warthog618@gmail.com> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 24 Sep 2020 16:29:06 +0200 Message-ID: Subject: Re: [PATCH v9 07/20] gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL To: Andy Shevchenko Cc: Kent Gibson , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , Linus Walleij , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 1:12 PM Andy Shevchenko wrote: > [snip!] > > > + /* Bias requires explicit direction. */ > > + if ((flags & GPIO_V2_LINE_BIAS_FLAGS) && > > + !(flags & GPIO_V2_LINE_DIRECTION_FLAGS)) > > + return -EINVAL; > > Okay, since this is strict we probably may relax it in the future if > it will be a use case. > ... > > > + /* Only one bias flag can be set. */ > > Ditto. (Some controllers allow to set both simultaneously, though I > can't imagine good use case for that) > This is an abstraction layer. Only because some controllers allow this, doesn't mean we should reflect this in our abstraction layer - especially if we know well that this has no purpose. Bartosz