Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2220165rdb; Mon, 9 Oct 2023 17:52:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNDZQAxNe4Q6ghvNZHx6RxUycUVjbGAMVnTXPmLZEwq3Pko3g5mPjJYCnmdcfcR6Omlt1X X-Received: by 2002:a17:90a:f196:b0:27c:d535:220d with SMTP id bv22-20020a17090af19600b0027cd535220dmr2004552pjb.40.1696899139818; Mon, 09 Oct 2023 17:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696899139; cv=none; d=google.com; s=arc-20160816; b=AePMcgKoXYjim5NEb5zfKykJrG3nS1+BHq3Ifn0Dfd18pboke6zZABYuGHPXs4cCxf WRcW6DED+vGivgInAGQSg4Exd+Y7nsVcUTghe2Dqs/arMVjqzgdsussGdb9UBBwAmGIo PYhng2vfP40wvCYD4CL1jz3jxDx9DyDT9+swOGwRXMfg49JZ47jVkXU+eZkPCrLx0epU vxt9PhUeDJ6FiPkU5ZN1P7UYCM6hhul+miUafhT/34IuyokYFdzg2tQQSRfUCwPdsmYq Tb6XzCDYt2qfVYmZ5a9RufRESVdFz2GE45rDepvPBcZR1u8S1VKz/UmwBWcd0K6bpDqD 8C2g== 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:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id my17-20020a17090b4c9100b002790e0af4aasi13605240pjb.174.2023.10.09.17.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 17:52:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; 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:4 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 howler.vger.email (Postfix) with ESMTP id AAA2080A44DF; Mon, 9 Oct 2023 17:52:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379293AbjJJAvu (ORCPT + 99 others); Mon, 9 Oct 2023 20:51:50 -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 ); 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 To: linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Kieran Bingham , Sakari Ailus , "Paul J. Murphy" , Daniele Alessandrelli , Mauro Carvalho Chehab , 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.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 17:52:17 -0700 (PDT) X-Spam-Level: ** 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 --- 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"); 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: -- 2.34.1