Message ID | 1426015494-16799-2-git-send-email-tim.nordell@logicpd.com (mailing list archive) |
---|---|
State | Obsoleted, archived |
Delegated to: | Laurent Pinchart |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1YVPyK-0004u9-HZ; Tue, 10 Mar 2015 20:37:44 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-7) with esmtp id 1YVPyH-00005W-2P; Tue, 10 Mar 2015 20:37:44 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752844AbbCJThh (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 10 Mar 2015 15:37:37 -0400 Received: from smtp.logicpd.com ([174.46.170.145]:51778 "HELO smtp.logicpd.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752653AbbCJThf (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 10 Mar 2015 15:37:35 -0400 X-Greylist: delayed 735 seconds by postgrey-1.27 at vger.kernel.org; Tue, 10 Mar 2015 15:37:24 EDT X-ASG-Debug-ID: 1426015507-083a4f3ca92a8fc0001-rVgMWv Received: from EDPR-MAIL01.logicpd.com (edpr-mail01.logicpd.com [10.1.18.127]) by smtp.logicpd.com with ESMTP id ikVTeK51aaduPy6F (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Mar 2015 14:25:07 -0500 (CDT) X-Barracuda-Envelope-From: tim.nordell@logicpd.com Received: from mplswks572_linux.logicpd.com (10.0.5.78) by EDPR-MAIL01.logicpd.com (10.1.18.127) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Tue, 10 Mar 2015 14:25:07 -0500 From: Tim Nordell <tim.nordell@logicpd.com> To: <linux-media@vger.kernel.org> CC: <laurent.pinchart@ideasonboard.com>, <sakari.ailus@iki.fi>, Tim Nordell <tim.nordell@logicpd.com> Subject: [PATCH 1/3] omap3isp: Defer probing when subdev isn't available Date: Tue, 10 Mar 2015 14:24:52 -0500 X-ASG-Orig-Subj: [PATCH 1/3] omap3isp: Defer probing when subdev isn't available Message-ID: <1426015494-16799-2-git-send-email-tim.nordell@logicpd.com> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1426015494-16799-1-git-send-email-tim.nordell@logicpd.com> References: <1426015494-16799-1-git-send-email-tim.nordell@logicpd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.5.78] X-ClientProxiedBy: EDPR-MAIL01.logicpd.com (10.1.18.127) To EDPR-MAIL01.logicpd.com (10.1.18.127) X-Barracuda-Connect: edpr-mail01.logicpd.com[10.1.18.127] X-Barracuda-Start-Time: 1426015507 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://edpr-cuda.logicpd.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at logicpd.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.16481 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.3.10.192720 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1200_1299 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, REFERENCES 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, WEBMAIL_XOIP 0, WEBMAIL_X_IP_HDR 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_XOIP 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Tim Nordell
March 10, 2015, 7:24 p.m. UTC
If the subdev isn't available just yet, defer probing of
the system. This is useful if the omap3isp comes up before
the I2C subsystem does.
Signed-off-by: Tim Nordell <tim.nordell@logicpd.com>
---
drivers/media/platform/omap3isp/isp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
Hi Tim, Thank you for the patch. The OMAP3 ISP driver is moving to DT, hopefully in time for v4.1. See "[PATCH 00/15] omap3isp driver DT support" posted to the list on Monday. I'd rather go for proper DT support instead of custom deferred probing. On Tuesday 10 March 2015 14:24:52 Tim Nordell wrote: > If the subdev isn't available just yet, defer probing of > the system. This is useful if the omap3isp comes up before > the I2C subsystem does. > > Signed-off-by: Tim Nordell <tim.nordell@logicpd.com> > --- > drivers/media/platform/omap3isp/isp.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/omap3isp/isp.c > b/drivers/media/platform/omap3isp/isp.c index 51c2129..a361c40 100644 > --- a/drivers/media/platform/omap3isp/isp.c > +++ b/drivers/media/platform/omap3isp/isp.c > @@ -1811,7 +1811,7 @@ isp_register_subdev_group(struct isp_device *isp, > "device %s\n", __func__, > board_info->i2c_adapter_id, > board_info->board_info->type); > - continue; > + return ERR_PTR(-EPROBE_DEFER); > } > > subdev = v4l2_i2c_new_subdev_board(&isp->v4l2_dev, adapter, > @@ -1898,6 +1898,10 @@ static int isp_register_entities(struct isp_device > *isp) unsigned int i; > > sensor = isp_register_subdev_group(isp, subdevs->subdevs); > + if (IS_ERR(sensor)) { > + ret = PTR_ERR(sensor); > + goto done; > + } > if (sensor == NULL) > continue;
Laurent - Agreed. This is a stop gap for this, but I guess by the time this patch could possibly get incorporated we'd be off to device tree anyways. - Tim (Sorry for the repeat - my e-mail client sent out an HTML message so it didn't get through to the mailing list.) On 03/18/15 10:15, Laurent Pinchart wrote: > Hi Tim, > > Thank you for the patch. > > The OMAP3 ISP driver is moving to DT, hopefully in time for v4.1. See "[PATCH > 00/15] omap3isp driver DT support" posted to the list on Monday. I'd rather go > for proper DT support instead of custom deferred probing. > > On Tuesday 10 March 2015 14:24:52 Tim Nordell wrote: >> If the subdev isn't available just yet, defer probing of >> the system. This is useful if the omap3isp comes up before >> the I2C subsystem does. >> >> Signed-off-by: Tim Nordell <tim.nordell@logicpd.com> >> --- >> drivers/media/platform/omap3isp/isp.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/omap3isp/isp.c >> b/drivers/media/platform/omap3isp/isp.c index 51c2129..a361c40 100644 >> --- a/drivers/media/platform/omap3isp/isp.c >> +++ b/drivers/media/platform/omap3isp/isp.c >> @@ -1811,7 +1811,7 @@ isp_register_subdev_group(struct isp_device *isp, >> "device %s\n", __func__, >> board_info->i2c_adapter_id, >> board_info->board_info->type); >> - continue; >> + return ERR_PTR(-EPROBE_DEFER); >> } >> >> subdev = v4l2_i2c_new_subdev_board(&isp->v4l2_dev, adapter, >> @@ -1898,6 +1898,10 @@ static int isp_register_entities(struct isp_device >> *isp) unsigned int i; >> >> sensor = isp_register_subdev_group(isp, subdevs->subdevs); >> + if (IS_ERR(sensor)) { >> + ret = PTR_ERR(sensor); >> + goto done; >> + } >> if (sensor == NULL) >> continue; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 51c2129..a361c40 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -1811,7 +1811,7 @@ isp_register_subdev_group(struct isp_device *isp, "device %s\n", __func__, board_info->i2c_adapter_id, board_info->board_info->type); - continue; + return ERR_PTR(-EPROBE_DEFER); } subdev = v4l2_i2c_new_subdev_board(&isp->v4l2_dev, adapter, @@ -1898,6 +1898,10 @@ static int isp_register_entities(struct isp_device *isp) unsigned int i; sensor = isp_register_subdev_group(isp, subdevs->subdevs); + if (IS_ERR(sensor)) { + ret = PTR_ERR(sensor); + goto done; + } if (sensor == NULL) continue;