From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 E320E175A7F for ; Tue, 25 Aug 2026 03:22:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787628144; cv=none; b=DSCC7yP8NXEr2XJdweRfT6N2Y967k8mM1b70ocaW8rOa21pMldQlqDEdTrMm8YjPojJgpUdOMni1B0zuPjt4xLtf+zfSNE/Vh/VxzuTqbLSrPaAcOA4aaQiPEON4f0s+bJQ1sht1m9s3UY2gMlzLu9E1ai9i219D/bW3tGCr7dc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787628144; c=relaxed/simple; bh=c/dP8fSq+fJ4vk9t+6Oy//xE3tuRe686RF7qdma6lQM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HW62OY+zn2UcGW4vabRNHpO5rzFPl9DozMF+8cdvAaYOA/mxHAAIuzjuHi7N3mNiC+RsdxVlhXTWAy2zNeYDTKARJPdacAyDOFtwEY/ZnV2Z5pkJwzpeN+df3ea0b+R+rl4QvWHKPqOopbOXSlFtGdFxT6pksGa4+nu2nBI28UQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=W0z5ihpH; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W0z5ihpH" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2cacf197759so55198765ad.2 for ; Mon, 24 Aug 2026 20:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787628142; x=1788232942; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=yUjpxw8jaXO6xHW35u2c9GeSegB5FH1o9dfJXtFGBdE=; b=W0z5ihpHW64IrVxy7r8J20HpGFtlB6iXLZZ40dNKWxOJ8LrxiiwuPECGMfqZNoO4Yt TqVjGn3tSerAb11GSVHE5fVyp6Y4gkchaCIyz6Mh3hygSoEkp4KlXMW149fc5DnUKbkx 97wIY4xGqUnu3fs8HZmqWmFfpgGSTS1Z2H4WNyKXJCVu6QKwZcYMVyI3SWXzfvOdTqAM iE//0t44ArlX+jPPZzOHebt2vUhoyNleWMFm6hbryT6ECRKg81kmaeD1HXNvN2OYl8vP NCVTGWOV4VkG6Lm8li0TpsgIPLAPSZxMWdLoS5SUCTLcgPOj5SuY8fU5D8RGDSWHWmop r8rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787628142; x=1788232942; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yUjpxw8jaXO6xHW35u2c9GeSegB5FH1o9dfJXtFGBdE=; b=E0vGKZESW7G6tt/JmuL0WkyqjqKWTpiBvaDrARn7+GbxnNtUsKAg9VxOi0R01cT4ku 3TPKqbGo9880tPQ7g1NbtXz5KEPxjAkBu+5+Y+h3jRCALZcBDon9+H82W/KO38S8jOFK JFl+YuRJvKHJaQ0PzhALGAIauLYGxAt8LJW9BdxZDirgPQQS2sazoCEDNLdWZu07jX8d 42IFRo91A2AZizD8pnZk9E/fgTL8oxd1sNMnPyr9DCGtovF3LnfUexeA+Yr7aqb3C6Gn uw/Pc1KwdiMfhFeebyh8b9Psd+8jnU4dH9mIz/r4NjRekWMX54Z2Tx7ZFt4MKukiyF2l 5T0g== X-Forwarded-Encrypted: i=1; AHgh+Rrn+Y+T4IWGlogaCXJL0+xi6da6OmdsGunOGjuaB2oygWE0zainVfxAC0CfUJ4C9TeQd1mgfFk9LF+oYLQ=@vger.kernel.org X-Gm-Message-State: AFuF++nMFQmdRunSSGvWXCD6CM7cAIgBpSlwwdZ6tGz/Mwc1gm8/U3aQ qLMDY+FE8fc4vIbg2CM4TCZst/cu8RsLfYrBICVkOOQp2npE/mYoJr3c X-Gm-Gg: AR+sD12eBzsMzr4FTftFUW6McBYcDScJbPv0puPqH9LpXixxUSMoBZ0/pNutnQRwdBg PG/0/+a5iGZE5BLoxcDu0K3IOTh1UPvq47uaWM7q796eWcbidC/DSSgyc7W0YjWeQvSHDflKwSd +XAgyNBCj5X/Y8UFcNR/Nz2Gw/HupcCx88ptcOzZRzKa2Td8ut+cQlZieJZw/1Qbg0Q+Lx2EsL0 pcJLbukjLu0aHHr/TFZ8xBZwqfogMiR2Qg4WfbycsOzvD/oR4TRP2/WRMLdOarW3b7ZYZzeFu1B NqfLyKYDkHXCibnWb+xg7GjEVGdQSrL9czn7ueCpTmxIa4gih50qhWS0qlzLInnB3pXaUnamFon +gG08Bf5cyEEG0YeAaMfcfaPpNwvLUrxEno1/BUmOJFxTrhGwxxs/+lL5D6iweFt+oc5/kIR5b5 RdFsyN7M9y8gNCIVqtnNCdj2Rhj9+inXHGsvVaa1rsHpw3edqp65Gd5IMigc7DOO0= X-Received: by 2002:a17:903:b0c:b0:2ca:4f33:e86f with SMTP id d9443c01a7336-2d6dccc2aacmr73091975ad.12.1787628142180; Mon, 24 Aug 2026 20:22:22 -0700 (PDT) Received: from localhost ([115.70.157.242]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d6768e9ebbsm23291575ad.80.2026.08.24.20.22.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2026 20:22:21 -0700 (PDT) Date: Tue, 25 Aug 2026 13:22:13 +1000 From: Tsz Shan Chan To: Andy Shevchenko Cc: Jonathan Cameron , David Lechner , Nuno =?utf-8?B?U8Oh?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Tsz Shan Chan Subject: Re: [PATCH v2 2/2] iio: light: vcnl4000: add shared IRQ support Message-ID: References: <20260814-vcnl4000-v2-0-9b771290cc1d@jacques.com.au> <20260814-vcnl4000-v2-2-9b771290cc1d@jacques.com.au> <20260822032550.31a0fa9e@jic23-huawei> 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: On Mon, Aug 24, 2026 at 11:24:26AM +0300, Andy Shevchenko wrote: > On Sat, Aug 22, 2026 at 03:25:50AM +0100, Jonathan Cameron wrote: > > On Fri, 14 Aug 2026 14:30:43 +1000 > > Tsz Shan Chan wrote: > > > > The INT output of vcnl4010/4020 and vcnl4040/4200 is open drain active > > > low which can be shared with other devices. > > > Add IRQF_SHARED and switch the trigger type from IRQF_TRIGGER_FALLING to > > > IRQF_TRIGGER_LOW. Edge triggering can miss interrupts on a shared line. > > Fairly low risk change but I guess we'll see. > > > > It used to be annoyingly common for interrupt controllers to support > > only edge based interrupts, but hopefully that silliness is a thing > > of the past. > > > > So crossed fingers, I'll apply this and see if we get anyone shouting. > > I think we'll get away with it > > In another thread somebody mentioned a type of the signal that HW generates. > Having OD output doesn't prevent HW to behave like it does edge interrupts, > id est generating a pulse instead of keeping the level until it gets acked. > With that being said, I would ask the datasheet citation to clarify the case. > vcnl4010/4020 datasheet, Page 11 Table 15 Notes: "Once an interrupt is generated the corresponding status bit goes to 1 and stays there unless it is cleared by writing a 1 in the corresponding bit. The int pad will be pulled down while at least one of the status bit is 1." vcnl4040/4200 datasheet, Page 13 Section Interrupt Flag: "INT_Flag represents all of the interrupt trigger statuses for ALS and PS. If any of these flags trigger from "0" to "1", the INT pin will be pulled low. Once the host reads INT_Flag register, all the flags are cleared (reset to "0"), and the INT pin is reset to high." The interrupt is latched. The line stays low until the driver clears it.