From: Oleksandr Suvorov Date: Wed, 27 Oct 2021 08:21:55 +0000 (+0200) Subject: mfd: stmpe: Support disabling sub-functions X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=786c6f140bb67ba315962b4742326e93e8b3207c;p=linux.git mfd: stmpe: Support disabling sub-functions Add support of sub-functions disabling. It allows one to define an stmpe sub-function device in devicetree, but keep it disabled. Signed-off-by: Oleksandr Suvorov Signed-off-by: Francesco Dolcini Reviewed-by: Linus Walleij Reviewed-by: Marcel Ziswiler Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20211027082155.206449-1-francesco.dolcini@toradex.com --- diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index e928df95e3167..aeb9ea55f97d9 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -1361,7 +1361,7 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata, pdata->autosleep = (pdata->autosleep_timeout) ? true : false; - for_each_child_of_node(np, child) { + for_each_available_child_of_node(np, child) { if (of_node_name_eq(child, "stmpe_gpio")) { pdata->blocks |= STMPE_BLOCK_GPIO; } else if (of_node_name_eq(child, "stmpe_keypad")) {