Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5339557ybc; Wed, 27 Nov 2019 02:30:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyZCk3at3a3GPcFnmgx+5gJjRQmnF+uXGo3WoCb6Qg4L5qnwheMI6BPW4TKAC7yjOTeOnl1 X-Received: by 2002:a50:ac2c:: with SMTP id v41mr30377358edc.11.1574850642249; Wed, 27 Nov 2019 02:30:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574850642; cv=none; d=google.com; s=arc-20160816; b=HBcgGzTMSKPIA22IcLnVrk2Pt27ezKca9VTySi/FcZdANQxXz9hFt3eVcepvR02byz yOfC4SYYFp7OtOjIrcBfSLml5GW7im8UUHFh1BukMx7JhfPmxX4onWkABl/0P0IBc9J8 bSsZnk6TdIkKVhHZYw3LxiR2t/f8u1fjC3yszG7v2kA9OLPBp7PTg0uF9sCwcmxoX7po eBov81ZzdMEESipm4QDdoTZpLFjvVdDKv7cfast4daZgY+QjraJsqGhqq9ib3noquVSk waO6HzWZgVpxhteSrdRkqUZlEXglzEPoR43CXW9p5c9SVzCAMvwflYEPHGgAJu7MV4oJ x1fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=Bmi9ZxvHiIlWxe/sSml2LTtA26zSCPWx7oIRLedeHJE=; b=CH1+R1G/1iFy9cTCAKpKifOiauuZG9LxjCKxi9JSEC+PCig+YqrHRwYskTVtOwdnwE +0BDVMgpJ+7YOMUv45KevLZQRc97GtYcL9gaS6Je8SVDTAGKyYj9Y5cuPg64bzEOBRXc qkhGKHhPUuuQkBxB6lNBKqfo6UWnqp0rUq892ShDiQG2kBjbEnV4Hgk15pmEktPwhwII nQLpWJ1aP1zTEwfe02AiGcpp/125QJNKn4v/5NeVHxddcSplFdMUKzc0bijARjB/Nisf YopkuirTa/lxv75bWcS1imeVR5z0JbMn6sxQ6jB70t9Nkz+M8d9wHpnoC5At47xcDRay /jwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=Pr3Z78mC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q24si9003388eju.127.2019.11.27.02.30.18; Wed, 27 Nov 2019 02:30:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=Pr3Z78mC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727010AbfK0K3H (ORCPT + 99 others); Wed, 27 Nov 2019 05:29:07 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:30728 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726546AbfK0K3H (ORCPT ); Wed, 27 Nov 2019 05:29:07 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xARAR2dk031886; Wed, 27 Nov 2019 11:29:04 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=STMicroelectronics; bh=Bmi9ZxvHiIlWxe/sSml2LTtA26zSCPWx7oIRLedeHJE=; b=Pr3Z78mCwyJ9TShbbI12Na03BJ4OiVZwMtDSWYVnuxhayk6LzKq3YiFopT8c55DlgFSA xoig3XdJcgk6oAQW5qS3Wa2/b+2XMcsRa0/4GZvKNLzmnNibvsBDsIuT0wPuNl5dtXZD rFQfnC9r1f3yMcg1+Z62xKHxSNkbycdsGcxvFzhcyH2dOPocP0JZEigZ2ggqmkAnZSd1 v2F+69ysw+FZPYYNwlw9g4bwoUfnaFNVF+J6dmn+fMvgBDDAYuK0WXxDGgccU3MVZno5 orgZNCBILAxnNgA5AQ0S3WzeZIY1lfRT+bAf/ZK6pMNB2I+sNHc5YB58ZzGKJjs1iSmU OQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2whcxsb1hc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Nov 2019 11:29:03 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0235910002A; Wed, 27 Nov 2019 11:29:03 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5591E2B1868; Wed, 27 Nov 2019 11:29:03 +0100 (CET) Received: from localhost (10.75.127.45) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 27 Nov 2019 11:29:02 +0100 From: Yannick Fertre To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , Bastien Nocera , Dmitry Torokhov , , Subject: [PATCH] Input: goodix: request_irq: convert gpio to irq Date: Wed, 27 Nov 2019 11:29:01 +0100 Message-ID: <1574850541-13577-1-git-send-email-yannick.fertre@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG7NODE3.st.com (10.75.127.21) To SFHDAG6NODE1.st.com (10.75.127.16) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-27_02:2019-11-27,2019-11-27 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yannick Fertré Convert gpio to irq if not already done by gpio lib. Signed-off-by: Yannick Fertré #include #include +#include #include #include #include @@ -392,6 +393,13 @@ static void goodix_free_irq(struct goodix_ts_data *ts) static int goodix_request_irq(struct goodix_ts_data *ts) { + int gpio; + + gpio = desc_to_gpio(ts->gpiod_int); + + if (gpio_is_valid(gpio)) + ts->client->irq = gpio_to_irq(gpio); + return devm_request_threaded_irq(&ts->client->dev, ts->client->irq, NULL, goodix_ts_irq_handler, ts->irq_flags, ts->client->name, ts); -- 2.7.4