Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp867485pxf; Thu, 18 Mar 2021 13:32:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjLt+wpkyLKPual15RQxIC+8UXg+4akHYfIPHFZWRkXkkMFLLVFzr9wb6zTzHkKwcqVZQ7 X-Received: by 2002:a17:906:3952:: with SMTP id g18mr457294eje.104.1616099569089; Thu, 18 Mar 2021 13:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616099569; cv=none; d=google.com; s=arc-20160816; b=Tar0AP407109CHjS8ypqlJcXbnY/F8dt0W1bbgJ0xFxGv2L3XhGQeU5WwI7FQyGPE1 c0RIABXbfDCZgbTIl6+Lz0gLhcdW25NlT28VwMxSVmQNfVd+1uX/7Jt/Wu+q8J80B1rY uwRkJOi20QBA+E7uX98nynzxnowR5b7Fy4202mwgbi6B4d6xRLqACxnlRwl/hcuzuFCB id6r6U4o9orpAPX1y6a7sV6aKLieJtF2HBIEBUrRB/Ug9bw8sxWi7WmMC/K1u2VXRLNY LZfJJLH988e3bmr+YsIBVifMfwFuf2q+3lma3S+5TkoBtsOyJkV+CfM0+ptavoCABGD4 1v8w== 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=Gn0hnJYZfg4Iz6ZCMPIjQveIDYMZQxxJBvj+S3RwuvQ=; b=bTd8JSuNGdxsSc5rWTBBBzcqz7Ji1JRDsbCYz/0iKsdPJSX4nN7YMpoq0zNW5H6/g0 h3XCvHf3zLQetMjjtQBNADE945Kdx7MOVqSCuVlfROYDqLf3W5ZRm+vpZ7GR16r9tnvg oP3oQM7bu3jUVGX1G1QS+xBZuup2W4qZt8VPe6hQ3UUHwgzrCNGUX2cnbCvXYbjWCnx+ TkZaR9Ou43TQYbvOObGjpnEC3tgo4JArnTKOruJ7mvF6FYfoilgLvqGtOyJv76Khjeqw QHNTQrHGWSv7CrHn/1knKW/fDzdwhnWdM1BrK9WrkAs8P88btnQC0oRyHTkND6UkyUvl J1cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VqiiBSmn; 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 dg2si2410131edb.136.2021.03.18.13.32.26; Thu, 18 Mar 2021 13:32:49 -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=VqiiBSmn; 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 S233276AbhCRUaY (ORCPT + 99 others); Thu, 18 Mar 2021 16:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233139AbhCRU3k (ORCPT ); Thu, 18 Mar 2021 16:29:40 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A24AC061761 for ; Thu, 18 Mar 2021 13:29:40 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id r12so6022460ejr.5 for ; Thu, 18 Mar 2021 13:29:39 -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=Gn0hnJYZfg4Iz6ZCMPIjQveIDYMZQxxJBvj+S3RwuvQ=; b=VqiiBSmnRsjGafnGAAhSOYMPz2iJuV3VYPF5aFJN0HmPgtVACvNWJPqjRLtMc+X2ZF y3k3Ab0CtSr4tDpW2fH7ogKoaya0nlkWO5Jgf0iF4PLAQUxNzM2CLDevDe24L4+CTQWq U8DWoA5BXjPaO5jdxA2xEmn3Bz8lsxs/TOHZ0= 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=Gn0hnJYZfg4Iz6ZCMPIjQveIDYMZQxxJBvj+S3RwuvQ=; b=RO6K51VTuUN83ykG+nuRGBSSXyvakWteo9A5CAVqXCZV45BdN+RK3dK0c1dlN7t6hy Hjm6+J2SDjv/+BCH+x14VV6GsDP60Qn0sR45gpTwWjgxZQUKP6tn6JzGCupvIxPzNGSq 7LtK+XZl0YN9YyhuXbq7YkU3do9gsbNBVKMQh9yvFKOlAoMccEo98M/CaGlXxS742z2B whtOORhzIhs2zSTcyzJhyX2pw7+BFwGiPkSBNt6o8PMSmUdzxpqqM5unK4lDDBVp+qPg p7q4IyAIjqp1FaT+2RglMf73WGcXuG8PLf5w8UZn+Ay753EmENL+r6+b3pwNXb7XbGP7 KgwQ== X-Gm-Message-State: AOAM533UW9AC2chza3o45bkCRl5CdpDH/oFgPM/HuvblyzrufcpoJ0s7 RPzoIPztr6IRQm4bv9oAIPwiDA== X-Received: by 2002:a17:906:ad4:: with SMTP id z20mr399682ejf.496.1616099378764; Thu, 18 Mar 2021 13:29:38 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id a22sm2533767ejr.89.2021.03.18.13.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 13:29:38 -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 v7 14/17] media: docs: Document the behaviour of uvcdriver Date: Thu, 18 Mar 2021 21:29:25 +0100 Message-Id: <20210318202928.166955-15-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210318202928.166955-1-ribalda@chromium.org> References: <20210318202928.166955-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.rc2.261.g7f71774620-goog