From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6B81C433C1 for ; Fri, 26 Mar 2021 10:00:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DFB261A48 for ; Fri, 26 Mar 2021 10:00:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230296AbhCZKAE (ORCPT ); Fri, 26 Mar 2021 06:00:04 -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-Google-Smtp-Source: ABdhPJzStos7JXr9MhMZG/mBlM5P25jaxM6iCVYVZbmBpuYaYUdFWD8Xfgc03hLuZShCs758SpOk1w== 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