-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slimbook Compatibilty addition #12
base: master
Are you sure you want to change the base?
Conversation
My apologies, I did it accidentally. Maybe we can come up with something in the future. |
This adds compatibility for:
Also adds silent-mode feature for this models. |
pdev.c
Outdated
@@ -224,6 +292,8 @@ static DEVICE_ATTR_RW(fan_always_on); | |||
static DEVICE_ATTR_RW(fan_reduced_duty_cycle); | |||
static DEVICE_ATTR_RW(manual_control); | |||
static DEVICE_ATTR_RW(super_key_lock); | |||
static DEVICE_ATTR_RW(fan_boost); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure a new attribute is needed, see: https://github.com/torvalds/linux/blob/f2906aa863381afb0015a9eb7fefad885d4e5a56/Documentation/ABI/testing/sysfs-class-hwmon#L289 ? Enabling fan boost is already implemented via the pwm1_enable
attribute of the hwmon device created in hwmon_pwm.c
, which uses fan.c:qc71_fan_set_mode()
to turn it on, although that writes the FAN_CTRL
register directly. I am now wondering if using the TRIGGER_1
register might be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if fan_boost is the same as a 100% duty cycle pwm... then yes, exposing fan_boost is not necessary.
I am now wondering if using the TRIGGER_1 register might be better?
On our tests, switch through TRIGGER_1 triggers a WMI event. Tested with super key, fan boost and lightbar. On trigger 2 If I am not wrong, we could increase/decrease keyboard backlight. I can double check if you find interesting to have it documented.
That is the only benefit we found of trigger register. Unfortunately, TRIGGER_1_SILENT_MODE doesn't seem to switch what we call "Silent Mode" so we do it by writing FAN_CTRL instead.
Also, I've noticed fan.c functions are atomic, protected by a mutex and pdev.c aren't. As this is triggered by an human action (pressing Fn+F5) race conditions seem unlikely... however, we can move "silent mode" code to fan.c and surround it with a mutex
* Added Slimbook silent mode sysfs access
Sorry for the mess, I haven't much experience with this on github. I expected PR to be smarter. |
* Reduced verbosity * Using hex literals for events
… a proper led interface will be used but we need this for testing
* Added missing attribute condition check
…odels * hero/titan may be managed in manual mode as it looks like automatic does not emit a performance event
No description provided.