Re: [PATCH 5.5 01/65] gpiolib: Add support for the irqdomain which doesnt use irq_fwspec as arg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 19, 2020 at 10:47:53PM +0800, Kevin Hao wrote:
> On Thu, Mar 19, 2020 at 02:47:10PM +0100, Greg Kroah-Hartman wrote:
> > On Thu, Mar 19, 2020 at 09:33:55PM +0800, Kevin Hao wrote:
> > > On Thu, Mar 19, 2020 at 02:03:43PM +0100, Greg Kroah-Hartman wrote:
> > > > From: Kevin Hao <haokexin@xxxxxxxxx>
> > > > 
> > > > [ Upstream commit 242587616710576808dc8d7cdf18cfe0d7bf9831 ]
> > > > 
> > > > Some gpio's parent irqdomain may not use the struct irq_fwspec as
> > > > argument, such as msi irqdomain. So rename the callback
> > > > populate_parent_fwspec() to populate_parent_alloc_arg() and make it
> > > > allocate and populate the specific struct which is needed by the
> > > > parent irqdomain.
> > > 
> > > Hi Greg,
> > > 
> > > This commit shouldn't go to stable because it is not a bug fix. It is just a
> > > prerequisite of switching to general GPIOLIB_IRQCHIP for thunderx gpio driver
> > > (commit 7a9f4460f74d "gpio: thunderx: Switch to GPIOLIB_IRQCHIP").
> > 
> > This seems to be a prerequisite for f98371476f36 ("pinctrl: qcom:
> > ssbi-gpio: Fix fwspec parsing bug") to apply properly.  With that
> > information, is it ok to keep?
> 
> Yes, this commit does change the context of commit f98371476f36 ("pinctrl: qcom:
> ssbi-gpio: Fix fwspec parsing bug"). So I am fine to keep this in order to apply
> f98371476f36 cleanly. But there is no really logical dependency between these two
> commits, so another option is that we can adjust the commit f98371476f36 a bit in order
> to apply to v5.5.x cleanly without this commit, something like below. IMHO, it is more
> suitable for the stable kernel.
> 
> From 2678327511f77edd8692634e81ef04cd9ca4b249 Mon Sep 17 00:00:00 2001
> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Date: Fri, 6 Mar 2020 15:34:15 +0100
> Subject: [PATCH] pinctrl: qcom: ssbi-gpio: Fix fwspec parsing bug
> 
> [ Upstream commit f98371476f36359da2285d1807b43e5b17fd18de ]
> 
> We are parsing SSBI gpios as fourcell fwspecs but they are
> twocell. Probably a simple copy-and-paste bug.
> 
> Tested on the APQ8060 DragonBoard and after this ethernet
> and MMC card detection works again.
> 
> Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Brian Masney <masneyb@xxxxxxxxxxxxx>
> Fixes: ae436fe81053 ("pinctrl: ssbi-gpio: convert to hierarchical IRQ helpers in gpio core")
> Link: https://lore.kernel.org/r/20200306143416.1476250-1-linus.walleij@xxxxxxxxxx
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> [Kevin: Replace .populate_parent_alloc_arg with .populate_parent_fwspec]
> Signed-off-by: Kevin Hao <haokexin@xxxxxxxxx>
> ---
>  drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> index dca86886b1f9..6b7f0d56a532 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> @@ -794,7 +794,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
>  	girq->fwnode = of_node_to_fwnode(pctrl->dev->of_node);
>  	girq->parent_domain = parent_domain;
>  	girq->child_to_parent_hwirq = pm8xxx_child_to_parent_hwirq;
> -	girq->populate_parent_fwspec = gpiochip_populate_parent_fwspec_fourcell;
> +	girq->populate_parent_fwspec = gpiochip_populate_parent_fwspec_twocell;
>  	girq->child_offset_to_irq = pm8xxx_child_offset_to_irq;
>  	girq->child_irq_domain_ops.translate = pm8xxx_domain_translate;
>  

Thank you, that worked, and I've dropped the other patch now.

Turns out it also broke the build :)

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux