On Thu, Feb 09, 2017 at 06:41:38PM -0600, joshua stein wrote:
> After resume, the keyboard backlight is still off, so restore it
> (this was also helpful to figure out the machine was actually
> resuming).
>
looks ok to me. ok mlarkin@
-ml
>
> Index: sys/dev/isa/asmc.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/isa/asmc.c,v
> retrieving revision 1.30
> diff -u -p -u -p -r1.30 asmc.c
> --- sys/dev/isa/asmc.c 22 Apr 2016 20:45:53 -0000 1.30
> +++ sys/dev/isa/asmc.c 10 Feb 2017 00:40:15 -0000
> @@ -92,6 +92,7 @@ void asmc_update(void *);
> int asmc_match(struct device *, void *, void *);
> void asmc_attach(struct device *, struct device *, void *);
> int asmc_detach(struct device *, int);
> +int asmc_activate(struct device *, int);
>
> /* wskbd hook functions */
> void asmc_backlight(void *);
> @@ -101,7 +102,7 @@ extern int (*wskbd_get_backlight)(struct
> extern int (*wskbd_set_backlight)(struct wskbd_backlight *);
>
> const struct cfattach asmc_ca = {
> - sizeof(struct asmc_softc), asmc_match, asmc_attach
> + sizeof(struct asmc_softc), asmc_match, asmc_attach, NULL, asmc_activate
> };
>
> struct cfdriver asmc_cd = {
> @@ -355,6 +356,20 @@ asmc_detach(struct device *self, int fla
>
> task_del(systq, &sc->sc_task_backlight);
> asmc_try(sc, ASMC_WRITE, "LKSB", buf, 2);
> + return 0;
> +}
> +
> +int
> +asmc_activate(struct device *self, int act)
> +{
> + struct asmc_softc *sc = (struct asmc_softc *)self;
> +
> + switch (act) {
> + case DVACT_WAKEUP:
> + asmc_backlight(sc);
> + break;
> + }
> +
> return 0;
> }
>
>