Refactor driver to use existing platform device instead of creating new one #44
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.
As part of an ongoing dialog with the Platform x86 maintainers, I have now refactored the driver to remove the extra "hard coded" platform device
samsung-galaxybook
, and instead this driver will use the platform device which is already already created from the ACPI device.Here is a link to the mailing list thread with more background: https://lore.kernel.org/platform-driver-x86/CAMF+KeaSarRT3weYhiCFO=Th5ZWMf=nvi53A+ggKYq2wBYAJpw@mail.gmail.com/T/#ma17bd2db196e1b6872e14963b84d1117bdb0f67d
As the hard-coded device has now been removed, and the sysfs attribute paths will now be "dynamic" based on which ACPI Device ID the user's device has, I have included some instructions in the README on how to now handle this, as well as an example
udev
rules file which will create a symlink to the device under the fixed path/dev/samsung-galaxybook
no matter which of the supported ACPI Device IDs the user's device has.I have tested this extensively on my own device, and everything does appear to still be working as before. One thing that I would be especially interested in is if @seaasses you might be willing and able to test this branch (https://github.com/joshuagrisham/samsung-galaxybook-extras/tree/refactor-use-existing-platform-device) and see if your issues from before (especially #32 ) are still ok with this latest branch?
If it is looking good then I think I am very close to being ready to submit a patch for this to mainline. There are a few small feedbacks I am waiting for but hopefully nothing more major... this PR is getting us closer, in any case!