Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp613354rwd; Wed, 7 Jun 2023 04:50:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fbR+SZJoZiFsrbWWC9/EgyMDgNKMn9P8lLYY1pwYggqKdwD8/iwvPpXJZ6RcBRXQpX1fS X-Received: by 2002:a05:6a21:9181:b0:10b:960:c4a1 with SMTP id tp1-20020a056a21918100b0010b0960c4a1mr2859073pzb.57.1686138651080; Wed, 07 Jun 2023 04:50:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686138651; cv=pass; d=google.com; s=arc-20160816; b=R0AiprZzbeug7qwHIYjK8N1W4rtugArU7s4Gy6rAXOnQ9547oeL8vZ2Yoty/XaxazT /NtDslf+9yA3MwUyLXjN5BNvWyJdM0hTgbJ6WxFLJo8GkTeC/LvFWlxv6Q2eEEKPEiET ZM15I+VsiBsE1j0/UuKnofEcz0yWG9s+kxR6pYr6E5gKpz6JeS9WpWuEmkV74TsTNo8v mkN+FXkViQNkEr9CP5iT0gxda87Bz7Nco0crFswknGE67mOHaepCp7Yig9lvll96On3V mgnd/D3CZ9d1WuxcM8lEb7Mh50AHd3Iyj4lf/WChViBYKFrJwOhII0ApAM1tj5PUgSYO ZekA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=tpSVSWxtxcp8Zw+xN9C0wGkly02Ma3PR8DxbjICNKRc=; b=SvnBfhrTjZ7V0CFkOVe7Oti6zBaaydxGn8Kp/LpRuFXiahLryXF//2C+0XDlDfkM2J J4fEtXZtumz20ahFi2BI49IU/XU1YgKjerjAUBWeHMmcV7M+6aomWqx5Ui8nqLxJyhDG F0dnB8OI48KmCUAPUJ1TQyi6BN0+ThMCBiGuPr5q8Os0YQZ1W0cjwdfe70xe0TlnKkTf bc6DdPAxe2JNNuw5LhbkvmZhJ80bNtMzEuzjLL1pdfY297M6mVkwS7QnOSZIG3+LxcEG pZAiOvl9dlggq+T3vMx0qEHiAIVX6n5uAxVm2TxOxes5Wb/ln/9oL82Fb93phoh6Nw0o E8aQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=p5iMWE2k; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i188-20020a6254c5000000b00646479e5702si8623793pfb.381.2023.06.07.04.50.36; Wed, 07 Jun 2023 04:50:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=p5iMWE2k; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239901AbjFGLq6 (ORCPT + 99 others); Wed, 7 Jun 2023 07:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235252AbjFGLqz (ORCPT ); Wed, 7 Jun 2023 07:46:55 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2053.outbound.protection.outlook.com [40.107.243.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9B4219D; Wed, 7 Jun 2023 04:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JXG14cNZW93Z8hlVl26XxNi3B5aRV8s8YZV0OyOkmtlIylEW02uBi5kflTaLDD68B7ke5gPfCSqeTrtHMvsKgSVjRepXBi4cANuUL3kf1dLo/ikPKfr9r0Zy+1GpzJwX/tnJJsqdE68t8uSv4mssHjLsv8H2uIMbJg3I0tmNtQj6d1ItQIzZDTA6CLfw6aGDDuWMwLMITKd3fRKuwqKXQSYmDCHaVr0rYXpoA1m0zY5XIweMj1ReZzxlHpODJKWxICn90eLIhOPif1JsyWvhYmndsvE79RLAdatyQjheTy3biigaE3/fKf5yzNWTXO+srYAfGwwpCjC2lTiMhDZ9Dg== 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=tpSVSWxtxcp8Zw+xN9C0wGkly02Ma3PR8DxbjICNKRc=; b=NtQuUk+vx/agNNKctH0ccRyPRbvS8TKk1rM7SwDRK9nOTL2KBDvCew8VD+DnkcL7b5Q4A6Xy2/h1I9MuQ6gK3CAbMTrJk4Kx7CL4PMB5SM53Llv1EtKLOb+uSPB9agLsuUSl7qgYWjmVsw6Sl3Zmqh5ra6DIgZ4UY26k57TfjkqZXF51xwW4YyZp2E3z8v3LqFOYcwOHryGo3JBB5iOckxc+C9O9To/DzEWyLs+c3KiH478B+SS/P3VYB1Z62ycNaeiplBVVFxAD5vNNAgBoOsjMKKNMrJWRvrFqPyfSP2eWd0Ri2qzBavR1VR0bwtUtKW+V5aDBea/G1vZviPwSBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tpSVSWxtxcp8Zw+xN9C0wGkly02Ma3PR8DxbjICNKRc=; b=p5iMWE2kyMSaHDuGreR5/KV8YmCgQpZthlUbFVEorx8Jbuc1vcdynJfNTuSX7PT0dOIFqZ47GDSaib8FyYw9M0pETIeHGVpsuTdBt8yxp70t6VK9uT9sQqA9q+7yi28sQaSi6dw83MEXvGb7tCLHvCwTWHXU5j9R0mIY03Rc9kErNTupBR05zqpRpa3jcFvRlGpVvePNAynJjRVVFvtSMallkDUyRNb9prFIw4DYXJWS2xUVhLPBpuRTqGG6VeJnuwlHQrybvg2TUbFSr25d75dDqMn7pxvYaK2ZX0TPdvNnRyY7DvuZ1+32DLQ08n7QTWd7XYSLuJ4zZrilwmiSGg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) by BY5PR12MB4289.namprd12.prod.outlook.com (2603:10b6:a03:204::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 11:46:49 +0000 Received: from CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::21ef:9d59:5b2d:f1e8]) by CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::21ef:9d59:5b2d:f1e8%4]) with mapi id 15.20.6455.037; Wed, 7 Jun 2023 11:46:49 +0000 Message-ID: <51d00894-301f-6e0f-785e-3ff3a17a635f@nvidia.com> Date: Wed, 7 Jun 2023 12:46:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] gpio: tegra186: Check PMC driver status before any request Content-Language: en-US To: Prathamesh Shete , linus.walleij@linaro.org, brgl@bgdev.pl, thierry.reding@gmail.com, linux-tegra@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: smangipudi@nvidia.com, Manish Bhardwaj References: <496889ff-dd61-51af-c716-b9b9e2300be7@nvidia.com> <20230607113104.11761-1-pshete@nvidia.com> From: Jon Hunter In-Reply-To: <20230607113104.11761-1-pshete@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0535.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2c5::20) To CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR12MB5444:EE_|BY5PR12MB4289:EE_ X-MS-Office365-Filtering-Correlation-Id: 5982cf84-438c-44cc-a079-08db674ce0fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G5mFMNmSPIi7Y/U+46FqcidnZNmE9Ct44uZAZj1+CzKp3yr/jKxeWGvdKNM/3eRuHqvel/X5BEkOas5+aLMQTl6EVP0SLe8GIspJX39+Cju8584CvpZeDx/w8t3cqL3lWxvIXErRsRsZDolAqtiQb4IKW+4gQZs9HH5RiYaPPJbbhhcjFzBkhrZ4+Dz3ZGvp5wK/exmJ/1kz0Vl7otY//Ya7y5DqJcGtAYMj0NuCObNTe6o1YXXB/bSRaobfBOEIWUDDUjlow5dqLcClRW664/UpxcG6F+Wm2IYGfdaQZPKD2UevItKrN92tjlCTzNC2qNjzpcm2x/HWfPhZ4wHbIJbaLY1Gqx+N23AHHndyWtmnp5MaIwRq9/clIXXTQ9yJcxc05gHHYDp4XpQBqtU3cYqx68rpikJ3TaVCyDWiKNJ/QwvNo29XC37u48mYMuyI8JLizY2yklquhj84b1iOrJB4j12i7v+8sQIsscGTEDBShTDYM0hg4oHZ8USl49fFYoXfl5N6LP/DKGepTDfQm8njOu6w2yHfHXqXkTqkMWCVqh51JRQHXzlKPPR5R7qDBirQEFb2gNNK5sQ21ZsHNhmGb3NKEI7obnbKmB3gri2mJ8TL+WrKtyl/YQZ/YjqpqZdvTCtHGtRelx5XJLYlGg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5444.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(39860400002)(396003)(376002)(136003)(451199021)(86362001)(478600001)(6666004)(186003)(2616005)(6512007)(6506007)(53546011)(107886003)(6486002)(36756003)(2906002)(83380400001)(8936002)(38100700002)(4326008)(5660300002)(66476007)(31696002)(66946007)(8676002)(66556008)(41300700001)(31686004)(316002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dTY1dldabW4wS0NBcDRucUhkY0hLdndBdDEzV1BFWXdXZHZyd1dHVjJrcUFO?= =?utf-8?B?em93SHF3dUdLd3RVU0E1RlFPUDBEM0orVW1Zek1ocHgwdGMydklyTEh2cW1v?= =?utf-8?B?RVU1VitlMmYzdkpGa0kvNEgzUlFxZVZpSnBXMExFbC82TnQzbDBrSWZ1ZGVH?= =?utf-8?B?cndjUTJpanFCWmNmMVEvTEQxWkZOc1Zyb3V1OWhnb0NqOWJtbnJUWTBaTTIx?= =?utf-8?B?SEIyRzkydWVsYm9VWXFTK3BhNS9yQ3FEWEtyb3g5ckU1MWpaSDlGTVB3OXBH?= =?utf-8?B?c3FHU0cwRnU5UFMzUVdyUms2cjJ6LzJsVEVuU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?utf-8?B?OWRTRm4xMW9FU00xVjVKTE9POHJFYXRwSndaWG91NEpVZFo0djVObWlUNllG?= =?utf-8?B?R3pENXVzYWEvUTZkOXN0UFZES2g2ekllTWhhMnE4MVAzeTk4bFNONndSdjkz?= =?utf-8?B?dzVLTmNqcE9rWGJNS0U2M0lIeUZBPT0=?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5982cf84-438c-44cc-a079-08db674ce0fc X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5444.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 11:46:49.6033 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xyqnKzlgDqRGuG/sVno2fP6VIIRqH4fIGMXwrF6gq/sdZxSucMLW2ucRK2AHDf5qf4usUYRQvhTLMJWzt9zWuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4289 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/06/2023 12:31, Prathamesh Shete wrote: > When the PMC device is disabled, probing of the Tegra186 GPIO driver > fails because the IRQ domain that is registered by the PMC driver is > not found. The PMC IRQ domain is only used for wake-up and does not > impact GPIO functionality in general. Therefore, if the PMC device is > disabled, skip looking up the PMC IRQ domain to allow the GPIO driver > to be probed. > > Signed-off-by: Manish Bhardwaj > Signed-off-by: Prathamesh Shete > --- > drivers/gpio/gpio-tegra186.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c > index 464b0ea3b6f1..80d08ddde40e 100644 > --- a/drivers/gpio/gpio-tegra186.c > +++ b/drivers/gpio/gpio-tegra186.c > @@ -964,11 +964,15 @@ static int tegra186_gpio_probe(struct platform_device *pdev) > > np = of_find_matching_node(NULL, tegra186_pmc_of_match); > if (np) { > - irq->parent_domain = irq_find_host(np); > - of_node_put(np); > - > - if (!irq->parent_domain) > - return -EPROBE_DEFER; > + if (of_device_is_available(np)) { > + irq->parent_domain = irq_find_host(np); > + of_node_put(np); > + > + if (!irq->parent_domain) > + return -EPROBE_DEFER; > + } else { > + of_node_put(np); > + } > } > > irq->map = devm_kcalloc(&pdev->dev, gpio->gpio.ngpio, Thanks! Reviewed-by: Jon Hunter Jon -- nvpublic