From patchwork Thu Aug 19 20:19:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 499821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E958FC432BE for ; Thu, 19 Aug 2021 20:26:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C507B6054E for ; Thu, 19 Aug 2021 20:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234942AbhHSU1E (ORCPT ); Thu, 19 Aug 2021 16:27:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbhHSU1D (ORCPT ); Thu, 19 Aug 2021 16:27:03 -0400 Received: from hillosipuli.retiisi.eu (hillosipuli.retiisi.eu [IPv6:2a01:4f9:c010:4572::81:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E827AC061757 for ; Thu, 19 Aug 2021 13:26:23 -0700 (PDT) Received: from lanttu.localdomain (unknown [192.168.2.193]) by hillosipuli.retiisi.eu (Postfix) with ESMTP id 2EBED634C91; Thu, 19 Aug 2021 23:19:36 +0300 (EEST) From: Sakari Ailus To: linux-acpi@vger.kernel.org, linux-media@vger.kernel.org Cc: andriy.shevchenko@linux.intel.com, rafael@kernel.org Subject: [RFC 0/3] ACPI, PMICs and probing cameras Date: Thu, 19 Aug 2021 23:19:33 +0300 Message-Id: <20210819201936.7390-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi all, The intel_skl_int3472 driver is required for some of the ACPI power state transitions to function. This driver may be compiled as a module and thus may probe after a sensor driver that depends on it (e.g. imx258). Make the sensor driver return -EPROBE_DEFER if the sensor cannot be found. This way the sensor driver will be probed when both the intel_skl_int3472 and the gpio-tps68470 drivers have successfully probed while also the gpio-tps68470 driver may be built as a module. The drawback of the approach is needless probing of the imx258 driver but everything can be built as modules. I'm posting this as RFC since the approach would require effectively all ACPI based sensor drivers to have the same check. This would be a non-issue to add. I wouldn't mind but... Is there a way to figure out whether the PMIC opregion callbacks actually succeed? At least the imx258 driver is happily probed even if the driver implementing the opregion callback is not there, and thus the device remains powered off --- and probe fails. Sakari Ailus (3): imx258: Defer probing on ident register read fail (on ACPI) gpio-tps68470: Allow building as module gpio-tps68470: Add modalias drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-tps68470.c | 5 ++++- drivers/media/i2c/imx258.c | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) Acked-by: Andy Shevchenko