From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CB01C4361B for ; Wed, 9 Dec 2020 09:05:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A98423B6B for ; Wed, 9 Dec 2020 09:05:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728410AbgLIJE4 (ORCPT ); Wed, 9 Dec 2020 04:04:56 -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-Google-Smtp-Source: ABdhPJwuKkyip48lpOSEFICnOa696vlq3QGttzrv7MSDYITrNbVRdD+irJ6V6I1ixXgelIrnyZ0MGPhltSqo1zq38bI= 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