Skip to content

[Deepin-Kernel-SIG] [linux 6.6.y] Input: i8042 - drop the _CRS guess from the KBC skip list - #2225

Merged
opsiff merged 1 commit into
deepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-2026-10-23-fix
Oct 23, 2026
Merged

opsiff merged 1 commit into
deepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-2026-10-23-fix

Conversation

@opsiff

@opsiff opsiff commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

The _CRS heuristic cannot tell the boards apart. Both the working laptop and the affected desktop describe the controller with _DSD and no _CRS at all, so the check would drop the KBC on every desktop instead of only where it cannot be used. Drop it and the helpers it needed.

The KaiTian board answers its controller (the self test returns 0x55), so it comes off the list too; only the 706 machines the Kylin LPC driver keeps disabled are skipped.

Summary by Sourcery

Restrict Phytium i8042 probing exclusions to machines known to have unusable keyboard controllers.

Bug Fixes:

  • Stop incorrectly skipping the Phytium keyboard controller on boards where ACPI resource descriptions are insufficient to distinguish usable hardware.
  • Remove the KaiTian board from the keyboard-controller skip list while retaining the affected 706 machines.

Enhancements:

  • Simplify i8042 platform initialization by removing the unreliable ACPI _CRS heuristic and its supporting helpers.

The _CRS heuristic cannot tell the boards apart.  Both the working laptop and
the affected desktop describe the controller with _DSD and no _CRS at all, so
the check would drop the KBC on every desktop instead of only where it cannot
be used.  Drop it and the helpers it needed.

The KaiTian board answers its controller (the self test returns 0x55), so it
comes off the list too; only the 706 machines the Kylin LPC driver keeps
disabled are skipped.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@sourcery-ai

sourcery-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The patch removes the ACPI _CRS heuristic, which cannot distinguish affected desktops from working systems, and simplifies Phytium i8042 initialization to skip only the known-unusable 706 machines while allowing other controllers to be probed normally.

Flow diagram for Phytium i8042 controller eligibility

flowchart TD
    A[i8042_platform_init] --> B{Phytium CPU}
    B -- No --> C[Return ENODEV]
    B -- Yes --> D{Machine matches phytium_i8042_skip}
    D -- Yes: 706 machines --> C
    D -- No --> E[Probe controller normally]
Loading

File-Level Changes

Change Details Files
Remove the unreliable ACPI _CRS-based controller detection and its supporting helpers.
  • Delete ACPI and class-type header dependencies that were only needed by the heuristic.
  • Remove ACPI device/resource lookup helpers and the conditional platform-init probe decision.
  • Eliminate the board-specific FD2000ZX200MB1 skip entry, since it is not distinguishable using _CRS.
drivers/input/serio/i8042-phytio.h
Narrow the Phytium KBC skip list to controllers known to be unusable.
  • Retain only the 706 machines disabled by the Kylin LPC driver.
  • Update the skip-list comment to describe the actual failure mode: accessing legacy ports can hang the machine.
  • Allow other boards, including KaiTian, to proceed with normal i8042 probing.
drivers/input/serio/i8042-phytio.h

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@opsiff
opsiff merged commit 075d5fe into deepin-community:linux-6.6.y Oct 23, 2026
12 checks passed
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants