Check for 'cpcap' within the compatible string, as various CPCAP compositions always include this component.
Signed-off-by: Svyatoslav Ryhel <[email protected]> --- drivers/input/cpcap_pwrbutton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/cpcap_pwrbutton.c b/drivers/input/cpcap_pwrbutton.c index c52c0481f67..a2278617f5a 100644 --- a/drivers/input/cpcap_pwrbutton.c +++ b/drivers/input/cpcap_pwrbutton.c @@ -76,7 +76,7 @@ static int cpcap_pwrbutton_of_to_plat(struct udevice *dev) /* Check interrupt parent, driver supports only CPCAP as parent */ irq_parent = ofnode_parse_phandle(dev_ofnode(dev), "interrupt-parent", 0); - if (!ofnode_device_is_compatible(irq_parent, "motorola,cpcap")) + if (!strstr(ofnode_get_name(irq_parent), "cpcap")) return -EINVAL; ret = dev_read_u32(dev, "interrupts", &irq_desc); -- 2.51.0

