Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1188172pxf; Fri, 26 Mar 2021 03:01:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa4b/K1PbO8mFN6E7+GTgAGC9SYps5oGxBKUiFix7GUuKRKzcj+WeCAKSXfZuT8efb2rCR X-Received: by 2002:a05:6402:4301:: with SMTP id m1mr14488452edc.210.1616752917018; Fri, 26 Mar 2021 03:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616752917; cv=none; d=google.com; s=arc-20160816; b=nzuCb0ALPSJ3AkrzKh5woGK1BCilhS5Nqt47e9Lb0kaTH/w/Wm8lSgk3xVlv1AMH4F 1uZuyYkB+L1Y2rgT7HyOa/LJHrwDkLuwQJc/4EY3M2lbqfi8CsX5x/sB118HXx1e/jn/ uIqL/+oX65Gezc/GQ3qKuTrA3QL7VLXMsKiDFqOM0Fi7nteLlI7qOAWlVwFaNs4zTFA2 9BR2rdZZI0UNDrC6RYC3vHc6pJ9mgjC/xtsSz+lurWSZAFo+rPiRumQrpruU9Cpf2Qgv T8SxJghdgKabEZJU7Or+w5Zf/X9dVZ4v6xe9N957La2wIxtEFhwZFomuhgJiWN/AsEgM PchQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U298rYjAJn0L1+zqib6+wctgA7KMqrT5dPHppU9NIJA=; b=cABWBoAJs1g/wOA0HKD2ATHBAdj924ITwkumlA4NDVA7f6GLJ+UFo76sObqB8Y8bk0 Fhnk/mhXtApgNhjUach5CsocGVwjgHazzy681rdE/ClKNGFJ1CtOPzpH2YABco1RF+LQ CAaBgQ4wYKFr9jKFBQsrfcEGdvZBWURGSaWjles/l1ofGG0R9J2WxhFZNSlLkJfhBeJm ZuvhwM+swPE88pY3qDp62BPZvjU9mBVHpkwx1eZGpK4Eh/y5auDpfmrw4EvMyCqrkPNO 1uBmoy+1UpHiwcZL76sorcvf4cDNb2VMItxaLKWHwKkCqqWYHR9gInGPzLIu2G8bLPup L19Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZwtnL7gY; 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 f18si6657456eja.587.2021.03.26.03.01.33; Fri, 26 Mar 2021 03:01:57 -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=ZwtnL7gY; 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 S230051AbhCZKAC (ORCPT + 99 others); Fri, 26 Mar 2021 06:00:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbhCZJ65 (ORCPT ); Fri, 26 Mar 2021 05:58:57 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C304C0613B3 for ; Fri, 26 Mar 2021 02:58:57 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id e7so5592592edu.10 for ; Fri, 26 Mar 2021 02:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U298rYjAJn0L1+zqib6+wctgA7KMqrT5dPHppU9NIJA=; b=ZwtnL7gYMd3BCd6nvE80yX4oFyZmkNnPycNW8ZMb2OHLJQhiGn69io0BHtvSEDofge X1bU18SrBQt+hc0jQUr4aVab4WeATFl/XmaoXs6EX87p4vaWj0wxTyn3YHGRcLsPDpLY NEjBLZBNp5EOHLDEDjLjYCJqfbV9dJDPL21DY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U298rYjAJn0L1+zqib6+wctgA7KMqrT5dPHppU9NIJA=; b=tfqWo2cYNeMNYH2Ow8c1Op4RoB6TxFjXtMBG7zUXi/f8vtwKXypG1yFp0Qrlle1Ktt h26du+lDLd7TRcC0txweTEcoYu/3PaimkSFhW1tUgUkY4VAN+cLa2nGq/YmnmrkXfqWo wDUhvqv5lY8TDIuVHJ5ucdoBktZd0Ta8DJkEc3kevkUiSRwlQrcVteQJT1hJ/VEVPFtL swkQhb3gNWdqReT4IRb/w67BvKoqYHIczZFDO8ySNlNzWtz+SllGT/VTc5fJW2C9Ru4V x/BlDg+PdNF+9jgqUUkH0BmgsdwQpAZMC3/gj2bdka7zfxbR/tFFQhKZMs8qAehrRJzm x5ew== X-Gm-Message-State: AOAM530yKRSAtI+QZLPFhrfvJXLVdx1luYhpvlXXm/eeF4loHtaa1Hf+ Nxw4ywB+RR/1tdfRNs8eHslcgw== X-Received: by 2002:a05:6402:138f:: with SMTP id b15mr14026182edv.121.1616752736122; Fri, 26 Mar 2021 02:58:56 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id h13sm4036658edz.71.2021.03.26.02.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 02:58:55 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org Cc: Ricardo Ribalda Subject: [PATCH v9 17/22] media: docs: Document the behaviour of uvcdriver Date: Fri, 26 Mar 2021 10:58:35 +0100 Message-Id: <20210326095840.364424-18-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210326095840.364424-1-ribalda@chromium.org> References: <20210326095840.364424-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. + 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. 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. -- 2.31.0.291.g576ba9dcdaf-goog