Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3719167imj; Tue, 19 Feb 2019 08:16:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ6CU7vCa9bYcJwBnHpP5GweT1Xl4UL3aS9Vxr0BXc7eaDaVlAwlMikBqAE2xygsJdgxIEZ X-Received: by 2002:a17:902:758f:: with SMTP id j15mr4586035pll.66.1550593018720; Tue, 19 Feb 2019 08:16:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550593018; cv=none; d=google.com; s=arc-20160816; b=Jzk3GQ4METQYylWDe6MYoqs51KVbRRU2qq6lbUASD6hJc4y8W8SKi9zpX3b8VPvfqJ A0yIe/IViHV5K7STsBXEgmTRwFBNH2fw0eu4McwZWvxma/2UH+RR7qCa1RGeaLD55IQ5 T4gNa/a9vK+vGHQYK44/gcZQCKpFXN9NnlhUOQh/dWmFIkaCxeCpRnKKRWue0j9MyKHg LBQUTXiI10IgiHhHI1C3wjHJJhDlUKwRxmhxWpakJdHewxubBmxcdQGSkQDAomoAvzFu 3D90KhaC7ceTFfhCORcA9OFSELrTPz8oTx41vGUOHzYrniweQALwClWO5kXaPf0zVF++ rg9Q== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Apvitoxp9dvmofg+FCyMujASvm2iNbOIA7grtEe47Ik=; b=e4qQui+mnxsjSHfBQLYKM3pP4u0xk7IbGjpN5xIpodOItYEpGpTjtEh/xLqhIwL4pK QrAq82+Vjy2nRzMnUscM/TUzA2KDVP8dllyamleuYiwVbtvVZ5+RxAWHvEoCIjOqbfGL oX7Erm6KlLsolZicO3zgtKlK7xSraKeNiUgimyxXMo8tfbILQmxeRdgMtLckLTHUnq+Z /Zt3XvS+hFCtTonp7hgcaq3VWp79aBiN8LSxr+8NHUxTP4vbOwKQSu3fyWX+ZCHPRkdU lQO5v2wMPLuyoZtPZLU8z2wJ1YTeRMhQeR69ZbTmTOPaVnzfcJVit4TKKvLXfqneUoAw n+Gw== 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 v1si15330547pfm.264.2019.02.19.08.16.43; Tue, 19 Feb 2019 08:16:58 -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 S1729038AbfBSQO4 (ORCPT + 99 others); Tue, 19 Feb 2019 11:14:56 -0500 Received: from foss.arm.com ([217.140.101.70]:46988 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbfBSQO4 (ORCPT ); Tue, 19 Feb 2019 11:14:56 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 52D50EBD; Tue, 19 Feb 2019 08:14:55 -0800 (PST) Received: from why.wild-wind.fr.eu.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9EC773F690; Tue, 19 Feb 2019 08:14:53 -0800 (PST) Date: Tue, 19 Feb 2019 16:14:49 +0000 From: Marc Zyngier To: Bartosz Golaszewski Cc: Linus Walleij , Thomas Gleixner , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v6 1/7] irq/irq_sim: add irq_set_type() callback Message-ID: <20190219161449.26e99a2b@why.wild-wind.fr.eu.org> In-Reply-To: <20190219160650.9614-2-brgl@bgdev.pl> References: <20190219160650.9614-1-brgl@bgdev.pl> <20190219160650.9614-2-brgl@bgdev.pl> Organization: ARM Ltd X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 Feb 2019 17:06:44 +0100 Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Implement the irq_set_type() callback and call irqd_set_trigger_type() > internally so that users interested in the configured trigger type can > later retrieve it using irqd_get_trigger_type(). We only support edge > trigger types. > > Signed-off-by: Bartosz Golaszewski > --- > kernel/irq/irq_sim.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c > index 98a20e1594ce..b992f88c5613 100644 > --- a/kernel/irq/irq_sim.c > +++ b/kernel/irq/irq_sim.c > @@ -25,10 +25,22 @@ static void irq_sim_irqunmask(struct irq_data *data) > irq_ctx->enabled = true; > } > > +static int irq_sim_set_type(struct irq_data *data, unsigned int type) > +{ > + /* We only support rising and falling edge trigger types. */ > + if (type & ~IRQ_TYPE_EDGE_BOTH) > + return -EINVAL; > + > + irqd_set_trigger_type(data, type); > + > + return 0; > +} > + > static struct irq_chip irq_sim_irqchip = { > .name = "irq_sim", > .irq_mask = irq_sim_irqmask, > .irq_unmask = irq_sim_irqunmask, > + .irq_set_type = irq_sim_set_type, > }; > > static void irq_sim_handle_irq(struct irq_work *work) Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.