Before submitting a driver for Casper Excalibur Laptops
Mustafa Ekşi
mustafa.eskieksi at gmail.com
Tue Feb 20 17:30:11 EST 2024
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
More information about the Kernelnewbies
mailing list