Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp742551pxu; Fri, 11 Dec 2020 13:12:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEiqYTC6WGh8n+XJeTDGlDwCzxOuJ/PILBTSYm3YbM8VTArwinLqIePELZ2hfAdhZK7act X-Received: by 2002:a50:d6d3:: with SMTP id l19mr14271502edj.376.1607721159820; Fri, 11 Dec 2020 13:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607721159; cv=none; d=google.com; s=arc-20160816; b=VZUgAfUe5c4YBF57yzkqDmvVMKpoPn6ASZzFDUNRQ0t9LZiJsTvHtKD17qGvYfsoW9 8f9n2306a/QQUCbtd1kbgu03+ixP3LL4cH7YXP+2l6RAwBMIWCc2295JNuURiOsgkVO3 ieVlswSrkLdsXruEZwV+SRP2NL9O2fYZXbADZ7rnb2xOHO/tbX3Jh+S9PVk+5xUYGGxS tOmGMtACsKlcQLpBTPXBRcN/tGYNUn5bCQK4BkNfJ5Ntba7I2SJZDbrBR/IbP54Hf6Go /Dko+I0WgOnxqUAhKLAEO/4I7IFZUzyw2MMJoONcTHKIwhI5whQR16M/nKOe2TbyKGWA 1iYw== 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; bh=HWepvS2UrTx6bB5FlWd6whoXgofBFwH0BEGwEhEh3a8=; b=Ps94qL/az445u2CjthsB6D2m9ulufV0RFBNGPXv9F9yQw1o3Uisvwyee3jolNOR5sD qs7taNNrX8pXYMQ++jYD2hDxxxKZaF4R7mA+3wV2Li3dCbi7hP3GmiqPxz7LuXqjQ+IW zQAucRHkRr8B/8xQNT7J2h1+T/rG5HugN6PU31A2/SxAUQugZ13+UYlMjzlQz3UNRqUR 0j+ChW3ZzG/fgCiYFn2RPWMeC3ek0km3/oh9907FaI4Ip6E75kMKiXU6xws24lGFe7dY I6FhJIQSvA+xM+eGGnuGV1mtGN1jf9rCILDxvRUY3NecFOOluN9KfsYVTmIMazw4cOc0 zufA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 y11si6216853edm.309.2020.12.11.13.12.16; Fri, 11 Dec 2020 13:12:39 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393026AbgLJSlJ (ORCPT + 99 others); Thu, 10 Dec 2020 13:41:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:41302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390652AbgLJOcx (ORCPT ); Thu, 10 Dec 2020 09:32:53 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Mika Westerberg , Andy Shevchenko , Sudip Mukherjee , Sasha Levin Subject: [PATCH 4.19 01/39] pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output Date: Thu, 10 Dec 2020 15:26:40 +0100 Message-Id: <20201210142602.354936591@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142602.272595094@linuxfoundation.org> References: <20201210142602.272595094@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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: Hans de Goede commit e2b74419e5cc7cfc58f3e785849f73f8fa0af5b3 upstream Suspending Goodix touchscreens requires changing the interrupt pin to output before sending them a power-down command. Followed by wiggling the interrupt pin to wake the device up, after which it is put back in input mode. On Cherry Trail device the interrupt pin is listed as a GpioInt ACPI resource so we can do this without problems as long as we release the IRQ before changing the pin to output mode. On Bay Trail devices with a Goodix touchscreen direct-irq mode is used in combination with listing the pin as a normal GpioIo resource. This works fine, but this triggers the WARN in byt_gpio_set_direction-s output path because direct-irq support is enabled on the pin. This commit replaces the WARN call with a dev_info_once call, fixing a bunch of WARN splats in dmesg on each suspend/resume cycle. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Sudip Mukherjee Signed-off-by: Sasha Levin --- drivers/pinctrl/intel/pinctrl-baytrail.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c index acb02a7aa9496..7d6685ae31d70 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -1026,15 +1026,15 @@ static int byt_gpio_set_direction(struct pinctrl_dev *pctl_dev, value &= ~BYT_DIR_MASK; if (input) value |= BYT_OUTPUT_EN; - else + else if (readl(conf_reg) & BYT_DIRECT_IRQ_EN) /* * Before making any direction modifications, do a check if gpio * is set for direct IRQ. On baytrail, setting GPIO to output - * does not make sense, so let's at least warn the caller before + * does not make sense, so let's at least inform the caller before * they shoot themselves in the foot. */ - WARN(readl(conf_reg) & BYT_DIRECT_IRQ_EN, - "Potential Error: Setting GPIO with direct_irq_en to output"); + dev_info_once(vg->dev, "Potential Error: Setting GPIO with direct_irq_en to output"); + writel(value, val_reg); raw_spin_unlock_irqrestore(&byt_lock, flags); -- 2.27.0