From mboxrd@z Thu Jan 1 00:00:00 1970 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 33CCAC636D4 for ; Fri, 17 Feb 2023 11:06:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229652AbjBQLGe (ORCPT ); Fri, 17 Feb 2023 06:06:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbjBQLGM (ORCPT ); Fri, 17 Feb 2023 06:06:12 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC1F642D5; Fri, 17 Feb 2023 03:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676631947; x=1708167947; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=t6C9/3TTTKLWhwakiGoEV3uiiR8P4MX6Z1YTItlHCww=; b=m+MMHy90tTKE5Afzxo4kT3W+BWLuBfDQnCOCEbBWfRQFh/7AMBPDTj3Q hbawdXPk50Rm+bhsBZQxjWldOhKQu+YZzvluNhDzsAJG94DDIJSKPVH58 BxZaJHw6Ty9y4CrA4S+3j/eIJAXtlYdPQbb4scObX71L8Wwg1UQ2CYNm7 cRpd6uJ0B4YsRe/9+ad1y281uBHPMr4iOu6/p3hSfcUlIBSla2pwuSKaq K8XAxj8zjKmxV1jCmzJPMFhxe9XgE6R/RiIVdMR368Dvf+NPRNQWQcxVn /jvjxY7Ls9vs7CT2XN+caE3bpAPoBhYrsdj7vNb3Wxe+uLYARB8dSNiOr w==; X-IronPort-AV: E=McAfee;i="6500,9779,10623"; a="320069406" X-IronPort-AV: E=Sophos;i="5.97,304,1669104000"; d="scan'208";a="320069406" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2023 03:05:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10623"; a="663842858" X-IronPort-AV: E=Sophos;i="5.97,304,1669104000"; d="scan'208";a="663842858" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga007.jf.intel.com with ESMTP; 17 Feb 2023 03:05:43 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pSyYf-008An2-2Y; Fri, 17 Feb 2023 13:05:41 +0200 Date: Fri, 17 Feb 2023 13:05:41 +0200 From: Andy Shevchenko To: "Limonciello, Mario" Cc: Jarkko Nikula , Jan =?utf-8?B?RMSFYnJvxZs=?= , Grzegorz Bernacki , Thomas Rijo-john , Lendacky Thomas , herbert@gondor.apana.org.au, Mika Westerberg , linux-i2c@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] i2c: designware: Use PCI PSP driver for communication Message-ID: References: <20230209223811.4993-7-mario.limonciello@amd.com> <703033aa-1293-307d-42a2-9734a51c7190@linux.intel.com> <9523a6ce-0220-e939-392d-2b48b2a4dc48@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 17, 2023 at 01:05:03PM +0200, Andy Shevchenko wrote: > On Thu, Feb 16, 2023 at 03:27:35PM -0600, Limonciello, Mario wrote: > > On 2/16/2023 15:16, Andy Shevchenko wrote: > > > On Thu, Feb 16, 2023 at 03:01:35PM -0600, Limonciello, Mario wrote: > > > > On 2/16/2023 14:59, Andy Shevchenko wrote: > > > > > On Thu, Feb 16, 2023 at 02:55:07PM -0600, Limonciello, Mario wrote: > > > > > > On 2/16/2023 08:56, Andy Shevchenko wrote: > > > > > > > On Thu, Feb 16, 2023 at 07:29:53AM -0600, Mario Limonciello wrote: > > > > > > > > On 2/16/23 07:27, Jarkko Nikula wrote: > > > > > > > > > On 2/10/23 00:38, Mario Limonciello wrote: ... > > > > > > > > > Would this look better if split? I.e. > > > > > > > > > > > > > > > > > >     depends on CRYPTO_DEV_SP_PSP > > > > > > > > >     depends on !(I2C_DESIGNWARE_PLATFORM=y && CRYPTO_DEV_CCP_DD=m) > > > > > > > > Yes, thanks I'll change that for next version. > > > > > > > > > > > > > > I'm wondering if this is homegrown implementation of 'imply' keyword? > > > > > > > > > > > > Like this? > > > > > > > > > > > > config I2C_DESIGNWARE_AMDPSP > > > > > > depends on CRYPTO_DEV_SP_PSP > > > > > > depends on CRYPTO_DEV_CCP_DD > > > > > > > > > > > > config CRYPTO_DEV_CCP_DD > > > > > > imply I2C_DESIGNWARE_PLATFORM > > > > > > > > > > Looks okay, but I'm not familiar with this code. The documentation about > > > > > 'imply' can be found here: > > > > > > > > > > https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-attributes > > > > > > > > Yeah I found that, but this was my first time using imply, so I was hoping > > > > someone who has used it could validate I interpreted it correctly. > > > > > > > > Following the example CRYPTO_DEV_CCP_DD would be FOO and > > > > I2C_DESIGNWARE_PLATFORM would be BAZ so I thought so. > > > > > > 'imply' == weak 'select', it means that the target option may or may not be > > > selected. I.o.w. "optional" dependency. > > > > > > Does CRYPTO_DEV_CCP_DD use I2C DesignWare code? > > > > > > If I understand correctly the "depends on !(I2C_DESIGNWARE_PLATFORM=y && > > > CRYPTO_DEV_CCP_DD=m)" you want to have IS_REACHABLE() in your code and actually > > > "imply CRYPTO_DEV_CCP_DD" in the I2C_DESIGNWARE_AMDPSP. > > > > Allowing that combination and using IS_REACHABLE means that it's going to > > actually load earlier that expected, so I suppose it needs to be something > > like this then in the probe code for i2c-designware-amdpsp.c: > > > > if (!IS_REACHABLE() > > return -EPROBE_DEFER; > > > > Right? > > Hmm... I'm not sure. IS_REACHABLE() should be done with a compilation s/with/without/ > dependencies. What you put here is functional dependency, moreover since > you mentioned the boot / load ordering doesn't it mean that the architecture > of all of this is not good enough and requires some redesign? > > Perhaps you need to use component framework actually? -- With Best Regards, Andy Shevchenko