Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FF97C00A89 for ; Mon, 2 Nov 2020 22:20:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2C4E2225B for ; Mon, 2 Nov 2020 22:20:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="iR4l77BB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2C4E2225B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1D206E400; Mon, 2 Nov 2020 22:20:08 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 77A956E400 for ; Mon, 2 Nov 2020 22:20:07 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7A4CA583; Mon, 2 Nov 2020 23:20:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1604355605; bh=fTY55DHx6zAJQyTjZInJxof34DI3DmbATb+EmXI8rgI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iR4l77BBx5bYi9Lw/uWhIPymMZVyuy3F/MzDsTmPa9Xok1VN3PsFmEBcG0PsrOk1a 67RFNH2p/Lq3ZaY+MzPqWrFMzPy5RbI+wRHS90N3RM5eI0ZKudhlMc7PP3fYKiIwgj ZDoIvlG5UVjyjGzZxoEPzWQWK6EROi0l90xUZms8= Date: Tue, 3 Nov 2020 00:19:17 +0200 From: Laurent Pinchart To: YueHaibing Subject: Re: [PATCH v2] drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe Message-ID: <20201102221917.GJ3971@pendragon.ideasonboard.com> References: <20201031031648.42368-1-yuehaibing@huawei.com> <20201102143024.26216-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201102143024.26216-1-yuehaibing@huawei.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jernej.skrabec@siol.net, jonas@kwiboo.se, airlied@linux.ie, narmstrong@baylibre.com, sebastian.reichel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, a.hajda@samsung.com, tomi.valkeinen@ti.com, sam@ravnborg.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Yue, Thank you for the patch. On Mon, Nov 02, 2020 at 10:30:24PM +0800, YueHaibing wrote: > gpiod_to_irq() return negative value in case of error, > the existing code doesn't handle negative error codes. > If the HPD gpio supports IRQs (gpiod_to_irq returns a > valid number), we use the IRQ. If it doesn't (gpiod_to_irq > returns an error), it gets polled via detect(). > > Fixes: cff5e6f7e83f ("drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter") > Signed-off-by: YueHaibing Reviewed-by: Laurent Pinchart > --- > v2: Add checking for >= 0 and update commit message > --- > drivers/gpu/drm/bridge/ti-tpd12s015.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/ti-tpd12s015.c b/drivers/gpu/drm/bridge/ti-tpd12s015.c > index 514cbf0eac75..e0e015243a60 100644 > --- a/drivers/gpu/drm/bridge/ti-tpd12s015.c > +++ b/drivers/gpu/drm/bridge/ti-tpd12s015.c > @@ -160,7 +160,7 @@ static int tpd12s015_probe(struct platform_device *pdev) > > /* Register the IRQ if the HPD GPIO is IRQ-capable. */ > tpd->hpd_irq = gpiod_to_irq(tpd->hpd_gpio); > - if (tpd->hpd_irq) { > + if (tpd->hpd_irq >= 0) { > ret = devm_request_threaded_irq(&pdev->dev, tpd->hpd_irq, NULL, > tpd12s015_hpd_isr, > IRQF_TRIGGER_RISING | -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel