Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4429281imu; Tue, 29 Jan 2019 01:09:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN42BzpQYy9kmAios4tVZQKCrb5Bt9YdQLHnAlpq920oR6y7hzZV++r8H5nTtWUkOb9h7j0g X-Received: by 2002:a62:9913:: with SMTP id d19mr25374346pfe.107.1548752941256; Tue, 29 Jan 2019 01:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548752941; cv=none; d=google.com; s=arc-20160816; b=DYQmEpxNJotuJAxlSFoCpE4xefucZFV3wok/79ivPyPYJ7+wEy4S/PTLZDPXqQy7NO 6frvqzpyaZITK+GkNT3k8+990imwMjHlISgI6DyfMBtYHjl8wmFC4NGMsaX1qPNp+2Ot 7AYI0qpzua9LKofwkB41SUEjqLdq1FEOGUSPYMbjEr8AEOjh36a88jFBQDkyiwu/Jqq4 MvttDW/vlXWu7X93kEy0CIb1MI8vV3x4ZRAgHZEftIl7GFvgPj6ti5jqo58y2/0GxWWW JcVS1Dp55rFTnxvg1pcnYw0BwlWMrz7R249YAl7mnVQYisaxGD+nPcvrguUdkVQkqa1S he7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=fat3FygYKSLb31/S+t9ZTmrZ6fv7aRJJX3gFUs5LKp4=; b=C4VK3tnj8mD/E++UxgzmJ1rwo0nfDyiWUEG8L8y2qhQ1s2s+p4/TmPzEuiagGbs3Ey B+wAFWKY0vPfpt6SWoDyamwkAf7Jt2R2/X0mG8ojQt08bufIxGh395Ft7jqdJMjXH2yx YryRG1RYZp0T3IbJ5D5Qg/cXOtrW48EpltXeOeNj5kFZjnFU3bqRWuCA794VhrDCvhx9 UcUaRGg6ZVs19Ho44FeY7b5wpKhNLOUw5CHXlYtYqP2cKJftb2abuqOKmtuDzu+/Qwfa 46TFwwr7z4dc3/5WFsVO3fc6t7b96Rfe6BWeGTUCXoAxj3OmQ5BpwbhbTPGa+MCQyaES TByw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si9897933plk.296.2019.01.29.01.08.46; Tue, 29 Jan 2019 01:09:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727826AbfA2JHM (ORCPT + 99 others); Tue, 29 Jan 2019 04:07:12 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:44035 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725298AbfA2JHM (ORCPT ); Tue, 29 Jan 2019 04:07:12 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1goPMI-00023C-I8; Tue, 29 Jan 2019 10:07:06 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1goPMI-0001jl-56; Tue, 29 Jan 2019 10:07:06 +0100 Date: Tue, 29 Jan 2019 10:07:06 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Bartosz Golaszewski Cc: Linus Walleij , Thomas Gleixner , Marc Zyngier , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v2 3/9] irq/irq_sim: provide irq_sim_fire_type() Message-ID: <20190129090706.33wcxb6d2c64yx7c@pengutronix.de> References: <20190129084411.30495-1-brgl@bgdev.pl> <20190129084411.30495-4-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190129084411.30495-4-brgl@bgdev.pl> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Bartosz, On Tue, Jan 29, 2019 at 09:44:05AM +0100, Bartosz Golaszewski wrote: > -void irq_sim_fire(struct irq_sim *sim, unsigned int offset) > +void irq_sim_fire_type(struct irq_sim *sim, > + unsigned int offset, unsigned int type) > { > struct irq_sim_irq_ctx *ctx = irq_sim_get_ctx(sim, offset); > > - if (ctx->enabled) { > + /* Only care about relevant flags. */ > + type &= IRQ_TYPE_SENSE_MASK; > + > + if (ctx->enabled && (ctx->type & type)) { > set_bit(offset, sim->work_ctx.pending); > irq_work_queue(&sim->work_ctx.work); > } > } > -EXPORT_SYMBOL_GPL(irq_sim_fire); > +EXPORT_SYMBOL_GPL(irq_sim_fire_type); This looks better than the previous variant. I wonder if it would be still more sensible to have type only in the mockup driver. But I don't have the complete picture here and it might be easier this way. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |