mb/google/laser: Disable touch screen device that according to SKU ID
We need disable touch screen device on laser SKU ID 6. BUG=none TEST=according to sku_id (Laser(convertible): 5, Laser14(clamshell): 6, Laser14(clamshell + touch):7) distinguish whether disable touch screen device. Signed-off-by: peichao.wang <peichao.wang@bitland.corp-partner.google.com> Change-Id: I6953c35a5e8c93d88fe63362156faa351e8ee71f Reviewed-on: https://review.coreboot.org/c/31428 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3ce88e1fa0
commit
67100b4147
|
@ -46,4 +46,7 @@ void variant_nhlt_init(struct nhlt *nhlt);
|
||||||
struct device;
|
struct device;
|
||||||
void variant_update_devtree(struct device *dev);
|
void variant_update_devtree(struct device *dev);
|
||||||
|
|
||||||
|
/* Get no touchscreen SKU ID. */
|
||||||
|
bool no_touchscreen_sku(uint32_t sku_id);
|
||||||
|
|
||||||
#endif /* BASEBOARD_VARIANTS_H */
|
#endif /* BASEBOARD_VARIANTS_H */
|
||||||
|
|
|
@ -68,13 +68,21 @@ static const struct pad_config sku1_default_override_table[] = {
|
||||||
PAD_NC(GPIO_214, DN_20K),
|
PAD_NC(GPIO_214, DN_20K),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool no_touchscreen_sku(uint32_t sku_id)
|
||||||
|
{
|
||||||
|
if ((sku_id == 1) || (sku_id == 6))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const struct pad_config *variant_override_gpio_table(size_t *num)
|
const struct pad_config *variant_override_gpio_table(size_t *num)
|
||||||
{
|
{
|
||||||
const struct pad_config *c;
|
const struct pad_config *c;
|
||||||
uint32_t sku_id = SKU_UNKNOWN;
|
uint32_t sku_id = SKU_UNKNOWN;
|
||||||
|
|
||||||
google_chromeec_cbi_get_sku_id(&sku_id);
|
google_chromeec_cbi_get_sku_id(&sku_id);
|
||||||
if (sku_id == 1) {
|
if (no_touchscreen_sku(sku_id)) {
|
||||||
c = sku1_default_override_table;
|
c = sku1_default_override_table;
|
||||||
*num = ARRAY_SIZE(sku1_default_override_table);
|
*num = ARRAY_SIZE(sku1_default_override_table);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -30,8 +30,8 @@ void variant_update_devtree(struct device *dev)
|
||||||
if (touchscreen_i2c_host == NULL)
|
if (touchscreen_i2c_host == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* SKU ID 1 does not have a touchscreen device, hence disable it. */
|
/* SKU ID 1, 6 does not have a touchscreen device, hence disable it. */
|
||||||
google_chromeec_cbi_get_sku_id(&sku_id);
|
google_chromeec_cbi_get_sku_id(&sku_id);
|
||||||
if (sku_id == 1)
|
if (no_touchscreen_sku(sku_id))
|
||||||
touchscreen_i2c_host->enabled = 0;
|
touchscreen_i2c_host->enabled = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue