From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH V2 2/2] mailbox: introduce ARM SMC based mailbox Date: Mon, 10 Jun 2019 11:00:33 +0100 Message-ID: <20190610110033.28d21d21@donnerap.cambridge.arm.com> References: <20190603083005.4304-1-peng.fan@nxp.com> <20190603083005.4304-3-peng.fan@nxp.com> <866db682-785a-e0a6-b394-bb65c7a694c6@gmail.com> <20190606142056.68272dc0@donnerap.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Peng Fan Cc: Florian Fainelli , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "jassisinghbrar@gmail.com" , "sudeep.holla@arm.com" , "kernel@pengutronix.de" , dl-linux-imx , "shawnguo@kernel.org" , "festevam@gmail.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "van.freenix@gmail.com" List-Id: devicetree@vger.kernel.org On Mon, 10 Jun 2019 01:32:49 +0000 Peng Fan wrote: Hi Peng, [ ... ] > > > > + > > > > + irq_count = platform_irq_count(pdev); > > > > + if (irq_count == -EPROBE_DEFER) > > > > + return irq_count; > > > > + > > > > + if (irq_count && irq_count != val) { > > > > + dev_err(dev, "Interrupts not match num-chans\n"); > > > > > > Interrupts property does not match \"arm,num-chans\" would be more > > correct. > > > > Given that interrupts are optional, do we have to rely on this? > > If there is interrupt property, the interrupts should match channel counts. > > Do we actually > > need one interrupt per channel? > > I thought about this, provide one interrupt for all channels. > But there is no good way to let interrupt handlers know which > channel triggers the interrupt. So I use one interrupt per channel. Yeah, I was wondering about this as well. Seems like we need this indeed. Just sounds wasteful, but I guess we don't expect many channels anyway, normally. Cheers, Andre.