Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4117176rwi; Mon, 17 Oct 2022 01:30:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Nxq03Ay994eTW1YBwr2KFjKm9j9v1o/tT2xeAsPjGCnYJesZLNuzDbCwj/WIcoA2E7yqx X-Received: by 2002:a17:90b:4d8d:b0:20a:ad78:7826 with SMTP id oj13-20020a17090b4d8d00b0020aad787826mr12521895pjb.237.1665995406094; Mon, 17 Oct 2022 01:30:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665995406; cv=pass; d=google.com; s=arc-20160816; b=GBF80gYktWSH2WbY+R9EqJjMuO6erWJXc+g1D4MDLJOYgFIGa5dJIxl982GG7fBDK6 boexIXvZyzo59yeRU7d6p5f8Lslo89HvdvaaL7IyTn/f5Wuc4QWb+9NtEvpmMytFZJ9G oBtfaJMARH3eH29ZRnYujL9GSzsULHjXWB/26tEJloBqQJq1MFmvWZ7vGKj/gqbRGvhS AmTfANkjxDwgCgvnBls/jJJhsDVXjE1qM6Pp7IpuEAFJftxLT4RcZGmkPOUGoK+VOFem 9frJGkB1jGl6FSQzXhrZSW6JwpXb/xI1sWyJQztKJmB1c8av5JQbvvPejfUeGikokId7 9JNQ== 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=z0dRIsWBMet+7IHjXFEvZshov0850SM1LeuFS1O+Tgs=; b=MLRzL8CslC7jY+Z07t+8uqc2cAHB4y+cgE0sh/LFOoTP1brfagIEozTb+zxYJNTILd vD/tW9RWii+fS4+NAqOAnw2ABep+G6Mzb5JNZ7wh8DEx0sCkI+5p25fz/JA1q3FrnRdY izrsJrEhRAMYgn6TT03uezWr14R3nniT1OBe/LQTCYaR21Kt7w6VSqUqA9XlII+vwiv2 kU6b+0bIcN6/IvNhIWl0yb4JE2ZPjxPB6vMx5uEQ9s+tFZyzAoZTUPAkydad6ZP7KqRv 6yh/p8/0BNbeuHNYMA2DBY3LOJXkWRSsPlaQfoz9rpvxpPRJDtk+0NF0E198bZZv42qB ECWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=BMNaFIN4; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a170902ea9200b0018128753b25si10217532plb.271.2022.10.17.01.29.51; Mon, 17 Oct 2022 01:30:06 -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=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=BMNaFIN4; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229957AbiJQIL3 (ORCPT + 99 others); Mon, 17 Oct 2022 04:11:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230014AbiJQILZ (ORCPT ); Mon, 17 Oct 2022 04:11:25 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2052.outbound.protection.outlook.com [40.107.249.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B36785B53A for ; Mon, 17 Oct 2022 01:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OjTzgPxtCQ/qKc+Xju+PLZHvJ3JU58Vy+4qP0Ui5pf/9/KY8LGPUu1OudXSPZ5f0ze9g0so4ap62M18SVn7oCJbRpYRN1JWkPhkGunO/jXpR3cEvOBT7rTo6azPtKuU7aJeS7QRiBUTtCtPdz/Yk5mUhJBI+89oPmd76LU5Nb0IGprhXbqNdV5zZ+/A7JV2pADey4xTKFUUR+Jg5EeoeOHenxLlMiBHX59LTEXOILLWJ3WfOeakwxm+Em0MpqvzNVK/BFHEyrPTIue/GXCsX/8asQLez/FgDfsGXaBrHeeybye8x9F9EzA94q9hlWXh0robe6f04kqqnURB0hV3v/Q== 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=z0dRIsWBMet+7IHjXFEvZshov0850SM1LeuFS1O+Tgs=; b=AzjBsGhSEIoACHp8zv07cViY8HGJdVJQpltJfhRd7/NUIlZYQDH/yVXcyn0yj90Qz7g89ajeVgU3B+if12hokKMV+dcRwk594HJLlIPD4BEFY5NFlZYFqqZmH5eZnRIPF5586qi4c8FQMlQ/xUqgDfHtkWDRMPOLFOvOolRmo256XOeuFH2XDJPOoRsQvfTTe1XiqQTpYYme3AUXXgGZ8sbkAVDVxqa+3WRrW3kUit2cOoL57CX6lHdP/H2c7szv44HQ0xXn2iO54f2cNA9L/vKC0ZfiSBY2VjzZlCw6niEijHo17UeWMUfIe937f5oOyGO9whiq3AJvqcCa1qf/6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z0dRIsWBMet+7IHjXFEvZshov0850SM1LeuFS1O+Tgs=; b=BMNaFIN4lld0gSx9omfnUTTR+SWNG3d4nDp61vXZnwqSbalDHb2PXbRCgYAeioeL81RiJfHdgJulM4ozjiOmv/wEnPAhDkqgS23K3VzOYXJK973MoFk0WC4X9Jyo0KTM5aQ2TevBs4eWARYuezu5MjIt4vaD6HyFHYLv3WKOsQU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB7180.eurprd04.prod.outlook.com (2603:10a6:10:12c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.28; Mon, 17 Oct 2022 08:11:21 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a5ff:3d28:4bbc:e1ed]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a5ff:3d28:4bbc:e1ed%6]) with mapi id 15.20.5723.032; Mon, 17 Oct 2022 08:11:21 +0000 Message-ID: <5a2e060b-5e97-a1b2-f910-655483b69800@oss.nxp.com> Date: Mon, 17 Oct 2022 16:11:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0 Subject: Re: [PATCH v3] soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready Content-Language: en-US To: Benjamin Gaignard , shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com References: <20220919121302.597993-1-benjamin.gaignard@collabora.com> From: Peng Fan In-Reply-To: <20220919121302.597993-1-benjamin.gaignard@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR04CA0003.apcprd04.prod.outlook.com (2603:1096:4:197::23) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB7180:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d1a0c17-a25d-43a9-7687-08dab0172cbf X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kYwFs5jeqHezeOuEsVpayxMJa0Y11JTZ2Uv5ktiQPDGZnHFX+4Aj6GYPnW4SzZSxHyRvKIWaqSsiRTPV6CRQyeI/gSEVeoDn5ybytOXJRaUlLlTYWD905pyCGda8ydVDW0NvxA8uPoLwbF1z1CCJK0B0wNqF8olpSXzcA41vMcWAtn7b77nXh0G3bD9DC+urbAj3aednukzwnhWMaoOFI7QAkBBsIfqAQQyyLZE20liPbxoA9aTADmkbz1RC5uw1qgwPLzNgf3t022qc7VVEQksQVouvVss+854AncLabiBhFYwyo8toxtkotapo2sg8AHdKrZaRI19uAuzR7b4nQLOaHu0afkNrYjtq8qNUEg1nWJUhmwISllir27s3vg/js1DxDFTZWHIcXewQ+1QBL+a+5Vr4vQHj4M4hga3LDk/B9jafXQCtS7xeOjD/tqGVXCj9OXi+NcXDcFcyZEOEn4f0Ija40Lv8uFmJ8LZR2K3i+EzoOY9VqA2IM2kHFVIFupLgOn4PrnfXC71Jq30tL4WIe7Y4ApZzT0Dhh+UUTAV8D968JKo9ZGqNha+bww/SZFV3+xYuZfsgjj/NfEeXlIeCiyNuNfR2+yi7jKYJID77K1ZHcnM09I2sYH84TueWfhGGB2qtomvzgXeqb8qlIQ7SxlhaTlLE12sofjMjry8xTPxjm9VfKDpz1N5qe4bGV+39X5lTTewlP6gFpRVIzIcVRmh/9fRSiDUeLL8+5dw2wVflcCSXWLSq2ovgtb/XbqT9KnQk+ttS6H+E0t5EJoyIbQjatpx0VzY9HuJVcJJzyNl7qIZEGIysmEPujJ2i6hjV7dTOUCSlmt3vgGCLILX4fkblFouzMofHc4KTDpM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(376002)(136003)(366004)(39860400002)(451199015)(31686004)(38350700002)(6486002)(478600001)(38100700002)(8936002)(6512007)(83380400001)(31696002)(316002)(6666004)(41300700001)(53546011)(52116002)(6506007)(4326008)(2906002)(186003)(2616005)(26005)(66476007)(66556008)(66946007)(86362001)(8676002)(5660300002)(44832011)(32563001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cWJOckx6cDJHRkM5blVkbFNnbDhJejUyUXBWV1QzbVlXQlFVajhUeklQY0Ns?= =?utf-8?B?STVzSy9XOGtCaE9RMEY3MW5Cd2NsUGJ4RlhLditGTEUrQit1NTlvOTY0TUxR?= =?utf-8?B?cGN3akkrV2kydG9rZVlONEtYSWFEWU5RenFpZ1RGQzBobXdneWd3c2hibjNV?= =?utf-8?B?QVkzR2xKa3RUZkpvcXNRNUMxYzN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?B?djdlcHdQdHViVXh0OVhKSWoxL0ZZNXIxVnNzQ1NzOHc3VG9tTUtwdmQ2MktK?= =?utf-8?B?Njc0UHp4U0FXWWxkanVOOHFQNk0rcDRqZ0lKZXBnc09Xdlhhb1BXOTdsZSs4?= =?utf-8?Q?3VStKRL4aGwed2BL9B0Pyat3A?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d1a0c17-a25d-43a9-7687-08dab0172cbf X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2022 08:11:21.0810 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R0IEQD/PlH5hHv05P2IEN0TcKzzZq/25/m0tW0RmC1f8PDyiIGq5tJP1z4bP+i3OfZ0XOjSqT+h0WzzC1K42VA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7180 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=ham 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 9/19/2022 8:13 PM, Benjamin Gaignard wrote: > Depending of the boot sequence 'bus' genpd could be probed after imx8m-blk-ctrl > which led driver probe to fail. Change the returned error to allow > to defer the probe in this case. > > Signed-off-by: Benjamin Gaignard > --- > v3: > - only return -EPROBE_DEFER if 'bus' device hasn't be found. > > v2: > - keep dev_err_probe only change the return value. > > drivers/soc/imx/imx8m-blk-ctrl.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c > index dff7529268e4..1c195e9e8895 100644 > --- a/drivers/soc/imx/imx8m-blk-ctrl.c > +++ b/drivers/soc/imx/imx8m-blk-ctrl.c > @@ -214,9 +214,14 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) > return -ENOMEM; > > bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus"); > - if (IS_ERR(bc->bus_power_dev)) > - return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev), > - "failed to attach power domain \"bus\"\n"); > + if (IS_ERR(bc->bus_power_dev)) { > + if (PTR_ERR(bc->bus_power_dev) == -ENODEV) > + return dev_err_probe(dev, -EPROBE_DEFER, > + "failed to attach power domain \"bus\"\n"); > + else > + return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev), > + "failed to attach power domain \"bus\"\n"); > + } > > for (i = 0; i < bc_data->num_domains; i++) { > const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i]; Reviewed-by: Peng Fan