coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
variant.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <baseboard/variants.h>
4 #include <soc/pci_devs.h>
6 
7 #define SKU_UNKNOWN 0xFFFFFFFF
8 
9 void variant_update_devtree(struct device *dev)
10 {
12  struct device *touchscreen_i2c_host;
13 
14  touchscreen_i2c_host = pcidev_path_on_root(PCH_DEVFN_I2C7);
15 
16  if (touchscreen_i2c_host == NULL)
17  return;
18 
19  /* SKU ID 1, 6 does not have a touchscreen device, hence disable it. */
22  touchscreen_i2c_host->enabled = 0;
23 }
uint32_t sku_id(void)
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
Definition: device_const.c:255
int google_chromeec_cbi_get_sku_id(uint32_t *id)
Definition: ec.c:839
bool no_touchscreen_sku(uint32_t sku_id)
Definition: gpio.c:46
void variant_update_devtree(struct device *dev)
Definition: variant.c:46
#define SKU_UNKNOWN
Definition: variant.c:7
#define PCH_DEVFN_I2C7
Definition: pci_devs.h:87
#define NULL
Definition: stddef.h:19
unsigned int uint32_t
Definition: stdint.h:14
Definition: device.h:107
unsigned int enabled
Definition: device.h:122