Skip to content

Conversation

@MingcongBai
Copy link
Contributor

@MingcongBai MingcongBai commented May 27, 2024

Picked and rebased from #201.

From original pull request:

This patch adds support for Phytium keypad controller driver on Phytium SoCs.

Builds tested

  • amd64
  • arm64
  • loong64

@deepin-ci-robot deepin-ci-robot requested a review from BLumia May 27, 2024 00:26
@deepin-ci-robot
Copy link

[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 assign tsic404 for approval. For more information see the Code Review Process.

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

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

@deepin-ci-robot
Copy link

deepin pr auto review

This is the kernel module for the PHYTIUM Keypad Port. It provides a
keyboard-like input device that can be used with the Linux kernel's input
system. The input device is based on a matrix keypad, which is a popular
embedded input device due its small size, low power consumption, and
easily accessible keys.

The module uses the Linux kernel's input system, which is responsible for
handling input events from various types of input devices. The input
system provides a common API for handling keyboard-like input events
and other types of input events as well.

Here is a brief overview of the module's main features:

  1. It initializes the keypad controller and sets up the necessary hardware
    registers.

  2. It configures the keypad controller to generate interrupts for key presses
    and releases.

  3. It scans the keypad matrix and returns the new state in the
    matrix_volatile_state array.

  4. It compares the new state with the stable state stored in
    matrix_stable_state and fires events if changes are detected.

  5. It schedules a rescan in attempt to detect multiple key presses and
    enables the KRI interrupt to react quickly to key release events.

  6. It handles the keypad interrupt and processes the key presses and
    releases accordingly.

  7. It configures the input device and sets up the necessary hardware
    registers.

  8. It registers the input device with the Linux kernel's input system.

  9. It sets up the device to wake up from a sleep state if necessary.

  10. It provides a platform driver for use with the Linux kernel's device
    framework.

The module is designed to be used with the Linux kernel and can be built
and loaded as a kernel module. It is also designed to be easily adapted
to different keypad controller hardware and configurations.

This patch adds support for Phytium keypad controller driver on
Phytium SoCs.

Signed-off-by: Song Wenting <[email protected]>
Signed-off-by: Peng Min <[email protected]>
Signed-off-by: Chen Baozi <[email protected]>
Signed-off-by: Lan Hengyu <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
Signed-off-by: Hu Yeqing <[email protected]>
@MingcongBai MingcongBai force-pushed the bai/kernel-rolling/phytium-keypad branch from eeabf3b to 97bd257 Compare May 29, 2024 00:39
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