Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp693732pxv; Thu, 22 Jul 2021 09:52:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqCrXxzhwZK4vt54N9Fjfvm4njYHF4ykNqCrY44F7BU9YiwdIG09drFwigREh/VsVNlB56 X-Received: by 2002:a05:6402:5246:: with SMTP id t6mr638373edd.205.1626972737677; Thu, 22 Jul 2021 09:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626972737; cv=none; d=google.com; s=arc-20160816; b=wb3P4QlpGRGhjuPFUFmavkf2da2k9LTdMKC8OyrPIHbq5F+zD/xm25icKIJXf5sVRH wl+cMMCirTXqlgVjbI7eO6gKQnFynr4nciE1aS5RbYnLa0XiFwapIqmejReiInVdiEbY eyCkC5HBvb8LyGCkFPrz6qWyEi/w4XTj+RsAg+fRGbVsnnZxROSOgeYcsAT8kMhJEnX/ KiCOGCQNFl27XupxjWnt6qMtyOpqmmxsFX23pSzLFi5FS6YgJPiXLG3K9TneJGDbpt8d OyZ9hFMAWtipgPP85D0T7rd0FbWvCSO+YhEjM0yPqpGDK+NGPrvwcSgX2oXqbn9zMVvW s61g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BCRVYxHi3XdKJuUlMU+NStEzY9zZRRG3IrI3jxCp9fo=; b=CJFiGmwu8jgoTqeu1NkXsd1Cp8TwVTBJKAgYw5kwNEOl5lMW98nHv5sfx20fcYvqFo XPenZdtnU/S4xpzGUKdT9W64We3H62BX8Tlr37oYzx5HsIFY6cPpsa+0S/Ct7p+w16B3 a0jkMtlqF5x3jSAsnhmbc6i5QF7n6dSEgkzBP2gtl87yvyCyLEJDskaDw+q7xsZgkdmb eyu4jo/hVxp6cxbSf687V0bydDe7QZsNSBvYzZ0swfB6G/gejMXWqrh9Bq9zAteeV1j8 8Yxd0X8qG4yEu1JsKSY0MxVM2go3x1Gqcqtm+ztn14gWR4+GToBUGYsA/jSG2pE8gywH ndTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="q/DCWY9m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s22si6642547ejv.751.2021.07.22.09.51.53; Thu, 22 Jul 2021 09:52:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="q/DCWY9m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235324AbhGVQJK (ORCPT + 99 others); Thu, 22 Jul 2021 12:09:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:43286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234985AbhGVQFj (ORCPT ); Thu, 22 Jul 2021 12:05:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B8B061D0B; Thu, 22 Jul 2021 16:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626972373; bh=E+iOY2yzXNa/d+8Y+LyMMqT6lx3jzGNbC2lLNqo6/cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q/DCWY9mfCxH/5gZxYtt3QoAWStEQLFME6X7ARZPoB1xoSFFTEe8YUmj0nnRyvNXc Hcw02Vz1uRRvnKeE6kacXVKMXIxNO4CvHA7R3F9kdGsS63AuFVouod7zbT9ztqwFk6 CgUKs1VNxIhll/PasgqNBc5PShH7rnHpk+BuTJww= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Alexandre Belloni , Sasha Levin Subject: [PATCH 5.13 090/156] rtc: max77686: Do not enforce (incorrect) interrupt trigger type Date: Thu, 22 Jul 2021 18:31:05 +0200 Message-Id: <20210722155631.292337580@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210722155628.371356843@linuxfoundation.org> References: <20210722155628.371356843@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski [ Upstream commit 742b0d7e15c333303daad4856de0764f4bc83601 ] Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge falling - but instead rely on Devicetree to configure it. The Maxim 77686 datasheet describes the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. The interrupt line is shared between PMIC and RTC driver, so using level sensitive interrupt is here especially important to avoid races. With an edge configuration in case if first PMIC signals interrupt followed shortly after by the RTC, the interrupt might not be yet cleared/acked thus the second one would not be noticed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210526172036.183223-6-krzysztof.kozlowski@canonical.com Signed-off-by: Sasha Levin --- drivers/rtc/rtc-max77686.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c index d51cc12114cb..eae7cb9faf1e 100644 --- a/drivers/rtc/rtc-max77686.c +++ b/drivers/rtc/rtc-max77686.c @@ -717,8 +717,8 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info) add_rtc_irq: ret = regmap_add_irq_chip(info->rtc_regmap, info->rtc_irq, - IRQF_TRIGGER_FALLING | IRQF_ONESHOT | - IRQF_SHARED, 0, info->drv_data->rtc_irq_chip, + IRQF_ONESHOT | IRQF_SHARED, + 0, info->drv_data->rtc_irq_chip, &info->rtc_irq_data); if (ret < 0) { dev_err(info->dev, "Failed to add RTC irq chip: %d\n", ret); -- 2.30.2