Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: intel: Show the GPIO base calculation explicitly

During the split of intel_pinctrl_add_padgroups(), the _by_size() variant
missed the GPIO base calculations and hence made unable to retrieve proper
GPIO number.

Assign the gpio_base explicitly in _by_size() variant.

While at it, differentiate NOMAP case with the rest in _by_gpps() variant.

Fixes: 036e126c72eb ("pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance")
Reported-and-tested-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

+2
+2
drivers/pinctrl/intel/pinctrl-intel.c
··· 1357 1357 gpps[i].gpio_base = 0; 1358 1358 break; 1359 1359 case INTEL_GPIO_BASE_NOMAP: 1360 + break; 1360 1361 default: 1361 1362 break; 1362 1363 } ··· 1394 1393 gpps[i].size = min(gpp_size, npins); 1395 1394 npins -= gpps[i].size; 1396 1395 1396 + gpps[i].gpio_base = gpps[i].base; 1397 1397 gpps[i].padown_num = padown_num; 1398 1398 1399 1399 /*