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 B9F78C4321E for ; Fri, 26 Nov 2021 07:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359235AbhKZH1G (ORCPT ); Fri, 26 Nov 2021 02:27:06 -0500 Received: from mga05.intel.com ([192.55.52.43]:41337 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348129AbhKZHZD (ORCPT ); Fri, 26 Nov 2021 02:25:03 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10179"; a="321855712" X-IronPort-AV: E=Sophos;i="5.87,265,1631602800"; d="scan'208";a="321855712" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2021 23:17:03 -0800 X-IronPort-AV: E=Sophos;i="5.87,265,1631602800"; d="scan'208";a="458094770" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2021 23:16:56 -0800 Received: by lahna (sSMTP sendmail emulation); Fri, 26 Nov 2021 09:16:53 +0200 Date: Fri, 26 Nov 2021 09:16:53 +0200 From: Mika Westerberg To: Hans de Goede Cc: "Rafael J . Wysocki" , Mark Gross , Andy Shevchenko , Wolfram Sang , Daniel Scally , Laurent Pinchart , Mauro Carvalho Chehab , Liam Girdwood , Mark Brown , Michael Turquette , Stephen Boyd , Len Brown , linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Sakari Ailus , Kate Hsuan , linux-media@vger.kernel.org, linux-clk@vger.kernel.org, Wolfram Sang , "Rafael J . Wysocki" , Andy Shevchenko Subject: Re: [PATCH v6 02/15] i2c: acpi: Use acpi_dev_ready_for_enumeration() helper Message-ID: References: <20211125165412.535063-1-hdegoede@redhat.com> <20211125165412.535063-3-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211125165412.535063-3-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 25, 2021 at 05:53:59PM +0100, Hans de Goede wrote: > The clk and regulator frameworks expect clk/regulator consumer-devices > to have info about the consumed clks/regulators described in the device's > fw_node. > > To work around cases where this info is not present in the firmware tables, > which is often the case on x86/ACPI devices, both frameworks allow the > provider-driver to attach info about consumers to the clks/regulators > when registering these. > > This causes problems with the probe ordering wrt drivers for consumers > of these clks/regulators. Since the lookups are only registered when the > provider-driver binds, trying to get these clks/regulators before then > results in a -ENOENT error for clks and a dummy regulator for regulators. > > To ensure the correct probe-ordering the ACPI core has code to defer the > enumeration of consumers affected by this until the providers are ready. > > Call the new acpi_dev_ready_for_enumeration() helper to avoid > enumerating / instantiating i2c-clients too early. > > Acked-by: Wolfram Sang > Acked-by: Rafael J. Wysocki > Reviewed-by: Andy Shevchenko > Signed-off-by: Hans de Goede Acked-by: Mika Westerberg