Skip to content

pinctrl: mediatek: Fixes and minor improvements

Chen-Yu Tsai linux-arm-kernel linux-gpio linux-mediatek lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 6 repliesIn review
  2. v17 patches 17 repliesSuperseded

Changes in v2 from the cover letter

- Correct PIN_CONFIG_BIAS_* read back for all cases
- Add patch 7 that reworks switch/case logic to make the code in mtk_pinconf_{get,set} cleaner
- Handle case where PIN_CONFIG_DRIVE_STRENGTH_UA is not given and the advanced mode needs to be disabled
- Also make the vendor specific MTK_PIN_CONFIG_DRV_ADV config override PIN_CONFIG_DRIVE_STRENGTH_UA (or lack of) if the former is present.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11pinctrl: pinconf-generic: Print arguments for bias-pull-*drivers/pinctrl/pinconf-generic.c+3 -30 replies
2/11pinctrl: mediatek: paris: Fix PIN_CONFIG_BIAS_* readbackdrivers/pinctrl/mediatek/pinctrl-paris.c+6 -101 reply
3/11pinctrl: mediatek: paris: Fix "argument" argument type for mtk_pinconf_get()drivers/pinctrl/mediatek/pinctrl-paris.c+1 -20 replies
4/11pinctrl: mediatek: paris: Fix pingroup pin config state readbackdrivers/pinctrl/mediatek/pinctrl-paris.c+3 -50 replies
5/11pinctrl: mediatek: paris: Drop extra newline in mtk_pctrl_show_one_pin()drivers/pinctrl/mediatek/pinctrl-paris.c+4 -82 replies
6/11pinctrl: mediatek: paris: Skip custom extra pin config dump for virtual GPIOsdrivers/pinctrl/mediatek/pinctrl-paris.c+3 -00 replies
7/11pinctrl: mediatek: paris: Rework mtk_pinconf_{get,set} switch/case logicdrivers/pinctrl/mediatek/pinctrl-paris.c+61 -831 reply
8/11pinctrl: mediatek: paris: Support generic PIN_CONFIG_DRIVE_STRENGTH_UAdrivers/pinctrl/mediatek/pinctrl-paris.c+99 -01 reply
9/11pinctrl: mediatek: pinctrl-moore: Simplify with dev_err_probe()drivers/pinctrl/mediatek/pinctrl-moore.c+9 -160 replies
10/11pinctrl: mediatek: pinctrl-paris: Simplify with dev_err_probe()drivers/pinctrl/mediatek/pinctrl-paris.c+7 -120 replies
11/11pinctrl: mediatek: pinctrl-mtk-common: Simplify with dev_err_probe()drivers/pinctrl/mediatek/pinctrl-mtk-common.c+11 -140 replies

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchAngeloGioacchino Del RegnoChen-Yu Tsai
1/11R-b T-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/11] pinctrl: mediatek: Fixes and minor improvements

Hi everyone,

Here are some fixes and minor improvements to generic pinconf and the Mediatek Paris pinctrl driver.

Changes since v1:
- Correct PIN_CONFIG_BIAS_* read back for all cases
- Add patch 7 that reworks switch/case logic to make the code in mtk_pinconf_{get,set} cleaner
- Handle case where PIN_CONFIG_DRIVE_STRENGTH_UA is not given and the advanced mode needs to be disabled
- Also make the vendor specific MTK_PIN_CONFIG_DRV_ADV config override PIN_CONFIG_DRIVE_STRENGTH_UA (or lack of) if the former is present.

Patch 1 makes the generic pinconf library print out arguments for PIN_CONFIG_BIAS_PULL_* in debugfs.

Patch 2 fixes bogus readback of PIN_CONFIG_BIAS_DISABLE being always present.

Patch 3 fixes the type of the "argument" argument in mtk_pinconf_get(). This was erroneously typed as an enum when it should have been u32.

Patch 4 fixes the pingroup config state readback to actually do readback.

Patch 5 drops an extra newline in the pinconf debugfs output.

Patch 6 cleans up the debugfs output, skipping the custom hardware state output on the virtual GPIOs, which have no corresponding hardware.

Patch 7 inverts the switch/case logic in mtk_pinconf_{get,set}() so the code has a default error code, breaks out on error, and has the indentation reduced.

Patch 8 adds support for PIN_CONFIG_DRIVE_STRENGTH_UA (drive-strength-uA) to the Mediatek Paris pinctrl library. The goal is to replace the vendor specific "mtk,drive-strength-adv" property with the generic one.

Patches 9 through 11 are from Angelo [1], rebased onto next-20220308.

Later on we might want to deprecate "mtk,drive-strength-adv".

Please have a look.

Regards
ChenYu

[1] https://lore.kernel.org/linux-gpio/[email protected]/

AngeloGioacchino Del Regno (3):
pinctrl: mediatek: pinctrl-moore: Simplify with dev_err_probe()
pinctrl: mediatek: pinctrl-paris: Simplify with dev_err_probe()
pinctrl: mediatek: pinctrl-mtk-common: Simplify with dev_err_probe()

Chen-Yu Tsai (8):
pinctrl: pinconf-generic: Print arguments for bias-pull-*
pinctrl: mediatek: paris: Fix PIN_CONFIG_BIAS_* readback
pinctrl: mediatek: paris: Fix "argument" argument type for
mtk_pinconf_get()
pinctrl: mediatek: paris: Fix pingroup pin config state readback
pinctrl: mediatek: paris: Drop extra newline in
mtk_pctrl_show_one_pin()
pinctrl: mediatek: paris: Skip custom extra pin config dump for
virtual GPIOs
pinctrl: mediatek: paris: Rework mtk_pinconf_{get,set} switch/case
logic
pinctrl: mediatek: paris: Support generic PIN_CONFIG_DRIVE_STRENGTH_UA

 drivers/pinctrl/mediatek/pinctrl-moore.c      |  25 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |  25 +-
 drivers/pinctrl/mediatek/pinctrl-paris.c      | 290 +++++++++++-------
 drivers/pinctrl/pinconf-generic.c             |   6 +-
 4 files changed, 200 insertions(+), 146 deletions(-)
Signature · 1 line
2.35.1.616.g0bdcbb4464-goog