Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3821256pxu; Wed, 9 Dec 2020 01:07:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJN0pPBUwUKmM52aBzP7m4rzUdVBg+zeE+UCMW+lP+C+ceALQot3rlvF3VSVJVPfMePDBw X-Received: by 2002:a17:907:9627:: with SMTP id gb39mr1214696ejc.267.1607504858558; Wed, 09 Dec 2020 01:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607504858; cv=none; d=google.com; s=arc-20160816; b=LUvTLhgL9PP050n5oPqA3Eu6CLze77WxPJHsr6PdqTfj6O18kQWalWquV6vbygxu1H 2dUVrqrhuIQqAG5qTx7mRzh83qW5Zz0Tf9lRre63HUCgEqgeqOC43I0asvO3scZrtgX8 vvKpIJHV6X6qe19oxcGdJIDyubJBDAZgt8m9WWfye1P46fkX5hYDoIiIGOT/LMuq5xSp qz+rF4z7oHJUKwREzh6JdWX+EMyIPBuKlVjwm7JVqCOoYzdkxYTP9R0YyOvhBqJgrmad 4fBGrP4nsvHDLf72wwoKhKZ6j7CXcwzhx8wUQg2PkZqVw6jx5OuZWaroNd12GxUE6lMW MMaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=u8KKN6kEP37Zb7PmsnDAFaBNjQZ74PfUTCo3xpIHe+4=; b=iVio44AkiU/UXq5SmVdjlJQtuBwshkx/af0tEuMWpKPTGsH/LXVDnYKokgMgNYoqPv 3M3uKJ9HlkISYgjEpSyElRhcAtMLAbcrGwAkLzzhUr8ekI9C4fDz44RISYme5NsujB90 HL2Yk0xTLURUtpLQBchEtJmz/YkWEK77c6frCOpR6hSDehhrXxmnDtVGqB971/JYMiho JUKf9fuEfDg2O94W1+T1QpSNDbz3mnDbZml61vxQZhYWc1Oqe7+X7hEGKgUaGM9feLlm cVMM4m18Gm8hGhLuz1GWIboxe4OYgO0lWlq4TA6hKP3pBzyTeeJxTnm7Cb/chRQJI+fH KeYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tjbgpYtB; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fi11si453490ejb.378.2020.12.09.01.07.15; Wed, 09 Dec 2020 01:07:38 -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; dkim=pass header.i=@linaro.org header.s=google header.b=tjbgpYtB; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728329AbgLIJEy (ORCPT + 99 others); Wed, 9 Dec 2020 04:04:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727536AbgLIJEw (ORCPT ); Wed, 9 Dec 2020 04:04:52 -0500 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDBEEC0613CF for ; Wed, 9 Dec 2020 01:04:11 -0800 (PST) Received: by mail-lf1-x141.google.com with SMTP id m12so2066593lfo.7 for ; Wed, 09 Dec 2020 01:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u8KKN6kEP37Zb7PmsnDAFaBNjQZ74PfUTCo3xpIHe+4=; b=tjbgpYtBD9Cp3oZ/+ZqVBgK6uC90kg/92F0++7454fg6X8Y045ejX12IJi61RR56Tn CSR2t9R1X3AqFKJ5434ULkCLTHbcDD9pJTJudwHZdYfCIGntqZx13i38HAnQmDCw/5ep 0GAnISEMnHP26rv0VZkfAcbZW3CFFErixasIE+i6SQQ6HINGDEKY5sWz/cjrlRHseQK/ TybZFQwME9Ej/CANfPWjJabsFL3zHvJyzfmMbVT6efU7iFMWW43/ldBZ0K2GjnbH/zi9 AwN44apWWTMptUo6wJak/8T3RnkS3mZWJScdeCj/Zm9HYSoXlkTnG1kA/r1UGLcosH58 c1EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u8KKN6kEP37Zb7PmsnDAFaBNjQZ74PfUTCo3xpIHe+4=; b=KtbZh3ZADHmiXp2wM88RSdAroGjJzBaZ7v2kWNU6sUQnR7rO0pYEHpsu+DrCy9K+rS WemH/b8Dr4TJIdbr0DojcCSa6O5qVHfL9E6OueXRg1Ky4JtrUJ2AkC202rKrIoMdvrih yR+C+dtltuIp5l6p7fnQpg77tXScrzI1cVdfR0GZN1fYEVOgjBlPgZ5Fl9UME6tne3P8 +wAOkq1Afy4Cxxou0fiXWnkHNlwiOQhP5nPHTj52kEf3v+aXSBjyLQKBVaAyHyfhwqoP PF3r2dGaDGxtfNL0DY7IlurtDa7+H2FFvRnHsDU+z6m89I5916KdSMnd+r6KB2OwEbq0 JU+w== X-Gm-Message-State: AOAM530ij3RK7pkUrssmVcsKLoknCGbNIlmGyJan+TjJsoB9Q2MX80cc TZrVaMWBYnYu8h4Pw/ZjYnVSuXiLZ0A27q37inj8ag== X-Received: by 2002:a19:6557:: with SMTP id c23mr633204lfj.157.1607504650310; Wed, 09 Dec 2020 01:04:10 -0800 (PST) MIME-Version: 1.0 References: <1606901543-8957-1-git-send-email-luojiaxing@huawei.com> <1606901543-8957-2-git-send-email-luojiaxing@huawei.com> <5955bd97-046c-8ac3-f66e-ea967e8f9128@huawei.com> In-Reply-To: <5955bd97-046c-8ac3-f66e-ea967e8f9128@huawei.com> From: Linus Walleij Date: Wed, 9 Dec 2020 10:03:59 +0100 Message-ID: Subject: Re: [PATCH v1 1/3] gpio: gpio-hisi: Add HiSilicon GPIO support To: luojiaxing Cc: Bartosz Golaszewski , Catalin Marinas , Will Deacon , Andy Shevchenko , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Linuxarm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiaxing, thanks! waiting for the new patch! On Wed, Dec 9, 2020 at 9:19 AM luojiaxing wrote: > >> +static void hisi_gpio_irq_disable(struct irq_data *d) > >> +{ > >> + struct gpio_chip *chip = irq_data_get_irq_chip_data(d); > >> + > >> + hisi_gpio_irq_set_mask(d); > >> + hisi_gpio_write_reg(chip, HISI_GPIO_INTEN_CLR_WX, BIT(irqd_to_hwirq(d))); > >> +} > > > > Interesting with a GPIO hardware that both as enable and mask > > bits. I can't see why, usually they just have masks but I suppose > > there is some reason. > > I see gpio-dwapb.c distinguishes between enable and mask too. > > In my opinion, enable indicates that the user uses the GPIO line as the > interrupt trigger source, > > and mask indicates that the user does not want to see an interrupts for > a while. > > The difference between the two types of flag is that interrupts > generated during masking are recorded but not lost, > > however, if interrupts are disabled, interrupts will lost. Ah, that makes perfect sense! Thanks for explaining. Yours, Linus Walleij