pinctrl: mediatek: Supporting driving setting without mapping current to register...
authorLight Hsieh <light.hsieh@mediatek.com>
Wed, 22 Jan 2020 06:53:10 +0000 (14:53 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 14 Feb 2020 10:29:09 +0000 (11:29 +0100)
commit5f755e1f1efe5ca3b475b14169e6e85bf1411bb5
tree366d05b14e35d13fd2eefbad967563ac6621648e
parent3de7deefce693bb9783bca4cb42a81653ebec4e9
pinctrl: mediatek: Supporting driving setting without mapping current to register value

MediaTek's smartphone project actual usage does need to know current value
(in mA) in procedure of finding the best driving setting.
The steps in the procedure is like as follow:

1. set driving setting field in setting register as 0, measure waveform,
   perform test, and etc.
2. set driving setting field in setting register as 1, measure waveform,
   perform test, and etc.
...
n. set driving setting field in setting register as n-1, measure
   waveform, perform test, and etc.
Check the results of steps 1~n and adopt the setting that get best result.

This procedure does need to know the mapping between current to register
value.
Therefore, setting driving without mapping current is more practical for
MediaTek's smartphone usage.

Signed-off-by: Light Hsieh <light.hsieh@mediatek.com>
Link: https://lore.kernel.org/r/1579675994-7001-2-git-send-email-light.hsieh@mediatek.com
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mt6765.c
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h