lkml.org 
[lkml]   [2020]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 1/6] Check gpio pin number and use binary search in mtk_hw_pin_field_lookup()
From
Date
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

\
 
 \ /
  Last update: 2020-01-02 10:03    [W:0.071 / U:2.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site