From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 425B0C433DB for ; Sun, 21 Feb 2021 21:19:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1764B64EB4 for ; Sun, 21 Feb 2021 21:19:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230074AbhBUVTg (ORCPT ); Sun, 21 Feb 2021 16:19:36 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:51658 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbhBUVTf (ORCPT ); Sun, 21 Feb 2021 16:19:35 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lDw7s-007j2k-TV; Sun, 21 Feb 2021 22:18:48 +0100 Date: Sun, 21 Feb 2021 22:18:48 +0100 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Gregory CLEMENT , Rui Salvaterra , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH mvebu-dt] ARM: dts: turris-omnia: configure LED[2]/INTn pin as interrupt pin Message-ID: References: <20210220231144.32325-1-kabel@kernel.org> <20210221014756.7c444c08@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210221014756.7c444c08@kernel.org> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org > BTW do you have some experience where pca9538 or compatible cause > errors when used for interrupts? Because I am thinking about trying > to update the pca953x driver to support IRQs via the gpio_chip it > registers, instead of a separate irq_chip. I had a board which just died at boot with an interrupt storm. It was probably a PCA9554, at least, i have that datasheet in my collection. First off, the hardware needs to designed correctly. All unused pins need a pull up/down since they default to inputs, and hence will trigger interrupts. Or you need to make unused pins outputs before you enable interrupts. And that probably goes against the design of the GPIO subsystem. I don't think you actually know when a pin is unused. I'm not sure i would want to touch this driver. Given how badly this device implements interrupts, any board which does successfully use it for interrupts might regress if you make code changes. And then you are going to have to try to figure out what you actually changed and why it regressed. Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 52AE9C433E0 for ; Sun, 21 Feb 2021 21:20:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 13FD964E76 for ; Sun, 21 Feb 2021 21:20:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13FD964E76 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WriXr0yEnMmdpkboJrHCc2CxBDCCHKuPcPF8d7k8aRQ=; b=L+UtHmGJeIp7xLL7ashrG3nSJ cOJanw9ARmvEJTg7hBtLbHcVk2ZymGw1kcoTbv3Jawa0Rk1CkI96yA2T0BaINk7FM+wGwF9++EHdy 7fiGLlybnxLZytHSj7YuWl0OHx5erGRbkw+6FZVxKJRSZgR1FpNbJZdcNmkMPNM8LO6mw9KqqH0G2 XMq30a/NpeM4z2kpbGJagnMbPx/lWM3J5fCzr5Yj28FlyjP/qQaO2JVARY+gp3ekx9u+bbULN3Tk0 UVBOdS8gg1+Tyxv3j1oziR+ZjdH9bNQ7RyMATE5r0SEIhNqKQTn/gf01pphLf/ncM7ilIy8aIL10d uOiYtZ6kw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDw7z-0002Rc-Vj; Sun, 21 Feb 2021 21:18:56 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDw7y-0002RJ-M8 for linux-arm-kernel@lists.infradead.org; Sun, 21 Feb 2021 21:18:55 +0000 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lDw7s-007j2k-TV; Sun, 21 Feb 2021 22:18:48 +0100 Date: Sun, 21 Feb 2021 22:18:48 +0100 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Subject: Re: [PATCH mvebu-dt] ARM: dts: turris-omnia: configure LED[2]/INTn pin as interrupt pin Message-ID: References: <20210220231144.32325-1-kabel@kernel.org> <20210221014756.7c444c08@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210221014756.7c444c08@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210221_161854_746801_2F1DE5F3 X-CRM114-Status: GOOD ( 10.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable@vger.kernel.org, Gregory CLEMENT , linux-arm-kernel@lists.infradead.org, Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Rui Salvaterra Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > BTW do you have some experience where pca9538 or compatible cause > errors when used for interrupts? Because I am thinking about trying > to update the pca953x driver to support IRQs via the gpio_chip it > registers, instead of a separate irq_chip. I had a board which just died at boot with an interrupt storm. It was probably a PCA9554, at least, i have that datasheet in my collection. First off, the hardware needs to designed correctly. All unused pins need a pull up/down since they default to inputs, and hence will trigger interrupts. Or you need to make unused pins outputs before you enable interrupts. And that probably goes against the design of the GPIO subsystem. I don't think you actually know when a pin is unused. I'm not sure i would want to touch this driver. Given how badly this device implements interrupts, any board which does successfully use it for interrupts might regress if you make code changes. And then you are going to have to try to figure out what you actually changed and why it regressed. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel