Before submitting a driver for Casper Excalibur Laptops
Hi, I wrote a wmi driver for my laptop (Casper Excalibur G900, which is a Turkish laptop that is only sold in Turkey) because I was having random freezes (I think that is because of the it fails to limit power draw) on battery power and wanted to control my keyboard's rgb backlight. This is my first time coding in the Linux kernel, so I looked at other drivers and tried to do things similar. But I couldn't find a good example for rgb backlights. I have some questions: 1. Is it okay to control all of the keyboard leds with one attribute? There are 4 leds in my laptop: 3 keyboard leds and 1 corner led. It is possible to set all keyboard leds at once and when you change the brightness of one keyboard led, it changes the entire keyboard's brightness. And firmware doesn't support getting led data. In my implementation: a user writes to attribute a hexadecimal integer which includes led zone, brightness, mode, and color. When a user reads an attribute it returns the last led change. This feels hacky but makes the driver simpler. 2. Where should I put my driver? staging/ or platform/x86/? I'm planning to extend my driver to support more laptops from the same vendor. 3. Should I wait to extend support of the driver before submitting it? There is the driver's repo (which works only as a module): https://github.com/Mustafa-eksi/casper-wmi I'm going to send the patch probably a couple of days later
On Wed, Feb 21, 2024 at 01:30:11AM +0300, Mustafa Ekşi wrote:
2. Where should I put my driver? staging/ or platform/x86/? I'm planning to extend my driver to support more laptops from the same vendor.
drivers/staging/ is only for code that is not ready to be merged and it must have a TODO file that lists what needs to be done. I'd recommend just fixing the issues first and submitting it for drivers/platform/ directly.
3. Should I wait to extend support of the driver before submitting it?
No, send it now, no need to wait! good luck! greg k-h
participants (2)
-
Greg KH -
Mustafa Ekşi