Message ID | 20221005190613.394277-9-jacopo@jmondi.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1og9jb-00DpB8-UA; Wed, 05 Oct 2022 19:07:12 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231418AbiJETHC (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 5 Oct 2022 15:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231406AbiJETG5 (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 5 Oct 2022 15:06:57 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9857C78228 for <linux-media@vger.kernel.org>; Wed, 5 Oct 2022 12:06:56 -0700 (PDT) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id AD561FF809; Wed, 5 Oct 2022 19:06:53 +0000 (UTC) From: Jacopo Mondi <jacopo@jmondi.org> To: =?utf-8?q?Krzysztof_Ha=C5=82asa?= <khalasa@piap.pl>, Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@iki.fi>, Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Jacopo Mondi <jacopo@jmondi.org>, linux-media@vger.kernel.org Subject: [PATCH 08/10] media: ar0521: Setup controls at s_stream time Date: Wed, 5 Oct 2022 21:06:11 +0200 Message-Id: <20221005190613.394277-9-jacopo@jmondi.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221005190613.394277-1-jacopo@jmondi.org> References: <20221005190613.394277-1-jacopo@jmondi.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
media: ar0521: Add analog gain, rework clock tree
|
|
Commit Message
Jacopo Mondi
Oct. 5, 2022, 7:06 p.m. UTC
Setup all the registered controls at s_stream(1) time instead of
manually configure gains.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
drivers/media/i2c/ar0521.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, 5 Oct 2022 at 20:07, Jacopo Mondi <jacopo@jmondi.org> wrote: > > Setup all the registered controls at s_stream(1) time instead of > manually configure gains. > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Ah, lovely. I'm surprised it doesn't error out with no s_ctrl handler for link_freq when r/w though. Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> > --- > drivers/media/i2c/ar0521.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c > index 26bb1b8f7453..d46a51332964 100644 > --- a/drivers/media/i2c/ar0521.c > +++ b/drivers/media/i2c/ar0521.c > @@ -460,7 +460,7 @@ static int ar0521_set_stream(struct ar0521_dev *sensor, bool on) > if (ret) > goto err; > > - ret = ar0521_set_gains(sensor); > + ret = __v4l2_ctrl_handler_setup(&sensor->ctrls.handler); > if (ret) > goto err; > > -- > 2.37.3 >
Hi Dave On Thu, Oct 06, 2022 at 04:43:14PM +0100, Dave Stevenson wrote: > On Wed, 5 Oct 2022 at 20:07, Jacopo Mondi <jacopo@jmondi.org> wrote: > > > > Setup all the registered controls at s_stream(1) time instead of > > manually configure gains. > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> > > Ah, lovely. I'm surprised it doesn't error out with no s_ctrl handler > for link_freq when r/w though. > I don't have the usual safety "default: return -EINVAL" case in my s_ctrl handler. Will fix that! > Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> > > > --- > > drivers/media/i2c/ar0521.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c > > index 26bb1b8f7453..d46a51332964 100644 > > --- a/drivers/media/i2c/ar0521.c > > +++ b/drivers/media/i2c/ar0521.c > > @@ -460,7 +460,7 @@ static int ar0521_set_stream(struct ar0521_dev *sensor, bool on) > > if (ret) > > goto err; > > > > - ret = ar0521_set_gains(sensor); > > + ret = __v4l2_ctrl_handler_setup(&sensor->ctrls.handler); > > if (ret) > > goto err; > > > > -- > > 2.37.3 > >
diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c index 26bb1b8f7453..d46a51332964 100644 --- a/drivers/media/i2c/ar0521.c +++ b/drivers/media/i2c/ar0521.c @@ -460,7 +460,7 @@ static int ar0521_set_stream(struct ar0521_dev *sensor, bool on) if (ret) goto err; - ret = ar0521_set_gains(sensor); + ret = __v4l2_ctrl_handler_setup(&sensor->ctrls.handler); if (ret) goto err;