Skip to content

Remove Rockchip gpio patch, already applied upstream#9368

Merged
paolosabatino merged 2 commits into
armbian:mainfrom
tparys:remove-redundant-rockchip-patch
Feb 6, 2026
Merged

Remove Rockchip gpio patch, already applied upstream#9368
paolosabatino merged 2 commits into
armbian:mainfrom
tparys:remove-redundant-rockchip-patch

Conversation

@tparys

@tparys tparys commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Description

Removes the Rockchip patch "general-gpio-driver-no-sleep" from rockchip 32 and 64 bit families, as it appears to already be applied at https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git on branch 6.18.y.

Documentation summary for feature / change

N/A

How Has This Been Tested?

Checklist:

N/A

Summary by CodeRabbit

  • Bug Fixes

    • Rockchip GPIO handling improved to avoid atomic-context kernel warnings during direction changes, boosting stability and responsiveness on Rockchip-based devices.
  • Chores

    • Cleaned up Rockchip patch series by removing several legacy/unused patches, simplifying kernel patch set.

@coderabbitai

coderabbitai Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This change removes pinctrl direction calls from the Rockchip GPIO driver's direction path, drops the gpiochip can_sleep assignment, and replaces the gpio_set_direction pinctrl hook with a gpio_request_enable hook in the Rockchip pinctrl ops across two kernel archive patches.

Changes

Cohort / File(s) Summary
Rockchip GPIO driver patches
patch/kernel/archive/rockchip-6.18/patches.armbian/general-gpio-driver-no-sleep.patch, patch/kernel/archive/rockchip64-6.18/general-gpio-driver-no-sleep.patch
Remove calls to pinctrl_gpio_direction_input/pinctrl_gpio_direction_output from rockchip_gpio_set_direction; remove gc->can_sleep = true assignment; trim direction-path to direct DDR writes under lock.
Rockchip pinctrl ops
drivers/pinctrl/pinctrl-rockchip.c (rockchip_pmx_ops)
Replace .gpio_set_direction = rockchip_pmx_gpio_set_direction with .gpio_request_enable = rockchip_pmx_gpio_request_enable; remove old direction hook and add request-enable callback implementation.
GPIO driver registration
drivers/gpio/gpio-rockchip.c
Update rockchip_gpiolib_register to omit assigning gc->can_sleep; adjust public gpiochip usage accordingly.
Series/patch lists
patch/kernel/archive/rockchip-6.18/series.conf and related series files
Remove references to the removed patch entries from the series lists.

Sequence Diagram(s)

sequenceDiagram
  participant User as Caller (gpiolib / driver)
  participant GPIO as rockchip_gpio (drivers/gpio)
  participant PCTL as pinctrl_gpio_* helpers
  participant PMX as rockchip pinctrl (pinctrl-rockchip)

  rect rgba(200,200,255,0.5)
    note right of GPIO: OLD FLOW
    User->>GPIO: gpio_direction_*()
    GPIO->>PCTL: pinctrl_gpio_direction_input/output()
    PCTL->>PMX: gpio_set_direction(range, offset)
    PMX-->>PCTL: set mux/state for direction
    PCTL-->>GPIO: return
  end

  rect rgba(200,255,200,0.5)
    note right of GPIO: NEW FLOW
    User->>GPIO: gpio_request()/gpio_direction_*()
    GPIO-->>PCTL: (no pinctrl direction call)
    User->>PMX: pinctrl request path triggers
    PMX->>PMX: gpio_request_enable(range, offset)
    PMX-->>User: pinctrl config applied at request time
    GPIO-->>User: DDR updated under lock (no sleep path)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • igorpecovnik
  • catalinii
  • JohnTheCoolingFan
  • TheSnowfield
  • SuperKali
  • Tonymac32
  • HeyMeco

Poem

🐰 A tiny hop in kernel land,
I nudged the pins with careful hand.
No sleeping flags, no direction calls,
Now requests enable the mall.
Hooray — less WARNs, more tidy halls! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: removing a Rockchip GPIO patch that is already applied upstream in the Linux kernel repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... 02 Milestone: First quarter release labels Feb 6, 2026
@paolosabatino

Copy link
Copy Markdown
Contributor

Look that the 32 bit rockchip patchset has a series.conf file. You need to remove the patch reference from there too, thanks!

@tparys

tparys commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

Look that the 32 bit rockchip patchset has a series.conf file. You need to remove the patch reference from there too, thanks!

Good catch. I've updated the PR, and tested that patches appear to apply cleanly for the Tinkerboard (Rockchip 32 bit) build.

@clarkmcc

clarkmcc commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

I'm unable to build on BOARD=nanopi-r3s-lts and am able and willing to test this patch on that board if needed.

Edit: Compiled and boot tested on NanoPi R3S-LTS

@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions Bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Feb 6, 2026

@schwar3kat schwar3kat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#9366 requires this merge for compile.
Tested on compile for radxa-e52c

@paolosabatino paolosabatino merged commit 3dc8e86 into armbian:main Feb 6, 2026
12 checks passed
@paolosabatino

Copy link
Copy Markdown
Contributor

Merged, thanks @tparys !

@tparys tparys deleted the remove-redundant-rockchip-patch branch February 7, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

4 participants