Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3837939yba; Mon, 29 Apr 2019 09:18:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMR1D9v7mpubIowkMDFal0nxe/enPe1JVjxPWmNuIeozqwqy8TpgsxEoLJONBTTQS+5Fg/ X-Received: by 2002:a63:ed4f:: with SMTP id m15mr61198882pgk.387.1556554737943; Mon, 29 Apr 2019 09:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556554737; cv=none; d=google.com; s=arc-20160816; b=uJrjs43saaFZmNxNBeCilHjdX8yEYBU6wd0di6LM1funzGJ/eM1kZ41vpab3cu4L3T 0yd/ersijHgAwQQ7NbQGgZt8j4Ei5/OwBLF9o10BDNqhUExgPVkPdgYuQ/iZcMpTKNLL Ad5+yKpo+dVFqKDUHBpxl61veHjtz+VAaLnqoLxk77eXUCGLBglcT8diDKiwS8jrmvtQ 0Rke5LSuTtmqqbNYSZU8B5T6KN+Fky5vGeogEDnu4pevmNpd/d9DJaM/fL04rwXsQlbR N3bdkflp1mftdS67FvAwyofE/4fd+k+6oGDQQGHZJLjXwBhfRlPjVYo4pMANksjj5tka 4l+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5ryVbV9BP8raLKq8cLJsoyWvDBr/LLpNUN1tGVtp1DA=; b=clQ2me/zKyp0XRbH9r3ta0hhKTHBTd+PZErk/AY11RXAeImJJoQXIc4prIjvI6iyq2 m3vDJ0ChgSY4PsmDOWXy5FSbJZk1BFMsY/CIgaoODFsi5I/Cc/TLmIzosk5b4EavbCJp sFAMuZ7XOGdSkvlrGOJy4KUJhjCbN11AJPuwza/YI/+ByC9BMHFlL20HXxdcVOvzL+ty tDuV/JmcKnJ2EHB6aBwU5UVH9uVEns+MZ1uJ56SAzZvTg8jen1qKKksyRaoZELWxyp+7 4LqChX1SQvM2sE3qUlMAyDnnwj/qgAJ08Jv5uI30PP6lA7qoJfnMRYWwqgGewghazur9 KR5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e36si32722966pgm.89.2019.04.29.09.18.42; Mon, 29 Apr 2019 09:18:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728828AbfD2QR2 (ORCPT + 99 others); Mon, 29 Apr 2019 12:17:28 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:56242 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728481AbfD2QR0 (ORCPT ); Mon, 29 Apr 2019 12:17:26 -0400 Received: from MUA by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hL8y1-0002pd-9M; Mon, 29 Apr 2019 18:17:22 +0200 From: "Maciej S. Szmigiero" To: Michael Krufky , Mauro Carvalho Chehab Cc: Andy Walls , linux-kernel , linux-media@vger.kernel.org, Hans Verkuil Subject: [PATCH v12 3/8] cx25840: implement g_std operation Date: Mon, 29 Apr 2019 18:16:54 +0200 Message-Id: <85be545af2ba8ff1ba0c6599a5ed7eb49df16f5e.1556554056.git.mail@maciej.szmigiero.name> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit implements g_std operation in cx25840 driver by returning the last set video standard. Signed-off-by: Maciej S. Szmigiero --- drivers/media/i2c/cx25840/cx25840-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index 2bcaf239b0d2..8c1111ba051b 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c @@ -1822,6 +1822,15 @@ static int cx25840_g_input_status(struct v4l2_subdev *sd, u32 *status) return 0; } +static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std) +{ + struct cx25840_state *state = to_state(sd); + + *std = state->std; + + return 0; +} + static int cx25840_s_std(struct v4l2_subdev *sd, v4l2_std_id std) { struct cx25840_state *state = to_state(sd); @@ -5081,6 +5090,7 @@ static const struct v4l2_subdev_audio_ops cx25840_audio_ops = { }; static const struct v4l2_subdev_video_ops cx25840_video_ops = { + .g_std = cx25840_g_std, .s_std = cx25840_s_std, .querystd = cx25840_querystd, .s_routing = cx25840_s_video_routing,