Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: "Mustafa Ekşi" <mustafa.eskieksi@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: Before submitting a driver for Casper Excalibur Laptops
Date: Wed, 21 Feb 2024 01:30:11 +0300	[thread overview]
Message-ID: <acca50d0-f2e9-4a81-b94d-3c8483f12ba7@gmail.com> (raw)

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


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2024-02-20 22:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 22:30 Mustafa Ekşi [this message]
2024-02-21  8:16 ` Before submitting a driver for Casper Excalibur Laptops Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acca50d0-f2e9-4a81-b94d-3c8483f12ba7@gmail.com \
    --to=mustafa.eskieksi@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).