From patchwork Thu Aug 24 03:21:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Wentong" X-Patchwork-Id: 717108 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 2C4C9C3DA6F for ; Thu, 24 Aug 2023 03:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237296AbjHXDV2 (ORCPT ); Wed, 23 Aug 2023 23:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239587AbjHXDVI (ORCPT ); Wed, 23 Aug 2023 23:21:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C961910EC for ; Wed, 23 Aug 2023 20:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692847266; x=1724383266; h=from:to:cc:subject:date:message-id; bh=lMdg0UFrcxtBbXgkKWYS2p3dnsoQT3JYyoMzgshnWjQ=; b=CKJ5IVoKWbqJ+MewRAn2xqp2qOM8OQ3UXz751pisJwPEHeiBgdcYbFqE B9Xu88jRs2n+5IJSSLCepL0mOrWGE46+uzXx2GlmcaTjCwHvjEiMr086T 3ihk5Y0KQbvOtzZb55OKe7iK08jAXc2WTHw73mt+/OliNTZ3JhR0sXFRG +XZac6jZKB+rUuiW5Lcc1n/MrkN2ftmn1uL194vBWRuLMhZOUkbpFyJak I9s6cw560CcfWR/L0InVUYRnsAN7LOl2hvoKCpeL3Hz/iukH5ypxrIpcC 0zaCDg1axXuLwqV94UE4otWr4Gie/GnkdfMhSZtMCwrZem6y5j9mwkv// Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10811"; a="354665512" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="354665512" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2023 20:21:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10811"; a="826972864" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="826972864" Received: from shsensorbuild2.sh.intel.com ([10.239.134.197]) by FMSMGA003.fm.intel.com with ESMTP; 23 Aug 2023 20:21:04 -0700 From: Wentong Wu To: sakari.ailus@linux.intel.com, linux-media@vger.kernel.org Cc: Wentong Wu Subject: [PATCH v2 1/3] media: ivsc: csi: remove name identifier Date: Thu, 24 Aug 2023 11:21:00 +0800 Message-Id: <1692847262-31790-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 --- v2: - no change compared with v1 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 03:21:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Wentong" X-Patchwork-Id: 717107 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 53387C71145 for ; Thu, 24 Aug 2023 03:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239591AbjHXDV3 (ORCPT ); Wed, 23 Aug 2023 23:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239588AbjHXDVK (ORCPT ); Wed, 23 Aug 2023 23:21:10 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B756E10EC for ; Wed, 23 Aug 2023 20:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692847268; x=1724383268; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=0K1zaID0Cy2m1KDJ8X+yDFu8N3Ps/srMRZkPAOJw6WI=; b=U2aVljAlOeDONmHTo5xjv/OVjjbyeuQZPsvT9DKHDMx2jNWzmG/L0LUk KJ/9mp9neprZMS/qUCm+oRPbL4s0fJpAI5tiJ90danXmChjfgR/oiNYRM kUwZ+ugYJlBAWbRd/fjgktwwBTKz9cuv2yidjKkG7CXGNEEwfgpJ+1igI eRiN/Zf6qXFetTQdGlnsafXDj0CIBDwPfpX6qAknkAqPg8YVK3PYEa4XK coGqLs8OEkIOL2hiN926QskrrNE9+NsvWybmapk042V+BRzrMu0/Q8rfB Xm/9lDNAlF41IgZXvDjlvbJL/iyGgpzxa42230VMqgl8XRbcFBi1zXhnH g==; X-IronPort-AV: E=McAfee;i="6600,9927,10811"; a="354665516" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="354665516" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2023 20:21:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10811"; a="826972879" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="826972879" Received: from shsensorbuild2.sh.intel.com ([10.239.134.197]) by FMSMGA003.fm.intel.com with ESMTP; 23 Aug 2023 20:21:07 -0700 From: Wentong Wu To: sakari.ailus@linux.intel.com, linux-media@vger.kernel.org Cc: Wentong Wu Subject: [PATCH v2 2/3] media: ivsc: ace: remove name identifier Date: Thu, 24 Aug 2023 11:21:01 +0800 Message-Id: <1692847262-31790-2-git-send-email-wentong.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1692847262-31790-1-git-send-email-wentong.wu@intel.com> References: <1692847262-31790-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 --- v2: - no changed compared with v1 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 03:21:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Wentong" X-Patchwork-Id: 716752 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 435F2C27C40 for ; Thu, 24 Aug 2023 03:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239593AbjHXDVa (ORCPT ); Wed, 23 Aug 2023 23:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239592AbjHXDVN (ORCPT ); Wed, 23 Aug 2023 23:21:13 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5DDE10EC for ; Wed, 23 Aug 2023 20:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692847271; x=1724383271; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=DmqBpe08Pgv7cIdaf0JBksUgQV+tGrt7pMtVz+ETBfQ=; b=Fj3vTjKqIK8gL9roMCSIo6mCS0z4lNoeOESwedD76S5jMdKZ/jyJ1R+C 9vFaa4fFNcyqYIbr/fB9HIgFnThR5q9CPBy11SrJEkfbmZLhPXv+W/0s3 oIDxkmbvfIdASHym9ah1KEkKWrtbQPL8h78pKYNKJySXmnHeVWZa/NBKT mrUuKrOmcqooid2QOnZBI7FSqiKfseznxKiSCUlUc6PMe3mGrkjP3SjTO htAfmOfRdKA0+7ii7Pubsx4QU0C1hqHS1P5QqmxNSEkNpW47ysK3r3oCv lm/MsUhyTuzZns6HXmHXXI6U81LaRoQ2MYsxCFBH0JSnwvqpj1Ak/ZBlI g==; X-IronPort-AV: E=McAfee;i="6600,9927,10811"; a="354665523" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="354665523" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2023 20:21:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10811"; a="826972904" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="826972904" Received: from shsensorbuild2.sh.intel.com ([10.239.134.197]) by FMSMGA003.fm.intel.com with ESMTP; 23 Aug 2023 20:21:09 -0700 From: Wentong Wu To: sakari.ailus@linux.intel.com, linux-media@vger.kernel.org Cc: Wentong Wu Subject: [PATCH v2 3/3] media: ivsc: ace: probe ace device after init IPU bridge Date: Thu, 24 Aug 2023 11:21:02 +0800 Message-Id: <1692847262-31790-3-git-send-email-wentong.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1692847262-31790-1-git-send-email-wentong.wu@intel.com> References: <1692847262-31790-1-git-send-email-wentong.wu@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Probe ivsc ace device after IPU bridge has been initialized. Signed-off-by: Wentong Wu --- v2: - call put_device() if IPU bridge hasn't been initialized 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 */