From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lina Iyer Subject: Re: [PATCH v4 07/10] drivers: pinctrl: msm: setup GPIO irqchip hierarchy Date: Wed, 17 Apr 2019 10:08:13 -0600 Message-ID: <20190417160813.GE16124@codeaurora.org> References: <20190313211844.29416-1-ilina@codeaurora.org> <20190313211844.29416-8-ilina@codeaurora.org> <155266731117.20095.4543997300651173812@swboyd.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Return-path: Content-Disposition: inline In-Reply-To: <155266731117.20095.4543997300651173812@swboyd.mtv.corp.google.com> Sender: linux-kernel-owner@vger.kernel.org To: Stephen Boyd Cc: evgreen@chromium.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org, rplsssn@codeaurora.org, linux-arm-msm@vger.kernel.org, thierry.reding@gmail.com, bjorn.andersson@linaro.org, dianders@chromium.org, linus.walleij@linaro.org List-Id: linux-arm-msm@vger.kernel.org On Fri, Mar 15 2019 at 10:28 -0600, Stephen Boyd wrote: >Quoting Lina Iyer (2019-03-13 14:18:41) >> --- >> Changes in v4: >> - Remove irq_set_wake() on summary IRQ interrupt >> Changes in v3: >> - Use of_irq_domain_map() and pass PDC pin to parent irqdomain >> Changes in v2: >> - Call parent mask when masking GPIO interrupt >> Changes in v1: >> - Fix bug when unmasking PDC interrupt >[...] >> +} >> + >> +/* >> + * TODO: Get rid of this and push it into gpiochip_to_irq() >> + */ > >Any chance this TODO can be resolved? > I am thinking of something like this. Would there be any issue in setting the type to IRQ_TYPE_SENSE_MASK instead of any one particular type? ---8<----- static int gpiochip_to_irq(struct gpio_chip *chip, unsigned offset) { #ifdef CONFIG_OF_GPIO struct irq_fwspec fwspec; if (chip->of_node) { fwspec.fwnode = of_node_to_fwnode(chip->of_node); fwspec.param[0] = offset; fwspec.param[1] = IRQ_TYPE_SENSE_MASK; fwspec.param_count = 2; return irq_create_fwspec_mapping(&fwspec); } #endif if (!gpiochip_irqchip_irq_valid(chip, offset)) return -ENXIO; return irq_create_mapping(chip->irq.domain, offset); } ---8<---- Thanks, Lina