Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4519213imu; Tue, 29 Jan 2019 03:03:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN6NW83k0D/UxoIaLl8K/wcfI0iVBl4qy957HoTv43yZE9dIS/nusrrg2ZuNCkcxC1ijTMOL X-Received: by 2002:a17:902:6683:: with SMTP id e3mr24377640plk.93.1548759821341; Tue, 29 Jan 2019 03:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548759821; cv=none; d=google.com; s=arc-20160816; b=p6O9Wxc3hXehowyYPHgMe0qKfzx8NlGuWFa9cXYdNwQnbngRkfg57xuAtJPM0JRLMX af9QTaA4xYCn2HbTGykd2tSKHWaM36tnIfaTdqCUVEGPtZ121VXMDweVkZiLdXG8oAjg E0PObgJlYYAJbyxDIGKgZwm9mJwudmsSnQK6TbNUnaduZ/rJqTaUGZUYL3acjaW+JOnJ uQs5U6Dh3QpXKLlKXj+ZQkUTNLIocTKSsjSw6MolqOYqrycTEcz77FyMxMJHL+SMuCrT n02hK7f9IplU2w6CpNLCiDpwWLjrbcRavtViDq4JGchhE7QBcwpXy4mAAmz3vADvLN4C 5lQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=1+8MmN+ZgcnDLCUxKujb3Vh6HqkhqAQnHxttMRtWN18=; b=pbkVnRXkoz4bOLii/mGAmmFvVWNFSO2yXgtyeM49tQrlcd9mhq2geUHyq79tjbdij3 YS6KkYyN3ZNMSjkBm5ZuiBZQx27oTwSJhTzpU9RKZRYIiRL/sUnys1BUhv4kTHitgl1N IlutCiHjVcYrx2U3rrXFhMG/dikbsWygnSzCrM3DXya04oaQgKg7mbCWunanhjVzpHjH 7ZQD8OofR3XR+IY4O8eIDNjuCBzcQHGa8i4kRrR1Y/lUWB/P/0omdspdBdkE09mpxTn5 lcrRwiMBGSvAkkNGLoYM9boYu+2kksUATa2l6FjiKPXUPFQTPSLfcmDwFOIvVLxwEMlf xfFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=aTLdYJBh; 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 k186si37677749pgc.576.2019.01.29.03.03.24; Tue, 29 Jan 2019 03:03:41 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=aTLdYJBh; 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 S1727176AbfA2LBs (ORCPT + 99 others); Tue, 29 Jan 2019 06:01:48 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:34863 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbfA2LBs (ORCPT ); Tue, 29 Jan 2019 06:01:48 -0500 Received: by mail-it1-f196.google.com with SMTP id p197so3842922itp.0 for ; Tue, 29 Jan 2019 03:01:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1+8MmN+ZgcnDLCUxKujb3Vh6HqkhqAQnHxttMRtWN18=; b=aTLdYJBhej/DOxkOVMQcDXrZk1uZg9jzFc8QCi8xRf3cHwId1VgjWKTtv+RnB4a1JF 7ChKVKwrRxbrXLy0vkrDcaVy5OrdQd3HvypGKgXi+aBRZqoZvzBDX2Abggt8lZWGvrJf 31N2/LoRF4HWLpCTl0KOlny5iG4FROz9L/towdXolZJoF2SQgKkFajgTiQy+UuPux+jw qrHxrP+jmjgLY65gLQsVSCj21jxPAqM41Txlj9v0Ohi4dEsj2COehNUdHLHDXXQ3AD/c cwpkaIdjppd0nR264av7a5+XietRYnyHZsXfCQEj0o24EiqX0MdnMozuDYF/36XoJ5dI GRXg== 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:content-transfer-encoding; bh=1+8MmN+ZgcnDLCUxKujb3Vh6HqkhqAQnHxttMRtWN18=; b=hekENmRAiv2qY70xrHKpaqs7RoMCByoJzG6DoqL9pwzCAzrNcEHBmB/S5OyEj8woKH LUlh6ccNc+VW9RPJjyTuz84+9cJaUqivyHbCb353PGU01RKEMzkSz/Jn7n+r+g2PQd7Y d1bfuDWB1L4LtA9N/rjPQ1YhOLU3ohbgh9KH9+KkiMd5rmtHJM9qkd3CHqDBpdV1GpHB o5ayWd/MY8BqOqWOgG36JKtB5JoZR3GCo0HrEIuyB8aQcP58VGrbhXgU/677vfHZEU/w ZlLvwxKD9TkKqRFKUv1T1OB+DPKxMnDBnOFhBah5RT2Q7uK9W6GKSJYJh5789TfShv+C o3WA== X-Gm-Message-State: AJcUuke7IGbpEOqKSid4qgNo1qnvI8JGBo11YOyUkz7NPkDohJyDuIdb awIlk4T7xUXC7hDFvLd0xljA48A0CccFczBq9/DnJQ== X-Received: by 2002:a24:7284:: with SMTP id x126mr13805771itc.96.1548759707944; Tue, 29 Jan 2019 03:01:47 -0800 (PST) MIME-Version: 1.0 References: <20190129084411.30495-1-brgl@bgdev.pl> <20190129084411.30495-4-brgl@bgdev.pl> <20190129090706.33wcxb6d2c64yx7c@pengutronix.de> In-Reply-To: <20190129090706.33wcxb6d2c64yx7c@pengutronix.de> From: Bartosz Golaszewski Date: Tue, 29 Jan 2019 12:01:37 +0100 Message-ID: Subject: Re: [PATCH v2 3/9] irq/irq_sim: provide irq_sim_fire_type() To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Cc: Linus Walleij , Thomas Gleixner , Marc Zyngier , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 29 sty 2019 o 10:07 Uwe Kleine-K=C3=B6nig napisa=C5=82(a): > > 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 =3D irq_sim_get_ctx(sim, offset); > > > > - if (ctx->enabled) { > > + /* Only care about relevant flags. */ > > + type &=3D 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. > I'm afraid I don't follow. Wasn't that the way it was done in v1? Bart