From patchwork Mon Apr 15 14:13:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 10900903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A05571800 for ; Mon, 15 Apr 2019 14:14:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8547F28640 for ; Mon, 15 Apr 2019 14:14:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81BD72874E; Mon, 15 Apr 2019 14:14:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E14482896F for ; Mon, 15 Apr 2019 14:14:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727606AbfDOOOY (ORCPT ); Mon, 15 Apr 2019 10:14:24 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:38795 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727601AbfDOOOY (ORCPT ); Mon, 15 Apr 2019 10:14:24 -0400 X-IronPort-AV: E=Sophos;i="5.60,353,1549954800"; d="scan'208";a="29944499" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Apr 2019 07:14:00 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.38) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 15 Apr 2019 07:13:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VyzC6pA9oB/TE6h9w0402qhWTSUqVJMDYVlr6yWoV9U=; b=cbNqEWuu69mgUPxXJq+jqmxSYX4+Qy9iYpK5YfkY1PsDF1y6tAhaE+k7gm9zpagSg9V7GhcYvY6ohRUqLVGESwRkKagEXNROB+0beOQFk/X/OSDmeaWdVV91rKpCfPak65MBgjn3VBYPQwqGGv3VgaVUOiRGwVvBEP1VDjgc9Z4= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB1770.namprd11.prod.outlook.com (10.175.88.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.15; Mon, 15 Apr 2019 14:13:52 +0000 Received: from DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::e0e3:1d51:9e3e:6dc]) by DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::e0e3:1d51:9e3e:6dc%3]) with mapi id 15.20.1792.018; Mon, 15 Apr 2019 14:13:51 +0000 From: To: , , , CC: , , , Subject: [PATCH v2 2/4] media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE Thread-Topic: [PATCH v2 2/4] media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE Thread-Index: AQHU85VzJcq2N51RrkeUqJ+pLX+qwQ== Date: Mon, 15 Apr 2019 14:13:51 +0000 Message-ID: <1555337305-13767-3-git-send-email-eugen.hristev@microchip.com> References: <1555337305-13767-1-git-send-email-eugen.hristev@microchip.com> In-Reply-To: <1555337305-13767-1-git-send-email-eugen.hristev@microchip.com> Accept-Language: ro-RO, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VE1PR08CA0005.eurprd08.prod.outlook.com (2603:10a6:803:104::18) To DM5PR11MB1242.namprd11.prod.outlook.com (2603:10b6:3:14::8) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Eugen.Hristev@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5c7d090a-29f5-48ea-be79-08d6c1ac95e8 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DM5PR11MB1770; x-ms-traffictypediagnostic: DM5PR11MB1770: x-microsoft-antispam-prvs: x-forefront-prvs: 000800954F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(136003)(39860400002)(346002)(376002)(366004)(199004)(189003)(50226002)(107886003)(68736007)(8676002)(256004)(6512007)(446003)(2616005)(72206003)(2906002)(6436002)(2201001)(486006)(86362001)(8936002)(81156014)(81166006)(97736004)(11346002)(478600001)(14454004)(476003)(110136005)(52116002)(76176011)(25786009)(3846002)(102836004)(186003)(6506007)(386003)(66066001)(5660300002)(105586002)(106356001)(4326008)(54906003)(6486002)(305945005)(71190400001)(7736002)(99286004)(53936002)(6116002)(36756003)(71200400001)(316002)(4744005)(26005)(2501003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR11MB1770;H:DM5PR11MB1242.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ZG3DGqzzt3LU71xKug7zB1Ij/qqLS/cdpvu3nB2gjSnM9cdr5RO7mC8/cSNEunh+yr7Pahsoal3nKgsTc88rCKGcj5zsI5+kM4Z/kNmF7TcUMsu+sffcA0Q4Zvw2G0zYKikq4FowzAPQrjkDCOru8yvLqZ/qzLTmjY238E98twzu+byIirf73QqOfJJihz9XflpL49D6YweuKVg3Z++kwkYruRUC8e/JABArsUDsifNgt4aVBAiOEdpgiKXqWHMM3DGHbaR9yP9Ukxy8rnym2iWC8sVQiWNy9gTikfqyyrMaW0VWoX0PiAEwL5QOp5EE6DtT5JIM1VmpOR4RN4tU5Zouk2nMeLhB1Mg5B6GBWItXdqrQ7mnm5DkJThBYMheY7WVwGNg0/rEplznrcA3lT8imtTlvKlZdWXz3zMidO6k= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5c7d090a-29f5-48ea-be79-08d6c1ac95e8 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2019 14:13:51.9122 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1770 X-OriginatorOrg: microchip.com Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eugen Hristev Control DO_WHITE_BALANCE is a button, with read only and execute-on-write flags. Adding this control in the proper list in the fill function. After adding it here, we can see output of v4l2-ctl -L do_white_balance 0x0098090d (button) : flags=write-only, execute-on-write Signed-off-by: Eugen Hristev --- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index b1ae2e5..388ea90 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1153,6 +1153,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FLASH_STROBE_STOP: case V4L2_CID_AUTO_FOCUS_START: case V4L2_CID_AUTO_FOCUS_STOP: + case V4L2_CID_DO_WHITE_BALANCE: *type = V4L2_CTRL_TYPE_BUTTON; *flags |= V4L2_CTRL_FLAG_WRITE_ONLY | V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;