mirror of
https://github.com/openbsd/src.git
synced 2026-04-24 14:14:37 +00:00
On the Lenovo X395 acpivout(4) does not attach since there is
no _BQC method. But we need it to attach, since it provides the events for the brightness keys. Thus, make acpivout(4) attach enough to register the event handler, but return early so that it doesn't register itself as ws_[gs]et_param. ok kettenis@
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: acpivideo.c,v 1.11 2017/06/30 06:25:29 mlarkin Exp $ */
|
||||
/* $OpenBSD: acpivideo.c,v 1.12 2020/02/08 19:08:17 patrick Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 Federico G. Schwindt <fgsch@openbsd.org>
|
||||
* Copyright (c) 2009 Paul Irofti <pirofti@openbsd.org>
|
||||
@@ -149,7 +149,7 @@ acpi_foundvout(struct aml_node *node, void *arg)
|
||||
if (node->parent != sc->sc_devnode)
|
||||
return (0);
|
||||
|
||||
if (aml_searchname(node, "_BCM") && aml_searchname(node, "_BQC")) {
|
||||
if (aml_searchname(node, "_BCM")) {
|
||||
memset(&aaa, 0, sizeof(aaa));
|
||||
aaa.aaa_iot = sc->sc_acpi->sc_iot;
|
||||
aaa.aaa_memt = sc->sc_acpi->sc_memt;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: acpivout.c,v 1.18 2020/01/28 14:06:16 patrick Exp $ */
|
||||
/* $OpenBSD: acpivout.c,v 1.19 2020/02/08 19:08:17 patrick Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2009 Paul Irofti <pirofti@openbsd.org>
|
||||
*
|
||||
@@ -96,9 +96,6 @@ acpivout_match(struct device *parent, void *match, void *aux)
|
||||
aaa->aaa_table != NULL)
|
||||
return (0);
|
||||
|
||||
if (ws_get_param || ws_set_param)
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -116,6 +113,10 @@ acpivout_attach(struct device *parent, struct device *self, void *aux)
|
||||
aml_register_notify(sc->sc_devnode, aaa->aaa_dev,
|
||||
acpivout_notify, sc, ACPIDEV_NOPOLL);
|
||||
|
||||
if (!aml_searchname(sc->sc_devnode, "_BQC") ||
|
||||
ws_get_param || ws_set_param)
|
||||
return;
|
||||
|
||||
ws_get_param = acpivout_get_param;
|
||||
ws_set_param = acpivout_set_param;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user