Merged
Conversation
sheharyaar
reviewed
Jul 7, 2025
Member
|
Also, have you tested this logic with an example lua script ? If yes, please share it with us or add it as an example script. |
Contributor
Author
shared in the chat channel |
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
Contributor
I think we should have an example, but we don't need to block this PR for this.. but the sooner is better indeed.. |
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 7, 2025
lneto
reviewed
Jul 8, 2025
lneto
reviewed
Jul 8, 2025
lneto
reviewed
Jul 8, 2025
lneto
reviewed
Jul 8, 2025
lneto
reviewed
Jul 8, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 9, 2025
lneto
reviewed
Jul 10, 2025
lneto
reviewed
Jul 10, 2025
lneto
reviewed
Jul 10, 2025
lneto
reviewed
Jul 10, 2025
dc54118 to
0a41380
Compare
lneto
approved these changes
Jul 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the
lib/luahid.cfile to improve HID (Human Interface Device) driver functionality. The changes include adding new dependencies, extending theluahid_tstructure, implementing aprobemechanism for device initialization, and modifying the HID driver registration process to support Lua-based device handling.Enhancements to HID driver functionality:
Added new dependencies for Lua and kernel utilities:
Included
linux/printk.handlua.hheaders to enable logging and Lua integration in the HID driver.Extended
luahid_tstructure:Added a
devtablemember to store device-specific private data, improving the driver's ability to manage multiple devices.Implementation of device initialization (
probemechanism):Introduced
luahid_probeandluahid_probe_handler:Implemented a
probefunction and its Lua-based handler to initialize devices using Lua scripts. The handler retrieves device information, calls aninitfunction defined in Lua, and sets device-specific data (drvdata).Lua example for device initialization:
Added a sample Lua function (
hid_driver:init) to demonstrate how device-specific features can be set based ondevinfo.Modifications to HID driver registration:
luahid_registerfunction:Integrated the
probemechanism into the HID driver registration process. This includes setting up the Lua registry for device handling and ensuring proper cleanup in case of registration failure.