On Tue, 2019-12-31 at 21:41 +0800, Light Hsieh wrote: > 1. Check if gpio pin number is in valid range to prevent from get invalid > pointer 'desc' in the following code: > desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; > > 2. Improve mtk_hw_pin_field_lookup() > 2.1 Modify mtk_hw_pin_field_lookup() to use binary search for accelerating > search. > 2.2 Correct message after the following check fail: > if (hw->soc->reg_cal && hw->soc->reg_cal[field].range) { > rc = &hw->soc->reg_cal[field]; > The original message is: > "Not support field %d for pin %d (%s)\n" > However, the check is on soc chip level, not on pin level yet. > So the message is corrected as: > "Not support field %d for this soc\n" > > Change-Id: I498a18df73e6a693e0e35635d5b92b8dc9c063ac > --- > drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 27 ++++++++++++++++++------ > drivers/pinctrl/mediatek/pinctrl-paris.c | 25 ++++++++++++++++++++++ > 2 files changed, 46 insertions(+), 6 deletions(-) This patch series change MTK pinctrl driver, please add 'pinctrl: mediatek: ' as prefix. Joe.C