Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp501861ybc; Tue, 12 Nov 2019 05:02:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwdn9215/Z/Z2gtPslgnsvP1Zw+/J4vS2ulttu56BxyMEHTcyFsCJ+c66Xgj0S9ieoNI1zo X-Received: by 2002:adf:e5c5:: with SMTP id a5mr26587189wrn.103.1573563722835; Tue, 12 Nov 2019 05:02:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573563722; cv=none; d=google.com; s=arc-20160816; b=Cu8On+DnJE+yrJCY/dUIT7YQmCrNBhgbGylunDWUGY5CRcGzQXPp9VxcKaLgvLH3rq DZxABCkUtswGaWvzC6g5BQoGCSMOgVDzkoyrbh6+MpNOp76MqzRkJGgBF4mc0HNZSdTF lAeInvn0/ea+VGpq+xtlj4dmgpyWnnm8S2EzEuto2bI7NpbnMP5knlakEF3anAq5Bi21 db1X82BotMrAfu696rJrWzNbfqJymP5WB0QTRHDUgb/XC+LKV6Ub7x9X3UTWlUASpclL w5mjpUixS2ZTslTEMvAYTV+XTG0bc2NExG4iqrU5J0mxZ9xbmfdca0h3sJ1AbMiAD8xo KdPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:cc:from:date:content-transfer-encoding:mime-version :subject:to; bh=hMkf/N/Jok2Er1rzMrC9Fq1gDK9dZL6h42grZeSQTYs=; b=LA0RTAPK+uwcoFOcSd6UCglZaQKRGh2Xep1Hati48SwxS5/X/5AuEDicSVf2Mt0dJc 3/V16dN4XzpsOreGqv/S2KW6XirNjXzjOTBYRj+shNNES5kRYt5tQi9rAW6wM81OZfEw M4fJ16rqR9PkPw45fPu5eBjlEKZ2FTH11WehwWBfPfRomAMm3r7ocWkEX7l53E+J4r4w buB87o2cqv7R34HUH7sX4YgB/Ud7wCIeyMDpNqlpu2THbofviiwolHThawI0+uY+6nrm QY0SuFw+nlFo9Nj/b2mr3ACEIZ7S9ZXJjklAFmDO2932feTiGZM6Qn/ed8JObDlB2juj EHvw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 r4si14417499edx.365.2019.11.12.05.01.36; Tue, 12 Nov 2019 05:02:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727189AbfKLM6L (ORCPT + 99 others); Tue, 12 Nov 2019 07:58:11 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:38479 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbfKLM6K (ORCPT ); Tue, 12 Nov 2019 07:58:10 -0500 Received: from www-data by cheepnis.misterjones.org with local (Exim 4.80) (envelope-from ) id 1iUVk8-0007QY-JF; Tue, 12 Nov 2019 13:58:00 +0100 To: Yash Shah Subject: Re: [PATCH 3/4] gpio: sifive: Add GPIO driver for SiFive SoCs X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 12 Nov 2019 14:07:21 +0109 From: Marc Zyngier Cc: , , , , , "Paul Walmsley ( Sifive)" , , , , , , Sagar Kadam , , , , , Sachin Ghadi In-Reply-To: <1573560684-48104-4-git-send-email-yash.shah@sifive.com> References: <1573560684-48104-1-git-send-email-yash.shah@sifive.com> <1573560684-48104-4-git-send-email-yash.shah@sifive.com> Message-ID: X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/0.7.2 X-SA-Exim-Connect-IP: X-SA-Exim-Rcpt-To: yash.shah@sifive.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, tglx@linutronix.de, jason@lakedaemon.net, bmeng.cn@gmail.com, atish.patra@wdc.com, sagar.kadam@sifive.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, sachin.ghadi@sifive.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-11-12 13:21, Yash Shah wrote: > Adds the GPIO driver for SiFive RISC-V SoCs. > > Signed-off-by: Wesley W. Terpstra > [Atish: Various fixes and code cleanup] > Signed-off-by: Atish Patra > Signed-off-by: Yash Shah [...] > +static int sifive_gpio_child_to_parent_hwirq(struct gpio_chip *gc, > + unsigned int child, > + unsigned int child_type, > + unsigned int *parent, > + unsigned int *parent_type) > +{ > + /* All these interrupts are level high in the CPU */ > + *parent_type = IRQ_TYPE_LEVEL_HIGH; It is bizare that you enforce LEVEL_HIGH here, while setting it to NONE in the PLIC driver. These things should be consistent. > + *parent = child + 7; Irk, magic numbers... M. -- Jazz is not dead. It just smells funny...