[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1577955756.23575.2.camel@mtksdaap41>
Date: Thu, 2 Jan 2020 17:02:36 +0800
From: Yingjoe Chen <yingjoe.chen@...iatek.com>
To: Light Hsieh <light.hsieh@...iatek.com>
CC: <linus.walleij@...aro.org>, <sean.wang@...nel.org>,
<kuohong.wang@...iatek.com>, <linux-kernel@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v7 1/6] Check gpio pin number and use binary search in
mtk_hw_pin_field_lookup()
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
Powered by blists - more mailing lists