Hi, On 05-11-2019 21:35, Andy Shevchenko wrote:
This is the ordering fix for GPIO <-> pin mapping registration to allow delegation of IRQ chip to the GPIO library. Two drivers are actually converted to use the new callback followed by switching to use of irqchip structure inside gpiochip. The series has been tested on Merrifield device (though no AEI) and on Thinkpad 10 where 4 events are registered, one of which has reasonable amount of interrupts coming from battery. First two patches are definitely good for v5.4 cycle (and have Fixes tag) while the rest can be applied for v5.5 if I didn't miss anything. So, they can go like patches 1-3 -> v5.4 (gpio/fixes) and to gpio/for-next and to pinctrl/for-next patches 4-5 -> v5.5 (gpio/for-next) patches 6-7 -> v5.5 (pinctrl/for-next) Perhaps it would require to wait next v5.4 rc in order to avoid dependency issues.
Given were we ar ein the cycle I think it is probably best to merge everything for 5.5, but that is not my call. I've given this a test run on a BYT device, and it works for me, So patches 1-3 and 6-7 are: Tested-by: Hans de Goede <hdegoede@xxxxxxxxxx> I've also reviewed all the patch and the entire set (so 1-7) looks good to me: Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx> One related remark, I notice that the following patches which were in -next for a bit and where then dropped because this needed more work are missing from this set: "pinctrl: baytrail: Allocate IRQ chip dynamic" "pinctrl: baytrail: Group GPIO IRQ chip initialization" "pinctrl: baytrail: Move IRQ valid mask initialization to a dedicated callback" IMHO it would be good to get these landed too (could be done in a follow up series I guess). I've also prepared and tested a set of patches on top of this one to also "Pass irqchip when adding gpiochip" for CHT, I will post these right after this email. Regards, Hans
Changelog v2 (resent): - fixed cover letter - resent with ML included Changelog v2: - added fixes tag to the first patch - reworked commit message for the second patch - added baytrail conversion - tested on ThinkPad 10 Andy Shevchenko (6): gpiolib: No need to call gpiochip_remove_pin_ranges() twice gpiolib: Introduce ->add_pin_ranges() callback gpio: merrifield: Add GPIO <-> pin mapping ranges via callback gpio: merrifield: Pass irqchip when adding gpiochip pinctrl: baytrail: Add GPIO <-> pin mapping ranges via callback pinctrl: baytrail: Pass irqchip when adding gpiochip Linus Walleij (1): gpiolib: Switch order of valid mask and hw init drivers/gpio/gpio-merrifield.c | 76 ++++++++++++++---------- drivers/gpio/gpiolib-of.c | 5 +- drivers/gpio/gpiolib.c | 19 +++++- drivers/pinctrl/intel/pinctrl-baytrail.c | 64 ++++++++++++-------- include/linux/gpio/driver.h | 5 ++ 5 files changed, 107 insertions(+), 62 deletions(-)