Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2193438pxf; Sat, 27 Mar 2021 05:05:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx8B6/ejUIEGZ9C4caoKH1bp4o9J4MQaTWfu6waSfv6jVTd0IU9ihEhcgx4dC/B/703Bn5 X-Received: by 2002:a05:6402:6ca:: with SMTP id n10mr20226089edy.312.1616846715367; Sat, 27 Mar 2021 05:05:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616846715; cv=none; d=google.com; s=arc-20160816; b=WCH77cctuapDIw5NuUFukgioVg3XgMSfYcXsegZ9Qbt6TXeVgR322JXmVSPNUtnxt5 pSqww5/fk9S+pCyGFPhnNjDWPna+ECVXatwLIOQdi9J30JVoGpMmOPs/9wGFWsYPYhMQ gmcb9xUCLN07k/CiZfVVD0scsLRP5dq2UD9Jk5e19jPGzemseTLq8c6XTRRAbPxuh9AD 1ZGuGjm1GjSKHdjBvTYIf6IR9eSdR42MLLlQwangGZU6OR7NZk1Pw9gC65ExeDKY5oXA bGDZ7/wGlZJnfbfJ4RGgCYwfJRM962iGA51AAp1UaMC3LaM33/DpYjCFUHiZRrHCBmhg VGBg== 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=SIMDPHXnJc4poV3DKrIm7RFRUBMc9NywN8NXzt4umxk=; b=KfxbJMahsYv3wn36KTSHoImwLvEVq7k3EgZO0JBt62Ju6dlIFX4LtUF8xTPUF/xOME UF8cxDax/j3HKoEozf0jx/QfgBagzFzzYBFpy2uia+cFkcP1zG85r4VcyjjFuTsnSDAn kOcZOX8tjVquh0nABxAGGAoDS+bb8YuEt+LA0aNAs9t72NxAmzoYYkotPw8Ldu2HCNC+ rISw6Vc9btumnHOD6iH7ri9SFRm93Y+j0N4Z+PFB1EuGiuyrhCI1RhVyBaeQLK98KCLZ MJA3A0g76rpTDyXv6wwOOYtY0QewUrYrhRoBroLokyUd7dxu79E9mF3H5JswjcsW+Btp Oq+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YDR1mNp5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si9671166edy.444.2021.03.27.05.04.53; Sat, 27 Mar 2021 05:05:15 -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=@chromium.org header.s=google header.b=YDR1mNp5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbhC0MBV (ORCPT + 99 others); Sat, 27 Mar 2021 08:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230350AbhC0MBS (ORCPT ); Sat, 27 Mar 2021 08:01:18 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26EFBC0613B2 for ; Sat, 27 Mar 2021 05:01:18 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id z136so8068305iof.10 for ; Sat, 27 Mar 2021 05:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SIMDPHXnJc4poV3DKrIm7RFRUBMc9NywN8NXzt4umxk=; b=YDR1mNp5BrE/gjrSZy1efWfV73zp8U1ihFzHdIcAXNCjB1AdgU4Lwm0GP5/taC6g3y uc31iy/AdZ3D5/n/qmQc6KLwOPNbxo7Oq7APscOsvp8tptMzMjVLc7bVEKgfmzCdg02/ wiVmucF4BNJoapFvJH1LqOo1ldLjRJPsgZOtU= 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=SIMDPHXnJc4poV3DKrIm7RFRUBMc9NywN8NXzt4umxk=; b=oRht/I1wcIk/R3A1tS8wWEDX59IADQsLByS1V02ZxJKGGO3BNusHCq43w2+CKtbiq1 pbTSEd6HP3FXM1Yy9PRgvt2zk+XDZLf2UclH7ozXNLXfpEFZoq8ho/SSVntna4P37Bxi 6r52+Jrjn4zWQxSQ6A+VYYbedSM2oUWHjzQo7ASf4NcqWwZnHk87twiCqvvPgzhTR32n 2y+dUMGsUNH5c0uGfaool1XEX9Nwz0mgMNOJWpZNEM4HhuJWCmIPm+zhRNonBv7XMTvX tTrrIpKr7N1YTHIYGsiUH8dnEiAZSvCN0HbhjW3fb1WaCx8GpSTNwqt3W/p2cpmOgiwK +L5w== X-Gm-Message-State: AOAM532/BKz72+NM7ol98an7KdSVHQW92I4/VaQRt/RKG0JrW2QFdbAs USZeUkWmfDaXOfvHTfkqv9N2l/RSZG5vTQ== X-Received: by 2002:a5e:980e:: with SMTP id s14mr14322376ioj.63.1616846477286; Sat, 27 Mar 2021 05:01:17 -0700 (PDT) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com. [209.85.166.176]) by smtp.gmail.com with ESMTPSA id i13sm5847101ilm.86.2021.03.27.05.01.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Mar 2021 05:01:16 -0700 (PDT) Received: by mail-il1-f176.google.com with SMTP id z9so7301348ilb.4 for ; Sat, 27 Mar 2021 05:01:16 -0700 (PDT) X-Received: by 2002:a92:6510:: with SMTP id z16mr13518318ilb.71.1616846476099; Sat, 27 Mar 2021 05:01:16 -0700 (PDT) MIME-Version: 1.0 References: <20210326095840.364424-1-ribalda@chromium.org> <20210326095840.364424-18-ribalda@chromium.org> <417be36b-850a-84b2-dc68-c1bec85e2edb@xs4all.nl> In-Reply-To: <417be36b-850a-84b2-dc68-c1bec85e2edb@xs4all.nl> From: Ricardo Ribalda Date: Sat, 27 Mar 2021 13:01:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9 17/22] media: docs: Document the behaviour of uvcdriver To: Hans Verkuil Cc: Laurent Pinchart , Mauro Carvalho Chehab , Sergey Senozhatsky , Linux Media Mailing List , Linux Kernel Mailing List , Tomasz Figa Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans Thanks for your review! On Sat, Mar 27, 2021 at 12:19 PM Hans Verkuil wrote: > > On 26/03/2021 10:58, Ricardo Ribalda wrote: > > The uvc driver relies on the camera firmware to keep the control states > > and therefore is not capable of changing an inactive control. > > > > Allow returning -EACESS in those cases. > > -EACCES This british people that like to have a lot of double consonants :) I have updated the series at: https://git.kernel.org/pub/scm/linux/kernel/git/ribalda/linux.git/log/?h=uvc-compliance-v10 Will not post until there is more feedback to avoid spamming the list. Thanks :) > > > > > Signed-off-by: Ricardo Ribalda > > --- > > Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst | 5 +++++ > > Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst | 5 +++++ > > 2 files changed, 10 insertions(+) > > > > diff --git a/Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst > > index 4f1bed53fad5..8c0a203385c2 100644 > > --- a/Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst > > +++ b/Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst > > @@ -95,3 +95,8 @@ EBUSY > > > > EACCES > > Attempt to set a read-only control or to get a write-only control. > > + > > + Or if there is an attempt to set an inactive control and the driver is > > + not capable of keeping the new value until the control is active again. > > keeping: 'caching' or 'storing' are better words, I think. > > > + This is the case for drivers that do not use the standard control > > + framework and rely purely on the hardware to keep the controls' state. > > I would drop that last sentence. It is not relevant information to the users of > the API. > > > diff --git a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst > > index b9c62affbb5a..bb7de7a25241 100644 > > --- a/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst > > +++ b/Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst > > @@ -438,3 +438,8 @@ EACCES > > > > Or the ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL`` but the > > device does not support requests. > > + > > + Or if there is an attempt to set an inactive control and the driver is > > + not capable of keeping the new value until the control is active again. > > + This is the case for drivers that do not use the standard control > > + framework and rely purely on the hardware to keep the controls' state. > > Same comments as above. > > > > > Regards, > > Hans -- Ricardo Ribalda