Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp644528imu; Fri, 4 Jan 2019 04:37:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/U95LG+3a2+lnCkGCYAs/Tu1c3+NgEzBjBYrdiKTMh3u3Up6h2fOs/rz+3g4OVmArg3dUfF X-Received: by 2002:a62:cd1:: with SMTP id 78mr52138664pfm.219.1546605426766; Fri, 04 Jan 2019 04:37:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546605426; cv=none; d=google.com; s=arc-20160816; b=Uo7/vY6/67Mr5XaXTGxFH6VmITPXHsOvQskOFgUX70Hl+Bdvr/R1A5e9xpTME2iF11 w/lf07v5Wxfg4Cdunb1HmemegnLF7h3fQOTundx3cFjjk6D3xSsKijv7YAUcq0+u12i9 1Ns01rMg2YvKP7wPlYhnnwq3/p2QkCUSPUBva0wmX3vs6pA8CYXahnyXvM7i+L6s6W1j z0AV6hRsCEONRiymFnof3UV29RCttVHknhXImiVVl958Dc6Lc7Loeiqa0kyzf+Z4g7XA odU19FoYdovoGV6UycTjW/WgU/BusQRICR8SYx1m3NwaFVdg3JO7v6ZYnD3NIkoxVfyK hXsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jHMlFH6LsTQMxArHjfOI4A+eVzUiLNnKHQnLvkY9O24=; b=zA89TpsHlPy+baiMRa8RAv5Af6L1GFKm17xkQ7TqR2lNYye0Ev0LqBGpF2lyEPnO+W g5S8xlAfm9A9pR/jQGm70Yp9Z+PwiYAZNNLzKIzFSJsnSmQ3dXOHzo0OpZKpGkAAIV+G D43l5GMtS+bVT/vk6i28lcaLuxwilACDTyz1nX9wDr/AUXIt0cibWr9k29AnvEL5mUvW D0dbMt/No1+26AVBDcgLWH4xMCBbGp+5WgRVqCZDdm7M2obJcuSuB+rMK7yGHsGQksOT RPCKR4N2brFnsz4FVl7XTo3cNAShF4DV1kEIbNdlGmLNyffH6KqmSgp5N7ROzlnCvcVM 6nSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sqPo3VE7; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si18120648pfq.19.2019.01.04.04.36.51; Fri, 04 Jan 2019 04:37:06 -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=@kernel.org header.s=default header.b=sqPo3VE7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbfADKZ4 (ORCPT + 99 others); Fri, 4 Jan 2019 05:25:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:47060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfADKZz (ORCPT ); Fri, 4 Jan 2019 05:25:55 -0500 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BD738218D2; Fri, 4 Jan 2019 10:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546597555; bh=CH83fWi6aXHDbkfbQ8crdcBsK6AL/E+/iMFA7cyrKRE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=sqPo3VE7/IZbGludqm+qgwK+/tLkcDUXJtpd3ObAaKoeKe7qD06IdKueO0MmuoM8/ qUwwh5k8QBq63jfWrnRI0GgKqqnjiUpMYr8Pt9wnFFCf2DVKJWC5XQvtDG2jPYi4UG km4+FAanW8gn9W8SMe8NoaMkc96sI9LaQHRhZ9JI= Received: by mail-wm1-f54.google.com with SMTP id y185so790551wmd.1; Fri, 04 Jan 2019 02:25:54 -0800 (PST) X-Gm-Message-State: AJcUukfvDRc/6f4pmwoBn0SuBTGeBe/GFWPKyew3QJSQk/6q1gptMWBY Xw3qVjbdYuuZU8K0648xOoVqtR9ok60EdTty9zg= X-Received: by 2002:a1c:6607:: with SMTP id a7mr859765wmc.129.1546597553112; Fri, 04 Jan 2019 02:25:53 -0800 (PST) MIME-Version: 1.0 References: <1546486635-16829-1-git-send-email-chuanjia.liu@mediatek.com> In-Reply-To: <1546486635-16829-1-git-send-email-chuanjia.liu@mediatek.com> From: Sean Wang Date: Fri, 4 Jan 2019 02:26:46 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs To: =?UTF-8?B?Q2h1YW5qaWEgTGl1ICjmn7PkvKDlmIkp?= Cc: Linus Walleij , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, youlin.pei@mediatek.com, =?UTF-8?B?RWRkaWUgSHVhbmcgKOm7g+aZuuWCkSk=?= , Zhiyong Tao , hailong.fan@mediatek.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 2, 2019 at 7:38 PM wrote: > > From: "chuanjia.liu" > > Virtual gpio only used inside SOC and not being exported to outside SOC. > Some modules use virtual gpio as eint and doesn't need SMT. > So this patch add EINT support to virtual GPIOs. > > Signed-off-by: chuanjia.liu Acked-by: Sean Wang BTW, if you were worried about a patch is lost, you could use RESEND in the tag is fine. > --- > change note: > v5: This patch is the same as v4,re-upload due to > mail permissions issues > --- > drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > index 4a9e0d4c2bbc..b1c368455d30 100644 > --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c > @@ -290,7 +290,13 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n) > return err; > > err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE); > - if (err) > + /* SMT is supposed to be supported by every real GPIO and doesn't > + * support virtual GPIOs, so the extra condition err != -ENOTSUPP > + * is just for adding EINT support to these virtual GPIOs. It should > + * add an extra flag in the pin descriptor when more pins with > + * distinctive characteristic come out. > + */ > + if (err && err != -ENOTSUPP) > return err; > > return 0; > -- > 2.19.1 >