Attention is currently required from: Boris Mittelberg, Caveh Jalali, Julius Werner, Kapil Porwal, Karthik Ramasubramanian, Nick Vaccaro, Nick Vaccaro.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78077?usp=email )
Change subject: ec/google: Assume LID open for platforms without VBOOT_LID_SWITCH ......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/78077/comment/d56ad924_23b385ec : PS1, Line 7: Assume LID open for platforms without VBOOT_LID_SWITCH
Is it safe to assume this? I am not sure if there is a reason for the current implementation to return error.
error aka `-1` translates that there is no GPIO to represent the LID from lib_gpios.
``` if (g->port == -1) printk(BIOS_INFO, " undefined | "); ```
where else `1` would represent that LID is open/high
``` switch (g->value) { case 0: printk(BIOS_INFO, " low\n"); break; case 1: printk(BIOS_INFO, " high\n"); break; default: printk(BIOS_INFO, "undefined\n"); break; } ```
the caller from mb/chromeos.c. hence, we are not changing the device behavior by passing `1` for chromeboxes and bases w/o VBOOT_LID_SWITCH present.
``` struct lb_gpio chromeos_gpios[] = { {-1, ACTIVE_HIGH, get_lid_switch(), "lid"}, {-1, ACTIVE_HIGH, 0, "power"}, {-1, ACTIVE_HIGH, gfx_get_init_done(), "oprom"}, {GPIO_EC_IN_RW, ACTIVE_HIGH, gpio_get(GPIO_EC_IN_RW), "EC in RW"}, }; lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); ```