Merge pull request #27 from pop-os/gaze14
Disable hwmon driver for gaze14
This commit is contained in:
commit
f7221447e4
20
system76.c
20
system76.c
|
|
@ -61,30 +61,42 @@
|
||||||
struct s76_driver_data {
|
struct s76_driver_data {
|
||||||
bool ap_led;
|
bool ap_led;
|
||||||
bool input;
|
bool input;
|
||||||
|
bool hwmon;
|
||||||
bool kb_led;
|
bool kb_led;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct s76_driver_data driver_data_white_kb = {
|
static struct s76_driver_data driver_data_white_kb = {
|
||||||
.ap_led = true,
|
.ap_led = true,
|
||||||
.input = true,
|
.input = true,
|
||||||
|
.hwmon = true,
|
||||||
.kb_led = false,
|
.kb_led = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct s76_driver_data driver_data_white_kb_hid = {
|
static struct s76_driver_data driver_data_white_kb_hid = {
|
||||||
.ap_led = true,
|
.ap_led = true,
|
||||||
.input = false,
|
.input = false,
|
||||||
|
.hwmon = true,
|
||||||
.kb_led = false,
|
.kb_led = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct s76_driver_data driver_data_color_kb = {
|
static struct s76_driver_data driver_data_color_kb = {
|
||||||
.ap_led = true,
|
.ap_led = true,
|
||||||
.input = true,
|
.input = true,
|
||||||
|
.hwmon = true,
|
||||||
.kb_led = true,
|
.kb_led = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct s76_driver_data driver_data_color_kb_hid = {
|
static struct s76_driver_data driver_data_color_kb_hid = {
|
||||||
.ap_led = true,
|
.ap_led = true,
|
||||||
.input = false,
|
.input = false,
|
||||||
|
.hwmon = true,
|
||||||
|
.kb_led = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct s76_driver_data driver_data_color_kb_hid_no_hwmon = {
|
||||||
|
.ap_led = true,
|
||||||
|
.input = false,
|
||||||
|
.hwmon = false,
|
||||||
.kb_led = true,
|
.kb_led = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -212,7 +224,9 @@ static int s76_probe(struct platform_device *dev) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef S76_HAS_HWMON
|
#ifdef S76_HAS_HWMON
|
||||||
s76_hwmon_init(&dev->dev);
|
if (driver_data->hwmon) {
|
||||||
|
s76_hwmon_init(&dev->dev);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
err = nv_hda_init(&dev->dev);
|
err = nv_hda_init(&dev->dev);
|
||||||
|
|
@ -242,7 +256,9 @@ static int s76_remove(struct platform_device *dev) {
|
||||||
|
|
||||||
nv_hda_exit();
|
nv_hda_exit();
|
||||||
#ifdef S76_HAS_HWMON
|
#ifdef S76_HAS_HWMON
|
||||||
|
if (driver_data->hwmon) {
|
||||||
s76_hwmon_fini(&dev->dev);
|
s76_hwmon_fini(&dev->dev);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (driver_data->input) {
|
if (driver_data->input) {
|
||||||
s76_input_exit();
|
s76_input_exit();
|
||||||
|
|
@ -338,7 +354,7 @@ static struct dmi_system_id s76_dmi_table[] __initdata = {
|
||||||
DMI_TABLE("galp3-b", white_kb),
|
DMI_TABLE("galp3-b", white_kb),
|
||||||
DMI_TABLE("galp3-c", white_kb_hid),
|
DMI_TABLE("galp3-c", white_kb_hid),
|
||||||
DMI_TABLE("gaze13", white_kb),
|
DMI_TABLE("gaze13", white_kb),
|
||||||
DMI_TABLE("gaze14", color_kb_hid),
|
DMI_TABLE("gaze14", color_kb_hid_no_hwmon),
|
||||||
DMI_TABLE("kudu5", white_kb),
|
DMI_TABLE("kudu5", white_kb),
|
||||||
DMI_TABLE("oryp3-jeremy", color_kb),
|
DMI_TABLE("oryp3-jeremy", color_kb),
|
||||||
DMI_TABLE("oryp4", color_kb),
|
DMI_TABLE("oryp4", color_kb),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue