Message ID | 20231010005126.3425444-6-kieran.bingham@ideasonboard.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2204880vqo; Mon, 9 Oct 2023 17:52:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfn5IDOPQZN3QosvdjOpWd52nUN049O6aN3SkiMMQuQoyX1tsCFuxuvMW23Ub5Z0fxifDd X-Received: by 2002:a17:903:4284:b0:1c7:4ac4:8f46 with SMTP id ju4-20020a170903428400b001c74ac48f46mr18295313plb.14.1696899122367; Mon, 09 Oct 2023 17:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696899122; cv=none; d=google.com; s=arc-20160816; b=ac3hZFXdJSqJekrmr2ZAdjEhXVKXgnWZaAU9kc9MukGPCaHRrfVTMKB89IYz8uUi62 Zj1VQ/lXISpJRzdgu4xlmfHNpkX3p8A60+ZFPzBYyKS/h9J/WaF1KWvsco1c4Spuyuzl DSUIK5gp3SbP2KR/dy7b1MEAgKPuXyx5uRsDYXbkj3/Iq9q6chn1UN731Y1h8S+X32F9 P+1CvjHELUL7sOzmW+pfWmm1KLC3JID/HNVNFbHeCGzM/wHtmAvr38+T3PvW+kyd7l6w OvKClzBAakRyxLbXOZIPwIetWLgT2qfFiJgCCPb96YPIUufJK+bfUonZXfOqwGjlcaiK wwIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hhSQr1W02AaeA01EqrC1Bwd0sHz1HMr7ROMGbMcDYxM=; fh=K9XhkRf1fOoeiq1BBKobuN71OI6n2VgIwDJrdPRXaRg=; b=BEq0Em+DTf3MRQJhhPVdVJmmZmEfbshAqBNkcR4detjjp/YSK0keU8UKATUBOX3Og3 i5yyQjsS0r0Vjml5KImu8h+ZbOgV8xAUecXUKlcYUFJgySIe9Dh+o5fLDrIAciUUsXcw LGzREaKi/L3qMXmCTCVVMZkyBGTiWvgZ4uM+UAVUmxsUFADbP/wL0aBcxUxBioqt51Ye zHXakX8CdNC3xaXwUEBj/q4RS6BOp3IhPuSJZVlZ6TeOrNWp04FM5VKipZTSYrFg6VdS 33NCIKK4YaC5gR8vf2VvFXpm0FmIJ3hUe8BobjxtMoJDrp+0o18gehXIxgoKvvDVint5 00FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="MJKZ4b/e"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w9-20020a1709026f0900b001c7342b46e4si10111590plk.23.2023.10.09.17.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 17:52:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="MJKZ4b/e"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A319E810439A; Mon, 9 Oct 2023 17:52:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379274AbjJJAvv (ORCPT <rfc822;makky5685@gmail.com> + 18 others); Mon, 9 Oct 2023 20:51:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379290AbjJJAvn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Oct 2023 20:51:43 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7446FBA; Mon, 9 Oct 2023 17:51:41 -0700 (PDT) Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A485CF8B; Tue, 10 Oct 2023 02:51:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1696899094; bh=6et6YB3ovJRquTK1bYYUx8i7eR+31xGOSlTSN1ZNHt8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJKZ4b/egWoZwPcbZ74ew/22iue5kNjfJxUObC2Q5S+dG5E/YbCVX3UVNNcYxi9to T6kjzK9lzErtAvcdaK2nFuXyTW8CeaINU0hVd0n8R9cJ/KF8sh1uEIcoKtfp2kl3dg A0UAhMAIOyLZBWN7LVB+OdfG3YfJnqTbQ7BXVxrs= From: Kieran Bingham <kieran.bingham@ideasonboard.com> To: linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>, Sakari Ailus <sakari.ailus@linux.intel.com>, "Paul J. Murphy" <paul.j.murphy@intel.com>, Daniele Alessandrelli <daniele.alessandrelli@intel.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-kernel@vger.kernel.org (open list) Subject: [PATCH 5/5] media: i2c: imx335: Improve configuration error reporting Date: Tue, 10 Oct 2023 01:51:26 +0100 Message-Id: <20231010005126.3425444-6-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010005126.3425444-1-kieran.bingham@ideasonboard.com> References: <20231010005126.3425444-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 17:52:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779327694391715393 X-GMAIL-MSGID: 1779327694391715393 |
Series |
[1/5] media: dt-bindings: media: imx335: Add supply bindings
|
|
Commit Message
Kieran Bingham
Oct. 10, 2023, 12:51 a.m. UTC
The existing imx335_parse_hw_config function has two paths
that can be taken without reporting to the user the reason
for failing to accept the hardware configuration.
Extend the error reporting paths to identify failures when
probing the device.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
drivers/media/i2c/imx335.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
Hi Kieran, Thank you for the patch. On 10/10/23 6:21 AM, Kieran Bingham wrote: > The existing imx335_parse_hw_config function has two paths > that can be taken without reporting to the user the reason > for failing to accept the hardware configuration. > > Extend the error reporting paths to identify failures when > probing the device. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > drivers/media/i2c/imx335.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c > index 1a34b2a43718..753e5c39e0fa 100644 > --- a/drivers/media/i2c/imx335.c > +++ b/drivers/media/i2c/imx335.c > @@ -864,8 +864,10 @@ static int imx335_parse_hw_config(struct imx335 *imx335) > } > > ep = fwnode_graph_get_next_endpoint(fwnode, NULL); > - if (!ep) > + if (!ep) { > + dev_err(imx335->dev, "Failed to get next endpoint"); missing '\n' at the end. > return -ENXIO; > + } > > ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); > fwnode_handle_put(ep); > @@ -890,6 +892,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335) > if (bus_cfg.link_frequencies[i] == IMX335_LINK_FREQ) > goto done_endpoint_free; > > + dev_err(imx335->dev, "no compatible link frequencies found"); Ditto. Other than that, Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > + > ret = -EINVAL; > > done_endpoint_free:
diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c index 1a34b2a43718..753e5c39e0fa 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -864,8 +864,10 @@ static int imx335_parse_hw_config(struct imx335 *imx335) } ep = fwnode_graph_get_next_endpoint(fwnode, NULL); - if (!ep) + if (!ep) { + dev_err(imx335->dev, "Failed to get next endpoint"); return -ENXIO; + } ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); fwnode_handle_put(ep); @@ -890,6 +892,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335) if (bus_cfg.link_frequencies[i] == IMX335_LINK_FREQ) goto done_endpoint_free; + dev_err(imx335->dev, "no compatible link frequencies found"); + ret = -EINVAL; done_endpoint_free: