From patchwork Wed Oct 27 08:21:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 12586653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12F75C433F5 for ; Wed, 27 Oct 2021 08:23:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE231610A0 for ; Wed, 27 Oct 2021 08:23:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CE231610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=toradex.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=N7Sxd11dIRVzTIbjrxGFf5pcftenZM2oSarqWbduEjY=; b=1m8Bo8vcGnZrR1 2rtoBEqy6b6YbR3DXE0PG0IZ+IAMiDjbHlBPyfygJdnTqJ+2LH6X1o9URmXfbddnPKADbcjOknq1T SxLISFQLUFArxcsXXg6Io9vTBquPleKWqiFZWCfjqBQPn4R1QpOdLeo7UQS3+9Tw+TXMDVqXH8nAF Fe3/EQF/rqWgMVfRRynsp0h8OOfDVNgK1RArcSMWh+87/Q+AYaKQrrdEYEXLOXbbHyPHyCx/h+E0B fpeQ1L9afHhCL210GHOlUYYWSeZoR65EkaxvlhnscAsIbo8HN3BsBB77y2LRvMYTa+7Sx2CVoEf2c Om8Qo98E2a678KkXNOng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfeCO-004JdQ-5E; Wed, 27 Oct 2021 08:22:16 +0000 Received: from mail-eopbgr30138.outbound.protection.outlook.com ([40.107.3.138] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfeCI-004Jcp-T5 for linux-arm-kernel@lists.infradead.org; Wed, 27 Oct 2021 08:22:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V96203VtWsv/LBcVnHJq6erxnyScllEyGDpR1F0cBXoP8R6g1AfvgOH5TCXWtJEulTCH6w08Y+tiVjPfdvoJa4CLGb1/8mOwRj75XzpWERVTYMym6hm0i1fc1G5cnATA9fSkYPprm4i2gZxgTCXPIBmbEQktEm8XyRYELL060FrdTTW3qvCSM7scu3xSOpBaexZkzVE3/HjoRssD5UZk4Z+ZmDWE1WGj2z9oQw0dZGuLQAvvpJuqxjaK4QbdrNNJEcwWXcIopLoVdb6b2wITAgblwEwyXnC/4SCHkZVM4sTetv4K6Z7D3pm3Eku9NR86khJlVFypdSdLpKhXltQ9OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+pKhc/xzfQQ0BQI6V7txRD6Uo9lZC0eHiHYmOemoeWQ=; b=BXmMArj+j6yl+DtQpQ4+ZqgxytW9aipvEFlqobSDHcvFwGI8q/f+J3JwK3LLekIyy6yxVT/xs2J32QNqFFDUwbtFLAI1f1xCfqjsA83pswclos4Tnt9cpzQeK1QCjjVpzc/kespe5ctWW8GKLZ5RS3yoA3/fvkPuGwK35fSWL6/GNH84Ggv3Gt6iHnyDGFdF9Fe+jEkEZstJLeAZGfG4FMOiwwLeY8eoHhWmRN+1AZSa/91LZS46Kysng2iZ8HHhaowsPRhA8t1lXe0BwTzuMYBA2aE2KGolWfto18CWjkWcADV95Llxnil4HoFKgAciXimYi8ZBAGZq/nQUaB1nFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=toradex.com; dmarc=pass action=none header.from=toradex.com; dkim=pass header.d=toradex.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+pKhc/xzfQQ0BQI6V7txRD6Uo9lZC0eHiHYmOemoeWQ=; b=cUTnyr0RhGdbm4rvxBim3Ja9rt+sRINpb/yGgsYPSneLIrRjbATh/fEMJYLE3pJEoEtTOCCVaziSX4XXp0EMpv5WLiS3M6Yabn/nMg9C0apCqNANrS+t+f3DPyCE/8g/vwoqdR/DTIarBChCOUkHI9Wr+RGMFFA0wyMwfi0fNrY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=toradex.com; Received: from DBAPR05MB7445.eurprd05.prod.outlook.com (2603:10a6:10:1a0::8) by DB7PR05MB4345.eurprd05.prod.outlook.com (2603:10a6:5:17::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Wed, 27 Oct 2021 08:22:06 +0000 Received: from DBAPR05MB7445.eurprd05.prod.outlook.com ([fe80::98f8:53ac:8110:c783]) by DBAPR05MB7445.eurprd05.prod.outlook.com ([fe80::98f8:53ac:8110:c783%3]) with mapi id 15.20.4628.020; Wed, 27 Oct 2021 08:22:06 +0000 From: Francesco Dolcini To: Lee Jones , Maxime Coquelin , Alexandre Torgue Cc: marcel.ziswiler@toradex.com, Oleksandr Suvorov , Oleksandr Suvorov , Francesco Dolcini , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mfd: stmpe: Support disabling sub-functions Date: Wed, 27 Oct 2021 10:21:55 +0200 Message-Id: <20211027082155.206449-1-francesco.dolcini@toradex.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: ZR0P278CA0064.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::15) To DBAPR05MB7445.eurprd05.prod.outlook.com (2603:10a6:10:1a0::8) MIME-Version: 1.0 Received: from francesco-nb.toradex.int (31.10.206.124) by ZR0P278CA0064.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.13 via Frontend Transport; Wed, 27 Oct 2021 08:22:06 +0000 Received: by francesco-nb.toradex.int (Postfix, from userid 1000) id CBD3310A374D; Wed, 27 Oct 2021 10:22:05 +0200 (CEST) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a09b891f-23fe-4fbf-4bbf-08d99922dd16 X-MS-TrafficTypeDiagnostic: DB7PR05MB4345: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Uw29CG5Suth16BkjyOOb3KP4nsVsgjKzQeXOCo8rqZxYynFz5Xeylali1eopwjxrNhbI9noGqH/gbKRHxX4GxHsqJ5bA7dIXVHxxc+PS8Yc1dKH5Yohc1CGwzuf+7cR7JyMAK60i+EPbzdtfCw1ojiQAQGFx/8NXgtSs7O3yhvWCBt7hASnzIyhxNzV+TYCPXp2apRWOX1/23uj9X/pvc1+fjMB1va2mywSav0VeH6ASJ+FL9+dHCEHU5F+3pUMqOKMKPFAqfVeJDNynQy9YXWAqHmy432Ni4ajuDU91+UnT2GBzcJVbb+Kg6MXEaSgWydpe9IRzWfV/5VcWc9zy5DvmY2p8hFjcggtYjnudF83Icd1T9ooasRyYhnzLCI74l+LF3wFx+XIsuaHfxUjEsbmQbQAaNOqwkTaWHmW7JDJJME+3LVHxUMT4FSJuHNsFhwMqYNXTLdoppqlS2xDd55b/ff72IHGx76/tL1r9KL6927EenNr0R5i0Xy698za90rLWnN6830aEo4FVDDTix9R+iulyuyIxVFmguyvpn3XvIu9U2liInc4rhdCujvCOq6UqWBRZMpt57QBaLZcOw6casWUfuHKvrrIrU2Y/NHFrCcEuW5TyBAWeoL3HE+VQP0EHInA2kbrGLtL6wgwiTuoNNWpkK6L2H9nzufKwLN8XASYnspgrEvHXpYucY7fnbsQiDkyr6BWe8+JtK6BEMQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR05MB7445.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(376002)(346002)(396003)(136003)(366004)(186003)(36756003)(316002)(66946007)(44832011)(6666004)(2906002)(83380400001)(1076003)(8936002)(8676002)(6266002)(86362001)(54906003)(110136005)(42186006)(38100700002)(26005)(52116002)(38350700002)(4326008)(5660300002)(66476007)(66556008)(508600001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: n+06FR5eqSibOHlAqVRgROHEvflaFYV98t7L6R2jmRzEgT284yF22t4HtpmFrSN9VxPlhyBoz1wlrktuiPXkSJelpGfKF4dMkUbBv5mDfkuTqW4pKkTDTFPSpyxvj/1d89kgam5gtcA1NSI/PAKWjWIn6uzqd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ZzJugVVirwjF0pon08QMkTYiL9d3U9tC6UnQF/Ht4fVyH2NWTopSwcqzyAraaF5Z0tbFZYttM5QzFHrkLO1PhfMCSxdlYIbc26BQpLm5VvtYWmJJMzuMkcQSjeXnFiaZ5jDvtAjz9MUhSpmSmtKfZ5NkOpE5scpW7oH33usoJbqIjPnD+0WngdbKyjW1LnkU8YYUcgmcCvxofP05YwX6dpgKZ+pU6WZgjY78O1a+vCd/ZGrrtKIFBBb5knK7cJGr46u19m4mGtnuAJdUqBLNEHMTf0NO+Le9Zeoj5mFctfDDIfHq+uZ6NfO0JdDJjJkDrRhCBceDnz+3K5x+xuyQBnMt8e3uWNMDLFDOhf1yO7nvZwvkcTC61kUmoH0Qt0aqd9puo3cQ+06Vk6hFgIBCcCKvZ0aFjmHqI5hZMzi9pTprihdVy673opmqL4SA7yW8UyyU4XZNSJUrd81je2OE= X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: a09b891f-23fe-4fbf-4bbf-08d99922dd16 X-MS-Exchange-CrossTenant-AuthSource: DBAPR05MB7445.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2021 08:22:06.7665 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d1lCxGWaBxLrOmVDFGV0LHvQiunyxC3ufUmNaMQ4eLnDLpZcJj3ZvjNUcO5YpPaDGKMa2GuSwT2XgNkZshSBCPW1aSBLwDzdEmW60iXewc4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4345 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211027_012211_043838_FD04DFB6 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Oleksandr Suvorov 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 Cc: Oleksandr Suvorov Signed-off-by: Francesco Dolcini Reviewed-by: Marcel Ziswiler Reviewed-by: Linus Walleij --- Hello, the main reason for this patch is to allow enabling/disabling sub-fuctions using DTS overlay to enable more flexibility on SoM/Carrier boards combinations. --- drivers/mfd/stmpe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index e928df95e316..aeb9ea55f97d 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")) {