From patchwork Sat Jul 9 21:29:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12912329 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4368C43334 for ; Sat, 9 Jul 2022 21:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229469AbiGIV3z (ORCPT ); Sat, 9 Jul 2022 17:29:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiGIV3y (ORCPT ); Sat, 9 Jul 2022 17:29:54 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F1A1EAEB; Sat, 9 Jul 2022 14:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657402194; x=1688938194; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JqqCIX6BzWrb0wRSLBHBCbSD+Lo6FJrWps5xHRHZg+E=; b=O55zKGoxlzu8Snes40fvEQJq95ocoYMiakqh1b+Wbh8S5vVX03MHjl3W /GHHAQWyJBCfCmPk4wMHfv8Bw2P8xSuOsaZs0eTDh6NQpvlRu04NUef54 gQizCtC/f46CB5IFgKDRWx0+P2fGKQ+/B33b1Nhr9LwRxgANjRShtyCyR F7TnJpKvvUdh6xBqlGd1vajjeYZx23eCQ5U80UAQaRIeqVRbJ2GXtYU4s 38Zn0d+YKO7d8xNZlR/2lZQa6tgb5s1YOy3K4bxyUU53sUQrXaDnUMLfB /Pe5axyR16DcmhAtv7mkc1Z2FyxoBrDAXxLHglz8J41kUUtNBk0NBElhY Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10403"; a="348445719" X-IronPort-AV: E=Sophos;i="5.92,259,1650956400"; d="scan'208";a="348445719" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2022 14:29:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,259,1650956400"; d="scan'208";a="921352980" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 09 Jul 2022 14:29:51 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id F25541A0; Sun, 10 Jul 2022 00:29:58 +0300 (EEST) From: Andy Shevchenko To: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/1] spi: Return deferred probe error when controller isn't yet available Date: Sun, 10 Jul 2022 00:29:56 +0300 Message-Id: <20220709212956.25530-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org If the controller is not available, it might be in the future and we would like to re-probe the peripheral again. For that purpose return deferred probe. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215993 Fixes: 87e59b36e5e2 ("spi: Support selection of the index of the ACPI Spi Resource before alloc") Signed-off-by: Andy Shevchenko --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9b080dafa52c..119a2de8a8cb 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2478,7 +2478,7 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data) ctlr = acpi_spi_find_controller_by_adev(adev); if (!ctlr) - return -ENODEV; + return -EPROBE_DEFER; lookup->ctlr = ctlr; }