Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp1169lqp; Thu, 4 Apr 2024 05:39:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUb34rw1ib4h8kruLJUVtt0HqDYcDEZP21et2NVhJWxLw7SjDKyzzx41KF7XHBRZ5yy6tzSw4ovohnxaHPrMH0avUOSunNl1yGZdwz8gA== X-Google-Smtp-Source: AGHT+IHVuHMwP8D3MW9mxheIfHgLiFBCreXFtgXKaV3sNDdcjTU3C0DUI6HjmOH7zWaadxfOQ+5Y X-Received: by 2002:a05:6a00:2287:b0:6ec:f0e7:d942 with SMTP id f7-20020a056a00228700b006ecf0e7d942mr1130076pfe.28.1712234378823; Thu, 04 Apr 2024 05:39:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712234378; cv=pass; d=google.com; s=arc-20160816; b=eW8SpBabfSpdTAUFiPchIGvGpx3pant65H6zo7XexkJsZ+GJqD2JnTLbZll5kZ/5zh 79/gxss7ixBkw35Sua629gMgNSDl8bV6q4j6AMjYBbNMjKc8pRTneH+P86WFu3F1oh+T f69+mccA+mQkPT/CHYz/XZepFKRuavwcJPshhFk9IAVmXXtjGzl646XrcQX+H31ieeWQ F6SKDzb2lTU+fyXVkFaqe3D5EG52KJsdYCnMh314t9NjaGr9/nGAdBDypHetrokUpDSh pahvzF/vvV5VfnkxJNezsXBjn9/DBRSr/jIRKm8efrkXsK+vxTs1OJleDvNr1TEvDCNX q+0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eujsqnNsTdlCsaVOb8FrGI1iNYwUxOE+TZxCC6aPEM8=; fh=yVWthLUvewVmbW2aBElGuzKhtlczKeiclafqsRRYvt0=; b=hOZwIZ8qVGcuozXP2ocyaH5vEzCwEU+HUv5zKJuDwPr/vgAK4BQ0CDEa723mrMW0ke efzrDJeeuvtduCcYrEk+p4YOtL28F2wyQkcRl6EnBstORjE14F9UURVjNqi0/WJ5JSxs IGvSGd33G+XgrqO59Ee9ZwiBBl5CrjWDKaoNjdBH2QEfed2ERbvhkyhWBBdAo7qPY45d 4vSADTp0UEQSRuWt++LxZARp4TZf5I2AAQyJlO98b/ZDpEJLgYuZ4K3PewwVdyRNZuTL ziqZ/FO0lCOUxebS90t6T/zljOTcpzDK7CNIDZUHFgJ8xyrvSh19aR8UGiirD4bTrF8f d49w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lo68TGXf; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-131408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ln5-20020a056a003cc500b006e69e291eadsi15825489pfb.379.2024.04.04.05.39.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 05:39:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lo68TGXf; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-131408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E6E47B27689 for ; Thu, 4 Apr 2024 12:24:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C7898625F; Thu, 4 Apr 2024 12:23:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Lo68TGXf" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DE5684FDB for ; Thu, 4 Apr 2024 12:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712233419; cv=none; b=Z4bQKyXPUhJ6OOY6U/3ji3XjGg7nBZGZoqF2an2kikS6vJRTRR7JYZRDZuxeTPshgucbm47lAbxJymXPbG4OM44YOPXqmCbkZZY+/SUB95I6sXEQeb44PjrJp1DeJ+Cv4voKrwxseEBQBjhXI+1ouObEXxACR8CBTe8LkBQgxD4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712233419; c=relaxed/simple; bh=DkBQRag8K/nVFSLzRC1O2X49AG8u22IqmzLoEi+THXk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gsuc9f8l/9Uj8jfWAGT7dAhxDV6lZCU+2VhH658d94zCLVAUL3DDWYVjy/WLtY4OEOkIZGYrSgD0wjWfnCl08raSAx+UAF9bp9kYFCZn7VZvTLNpx+5q8rjGViRsT9uvci0Nwyy6TMRGVm4APGIdsD94Fdj4N2XG2bsqiBxHVZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Lo68TGXf; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-515c50dc2afso1051075e87.1 for ; Thu, 04 Apr 2024 05:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712233415; x=1712838215; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=eujsqnNsTdlCsaVOb8FrGI1iNYwUxOE+TZxCC6aPEM8=; b=Lo68TGXfQAvL+84zz5jC/95LlnZhuBt8/SBcYi21pZqJGs54VNavc1poEkjhXDdHbk 38BKeAHDjOq4leM3k9gleJuD28sWQ6FZ9pp7dpKPl/iouwvwfRKscUtmGL4/4F2/qIyg QagTGFKie1rXuVZttERLtmpNZLs7ho4bBIr32fankZCMka9RT7hbxc+1kI1x6+54co3b eir60mXvGaoz7zWJUGCbTSNBKvFr6M3xVcOQ5PTSTKVazQ5WDYE3tz8oXOjMLVGhofgI nKDtACozs0HqOq8CTHXsrnOhi3eBzKcBY22qQbcky2of4fYvgAyxvij0rMsK0ez0RCzs kjsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712233415; x=1712838215; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eujsqnNsTdlCsaVOb8FrGI1iNYwUxOE+TZxCC6aPEM8=; b=ScDJxm/Rdyx8YHvmwEPSsEGA7yTkHtcbZyUP8ia6DyWrf0ho0r8OsNnOBjRHKWmOzI f/lEscyczUiNoLfK3sfGIMhZT9SJ5IpHmLhqZoukCvn2C+j2dQpvOMWLtYssgzBgAVXl oLnwdQ/AV5c6eayx/WuU9eaNnkWF71cbHV9m70NKENc9SB2K83BerKwXhWu7ETAP/twT 3TvxcgJOTnvrUcgO7AoJRfmeiyRdRO95nKR8DSI5Kw5po6B3aCYQxYGFCxv2gKDrRkG9 fNNeFI1LVnCae880Mwfz6P/JKRVognVNYSJiawSHGKO1rAcLOTEl9rg6/b2oRNc0EsbA 1szQ== X-Forwarded-Encrypted: i=1; AJvYcCUIgGe2MrmmvTOAnnaBa1FlyNyRgFQpqdR/FHlU8Oc877ooGrdOtP4FX7BygAuAH4iCg3BKpM/ndL+WcF658NVhoBwJYTMTjv8OfK3a X-Gm-Message-State: AOJu0YxMFGgalO541f7Oz7PfVg72j0PgtOKy2OoJRnFKuQYf/nwcQuFE rUSD/e3SAA1QkBqc/tcCfYgIhdKXBy/ihzicAFXkIsveUFtyp1WNu4CoP9TwYUs= X-Received: by 2002:a05:6512:3711:b0:516:a148:2f5 with SMTP id z17-20020a056512371100b00516a14802f5mr1453656lfr.40.1712233415518; Thu, 04 Apr 2024 05:23:35 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzyjmhyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a00e:a300::227]) by smtp.gmail.com with ESMTPSA id q20-20020a194314000000b00516c5204f13sm229240lfa.208.2024.04.04.05.23.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 05:23:35 -0700 (PDT) Date: Thu, 4 Apr 2024 15:23:33 +0300 From: Dmitry Baryshkov To: Adam Ford Cc: dri-devel@lists.freedesktop.org, aford@beaconembedded.com, laurent.pinchart@ideasonboard.com, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 1/2] drm/bridge: adv7511: Allow IRQ to share GPIO pins Message-ID: References: <20240305004859.201085-1-aford173@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240305004859.201085-1-aford173@gmail.com> On Mon, Mar 04, 2024 at 06:48:57PM -0600, Adam Ford wrote: > The IRQ registration currently assumes that the GPIO is dedicated > to it, but that may not necessarily be the case. If the board has > another device sharing the GPIO, it won't be registered and the > hot-plug detect fails to function. > > Currently, the handler reads two registers and blindly > assumes one of them caused the interrupt and returns IRQ_HANDLED > unless there is an error. In order to properly do this, the IRQ > handler needs to check if it needs to handle the IRQ and return > IRQ_NONE if there is nothing to handle. With the check added > and the return code properly indicating whether or not it there > was an IRQ, the IRQF_SHARED can be set to share a GPIO IRQ. > > Signed-off-by: Adam Ford > --- > V2: Add check to see if there is IRQ data to handle > Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry