Hello Linus,

Thank you for your feedback!

I am sorry for the delay of my answer, I was hoping others
would jump in the discussion as well.

> > +       err = gc->request(gc, hwirq);
>
> This is done in some drivers when what you want is exactly
> the work carried out by that callback. But can't you just call
> gpio_rcar_request() directly in this case so it is clear that
> the driver is meddling with the internal state of the hardware
> and not really intending to loop out into the external
> API or external callbacks?

gpio_rcar_request is static unfortunately, maybe I should
export the symbol?

>
> You're not on one of these platforms that prefer setting up
> the pin as GPIO using a pin control hog in the device tree?

My personal preference would be to deal with this from
within irqchip, as when you hook up a gpio as interrupt
from the DT the kernel should do everything that's necessary
to make it happen, but that is just a personal opinion.
Anyway, I did give gpio-hog a try and it works for me.

>
> Sadly there is sometimes more than one way to do things
> around here :/

so true

>
> Geert will know what is best.

Yeah, I am really keen in hearing from him about this, in the meantime
I went through a bunch of manuals, and moving the gpio request to the
bottom of gpio_rcar_irq_set_type seems to be okay for RCar devices in
general, but Geert knows definitely better.
I'll send this other option out as a patch this time, hoping to get more
feedbacks about the topic.

Again, thank you.

Fab

>
> Yours,
> Linus Walleij



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, 
Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered 
No. 04586709.

Reply via email to