From patchwork Thu Aug 24 15:13:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Wentong" X-Patchwork-Id: 717086 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 82952C3DA6F for ; Thu, 24 Aug 2023 15:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239655AbjHXPaZ (ORCPT ); Thu, 24 Aug 2023 11:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242199AbjHXPaD (ORCPT ); Thu, 24 Aug 2023 11:30:03 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74CDA1BDA for ; Thu, 24 Aug 2023 08:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692890999; x=1724426999; h=from:to:cc:subject:date:message-id; bh=Sstx62f6Pj/ejch6blaMMnKALy78e4+8T/MVh63yPMQ=; b=lRdoLcZwM/lcEN2OyseNCyQqsWExyfd+ojLE10+eeQMcs/4PIDZtqjep JqdoKnclbFwlWl8IxEJ53JKNaJgHJCZdKt9FMB7HP/aEwpx06yybriVtI SXq6vsk7lHX90XOrrlsPTfV9J6W7fZkzjuLazv+YvfFHM9v4f/PPc7Tte 4LtqsPgCXZbaL8oGKrtuW8H1UVb9jF8NYV5nrQ7EM0nDKk+hHkaqTVyya CBNtGkDWBQELeZazcUNq0mF1jHCpUsNVKr2faB8njh2T44tXszz4o7wc4 61TppesBfOHNNHJG7ybtRsiRARB4JxyCTlumIHS5LlKKmVwu2w3slRRJf w==; X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="374440715" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="374440715" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 08:13:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="851552083" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="851552083" Received: from shsensorbuild2.sh.intel.com ([10.239.134.197]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2023 08:13:46 -0700 From: Wentong Wu To: sakari.ailus@linux.intel.com, linux-media@vger.kernel.org Cc: zhifeng.wang@intel.com, Wentong Wu Subject: [PATCH v3 1/3] media: ivsc: csi: remove name identifier Date: Thu, 24 Aug 2023 23:13:35 +0800 Message-Id: <1692890017-15858-1-git-send-email-wentong.wu@intel.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove name identifier to match the device with the defined UUID when load driver module. Signed-off-by: Wentong Wu --- v3: - no change compared with v1 and v2 drivers/media/pci/intel/ivsc/mei_csi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c index 264b85b..648c6a8 100644 --- a/drivers/media/pci/intel/ivsc/mei_csi.c +++ b/drivers/media/pci/intel/ivsc/mei_csi.c @@ -30,7 +30,6 @@ #include #include -#define MEI_CSI_DRIVER_NAME "ivsc_csi" #define MEI_CSI_ENTITY_NAME "Intel IVSC CSI" #define MEI_CSI_LINK_FREQ_400MHZ 400000000ULL @@ -804,14 +803,14 @@ static void mei_csi_remove(struct mei_cl_device *cldev) 0xAF, 0x93, 0x7b, 0x44, 0x53, 0xAC, 0x29, 0xDA) static const struct mei_cl_device_id mei_csi_tbl[] = { - { MEI_CSI_DRIVER_NAME, MEI_CSI_UUID, MEI_CL_VERSION_ANY }, + { .uuid = MEI_CSI_UUID, .version = MEI_CL_VERSION_ANY }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(mei, mei_csi_tbl); static struct mei_cl_driver mei_csi_driver = { .id_table = mei_csi_tbl, - .name = MEI_CSI_DRIVER_NAME, + .name = KBUILD_MODNAME, .probe = mei_csi_probe, .remove = mei_csi_remove, From patchwork Thu Aug 24 15:13:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Wentong" X-Patchwork-Id: 717087 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 4C2EDC27C40 for ; Thu, 24 Aug 2023 15:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241958AbjHXPaZ (ORCPT ); Thu, 24 Aug 2023 11:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242215AbjHXPaG (ORCPT ); Thu, 24 Aug 2023 11:30:06 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D2119BD for ; Thu, 24 Aug 2023 08:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692891003; x=1724427003; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=e0skZ/DRHRDOOy7PezQvD0QWwxlzVdNp0bVKM6lZOSY=; b=YP+ixhxo3e44zEkcoa2aKdgNtFL88Xw+PwumRIJmD1PFogBSMOAh/cjj g5n3lfok0jNtdLQ6o57kF86vwRRTNFrhGDQNPK1xr2TvU48lYTfwyGr7s E1taiPEc/4xeqBsEqac+IKZ9d0uEpTog7tR0hWBCBSlUld8gARyHIOqMw W0JKuVQJjHBWLbVGI1E38mUZO0Vq1bppwKb1y2vh9mhuQzWZ0evLTaXIF XCJTi/CJcOew2SwR/dqEY4ihOjeHHujgL+GtXxjBt7qcKtuoRCglIa1PX CjVogLJrAUrnUTzeGP6iVdIfkLBqWum0TC+yWfeQuBBig+96rq1NlGnQo A==; X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="374440753" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="374440753" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 08:13:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="851552127" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="851552127" Received: from shsensorbuild2.sh.intel.com ([10.239.134.197]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2023 08:13:50 -0700 From: Wentong Wu To: sakari.ailus@linux.intel.com, linux-media@vger.kernel.org Cc: zhifeng.wang@intel.com, Wentong Wu Subject: [PATCH v3 2/3] media: ivsc: ace: remove name identifier Date: Thu, 24 Aug 2023 23:13:36 +0800 Message-Id: <1692890017-15858-2-git-send-email-wentong.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1692890017-15858-1-git-send-email-wentong.wu@intel.com> References: <1692890017-15858-1-git-send-email-wentong.wu@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove name identifier to match the device with the defined UUID when load driver module. Signed-off-by: Wentong Wu --- v3: - no change compared with v1 and v2 drivers/media/pci/intel/ivsc/mei_ace.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c b/drivers/media/pci/intel/ivsc/mei_ace.c index bc37f6d..7879f1f 100644 --- a/drivers/media/pci/intel/ivsc/mei_ace.c +++ b/drivers/media/pci/intel/ivsc/mei_ace.c @@ -30,8 +30,6 @@ #include #include -#define MEI_ACE_DRIVER_NAME "ivsc_ace" - /* indicating driver message */ #define ACE_DRV_MSG 1 /* indicating set command */ @@ -554,14 +552,14 @@ static const struct dev_pm_ops mei_ace_pm_ops = { 0x9B, 0x78, 0x03, 0x61, 0x63, 0x5E, 0x24, 0x47) static const struct mei_cl_device_id mei_ace_tbl[] = { - { MEI_ACE_DRIVER_NAME, MEI_ACE_UUID, MEI_CL_VERSION_ANY }, + { .uuid = MEI_ACE_UUID, .version = MEI_CL_VERSION_ANY }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(mei, mei_ace_tbl); static struct mei_cl_driver mei_ace_driver = { .id_table = mei_ace_tbl, - .name = MEI_ACE_DRIVER_NAME, + .name = KBUILD_MODNAME, .probe = mei_ace_probe, .remove = mei_ace_remove, From patchwork Thu Aug 24 15:13:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Wentong" X-Patchwork-Id: 716732 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 A56FBC7EE43 for ; Thu, 24 Aug 2023 15:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242094AbjHXPaZ (ORCPT ); Thu, 24 Aug 2023 11:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242223AbjHXPaN (ORCPT ); Thu, 24 Aug 2023 11:30:13 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7F6219BF for ; Thu, 24 Aug 2023 08:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692891010; x=1724427010; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ezlFxE9HhmpFlSbpYo4MIz3IoIPSkWsZ3vj6z3UQC9E=; b=iSI5Y2TaM8TFOoUU7a5f23JKBFZzDqZHkdw/ZfSumqsC0f52xEJF/Dpw 2IJApY5wKyY/Jq3iORYLEApTRpYKLsgQgRdJlhhBqEo3S/Wg2j7NiwdwM q4kgQvyBQLmkFSwz6YHwCpB2Nm9npC8Lmo6ki+yNlvkyUXzic5gcBTqFQ PAbUlF66+FLPGCbTSFYQJ61hAYkpjBUaoVpnmI8JWIOq0R2QUgds9rwWG hZ5g7EWw0MmpWGDJDg1yzxQdcXCJeKA82GYaNiySdHend4XDMV7wsqyIk AxuI/HSRLcMbmp0g5dAo1gFmIXQfuBciNj+qsD67GDhSijPvtzjwaWcqz g==; X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="374440797" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="374440797" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 08:13:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="851552172" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="851552172" Received: from shsensorbuild2.sh.intel.com ([10.239.134.197]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2023 08:13:53 -0700 From: Wentong Wu To: sakari.ailus@linux.intel.com, linux-media@vger.kernel.org Cc: zhifeng.wang@intel.com, Wentong Wu Subject: [PATCH v3 3/3] media: ivsc: ace: probe ace device after IPU bridge is initialized. Date: Thu, 24 Aug 2023 23:13:37 +0800 Message-Id: <1692890017-15858-3-git-send-email-wentong.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1692890017-15858-1-git-send-email-wentong.wu@intel.com> References: <1692890017-15858-1-git-send-email-wentong.wu@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org During probe ivsc ace device, acpi_dev_clear_dependencies() will be called to clear the consumer and supplier relationship between camera sensor device and ivsc device. But IPU bridge will setup the connection swnodes for ivsc device and camera sensor device based on this consumer and supplier relationship. This patch defers ivsc ace's probe to make sure IPU bridge is initialized before this consumer and supplier relationship between camera sensor device and IVSC device is cleared. Signed-off-by: Wentong Wu --- v3: - make commit message more clear drivers/media/pci/intel/ivsc/mei_ace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c b/drivers/media/pci/intel/ivsc/mei_ace.c index 7879f1f..627ec40 100644 --- a/drivers/media/pci/intel/ivsc/mei_ace.c +++ b/drivers/media/pci/intel/ivsc/mei_ace.c @@ -406,6 +406,9 @@ static int mei_ace_setup_dev_link(struct mei_ace *ace) if (!csi_dev) { ret = -EPROBE_DEFER; goto err; + } else if (!dev_fwnode(csi_dev)) { + ret = -EPROBE_DEFER; + goto err_put; } /* setup link between mei_ace and mei_csi */