Skip to content

Commit

Permalink
Merge pull request #165
Browse files Browse the repository at this point in the history
  • Loading branch information
teackot committed Nov 2, 2024
2 parents 1aef97d + 22e4400 commit d1c85d2
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/supported_devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
| Alpha 15 B5EE / B5EEK | 158LEMS1 | Issues:<br>- [#16](https://github.com/BeardOverflow/msi-ec/issues/16)<br> PRs:<br>- [#22](https://github.com/BeardOverflow/msi-ec/pull/22) | 5 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ❌ Keyboard backlight intensity |
| Alpha 17 B5EEK | 17LLEMS1 | Issues:<br>- [#45](https://github.com/BeardOverflow/msi-ec/issues/45)<br> PRs:<br>- [#122](https://github.com/BeardOverflow/msi-ec/pull/122) | 22 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ❌ Keyboard backlight intensity |
| Bravo 15 A4DDR | 16WKEMS1 | Issues:<br>- [#134](https://github.com/BeardOverflow/msi-ec/issues/134)<br> PRs:<br>- [#135](https://github.com/BeardOverflow/msi-ec/pull/135) | 23 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ❌ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ❌ Mic mute LED <br> ❌ Sound mute LED <br> ✔️ Keyboard backlight intensity |
| Bravo 15 B7E | 158PIMS1 | PRs:<br>- [#165](https://github.com/BeardOverflow/msi-ec/pull/165) | 32 | ✔️ Battery thresholds <br> ❌ Webcam toggle <br> ❌ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ✔️ Keyboard backlight intensity |
| Bravo 17 A4DDR / A4DDK | 17FKEMS1 | Issues:<br>- [#20](https://github.com/BeardOverflow/msi-ec/issues/20)<br> PRs:<br>- [#22](https://github.com/BeardOverflow/msi-ec/pull/22) | 7 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ❌ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ❌ Mic mute LED <br> ✔️ Sound mute LED <br> ✔️ Keyboard backlight intensity |
| Delta 15 A5EFK | 15CKEMS1 | Issues:<br>- [#41](https://github.com/BeardOverflow/msi-ec/issues/41)<br> PRs:<br>- [#107](https://github.com/BeardOverflow/msi-ec/pull/107) | 15 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ❌ Keyboard backlight intensity |
| Cyborg 15 A12VF | 15K1IMS1 | Issues:<br>- [#90](https://github.com/BeardOverflow/msi-ec/issues/90)<br> PRs:<br>- [#102](https://github.com/BeardOverflow/msi-ec/pull/102) | 17 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ✔️ Keyboard backlight intensity |
Expand Down
79 changes: 79 additions & 0 deletions msi-ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2626,6 +2626,84 @@ static struct msi_ec_conf CONF31 __initdata = {
},
};

static const char *ALLOWED_FW_32[] __initconst = {
"158PIMS1.207", // Bravo 15 B7E
NULL
};

static struct msi_ec_conf CONF32 __initdata = {
.allowed_fw = ALLOWED_FW_32,
.charge_control = {
.address = 0xd7,
.offset_start = 0x8a,
.offset_end = 0x80,
.range_min = 0x8a,
.range_max = 0xe4,
},
.webcam = {
.address = MSI_EC_ADDR_UNSUPP,
.block_address = MSI_EC_ADDR_UNSUPP,
.bit = 1,
},
.fn_win_swap = {
.address = 0xe8,
.bit = 4,
.invert = false,
},
.cooler_boost = {
.address = 0x98,
.bit = 7,
},
.shift_mode = {
.address = 0xd2,
.modes = {
{ SM_ECO_NAME, 0xc2 },
{ SM_COMFORT_NAME, 0xc1 },
{ SM_TURBO_NAME, 0xc4 },
MSI_EC_MODE_NULL
},
},
.super_battery = {
.address = MSI_EC_ADDR_UNKNOWN,
.mask = 0x0f,
},
.fan_mode = {
.address = 0xd4,
.modes = {
{ FM_AUTO_NAME, 0x0d },
{ FM_SILENT_NAME, 0x1d },
{ FM_ADVANCED_NAME, 0x8d },
MSI_EC_MODE_NULL
},
},
.cpu = {
.rt_temp_address = 0x68,
.rt_fan_speed_address = MSI_EC_ADDR_UNKNOWN,
.rt_fan_speed_base_min = 0x00,
.rt_fan_speed_base_max = 0x96,
.bs_fan_speed_address = MSI_EC_ADDR_UNSUPP,
.bs_fan_speed_base_min = 0x00,
.bs_fan_speed_base_max = 0x0f,
},
.gpu = {
.rt_temp_address = MSI_EC_ADDR_UNSUPP,
.rt_fan_speed_address = MSI_EC_ADDR_UNKNOWN,
},
.leds = {
.micmute_led_address = 0x2c,
.mute_led_address = 0x2d,
.bit = 1,
},
.kbd_bl = {
.bl_mode_address = MSI_EC_ADDR_UNSUPP,
.bl_modes = { },
.max_mode = 1,
.bl_state_address = 0xd3,
.state_base_value = 0x80,
.max_state = 3,
},
};

static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF0,
&CONF1,
Expand Down Expand Up @@ -2659,6 +2737,7 @@ static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF29,
&CONF30,
&CONF31,
&CONF32,
NULL
};

Expand Down

0 comments on commit d1c85d2

Please sign in to comment.