Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp418929lqd; Wed, 24 Apr 2024 06:32:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVnlm96GCNus4HA1cE8S4wD+S4TzdkoFEsgiXeMRWM52g1/E3DfAZDzMunj1oHFpO8VGPmqWtmHzW8XcO90Lzideaei+1qdeSZ6TE2xeA== X-Google-Smtp-Source: AGHT+IHj85YouofLiTxTtWNeBSMw9hTWsFufPcZs01GTf+zxOGmS6k4OBL6bj2NE4Qn6NZcGRdEu X-Received: by 2002:a17:90a:aa0d:b0:2a2:235e:3e6c with SMTP id k13-20020a17090aaa0d00b002a2235e3e6cmr2351835pjq.25.1713965558374; Wed, 24 Apr 2024 06:32:38 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bf9-20020a17090b0b0900b002a79ba0f002si11013291pjb.189.2024.04.24.06.32.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 06:32:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=npKtE5vm; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-156933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C0AC7B219AC for ; Wed, 24 Apr 2024 13:11:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4668915B158; Wed, 24 Apr 2024 13:11:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="npKtE5vm" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25F66156C71; Wed, 24 Apr 2024 13:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713964266; cv=none; b=R9ZU7LhsfBB+2tVC5SQsGXjFP/M3H4dV5qig+FUIcbClNaNzKvNKY9RZI5tAPtKHcwio8Ph+AfKH3BoHWqlTKXTaV4e+WtxMMcJwFC/VRcJWKj5jY/O/F+iUmaHir/0+277gZXul91BC0HsSJr0mhJiE1MibC+CImgpKw1A5efg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713964266; c=relaxed/simple; bh=3PcOgPceJEiC6m9cZ1LVSeHjh37/hFNV6mfbgVb5lwI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aeWHNDbdQ15oXBOIMrZOsXyA4uZGXSd+CbGcBFgng7yyDZv4SLP/2NIwYVu6JJ14KLNb8qQQAh2WdIUfluMDxGOcmArSXSpJ4IVFzN7xBita/BAdQEjKRir1VloD95y0ztHY2cpDvhS9ZUEwnejoRDFRhemiJi4YDHzUEIvyx+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=npKtE5vm; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713964265; x=1745500265; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=3PcOgPceJEiC6m9cZ1LVSeHjh37/hFNV6mfbgVb5lwI=; b=npKtE5vmNUftwo2hMDTnVvNDk5u8pzt48bXjvBm+JZRMVd7aJwQ6rpWk cnFbcFdKlrO6UWEsHwA5DHlRk+j1JeRDRc65z2yYvKGib5HH+8ZGS5Kcq 9UjgI4kTb9BSUuLZ4ct1ttGf7Kd/2QwXEg4sAhKRC3ZO65uAjSF904zOe i9lvBDjbI56f2H6MMl/5O46wH9p2QSTAD73OWAi0eOSyRmO6syG32TRJj pfXSSZh+JR+dApnPlAcOQv70PTrPTLlc7UTSpdBknnkvcxMsckQTHJvna R77/57quwCGwvCdk8OjaupFHpkfI0Kut4b3I59zUddEYggO1jJBDVgVF6 Q==; X-CSE-ConnectionGUID: 42BSboLdTM2UMoVdjFc02w== X-CSE-MsgGUID: DS4jJoUtRQWem34+ff+Wlw== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="32084786" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="32084786" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 06:11:05 -0700 X-CSE-ConnectionGUID: hcUH0FqpTTWhma57UPIH3w== X-CSE-MsgGUID: vl74hA0uTqeby/DYkytS3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="55907700" Received: from smile.fi.intel.com ([10.237.72.54]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 06:11:02 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rzcOp-00000000em2-1179; Wed, 24 Apr 2024 16:10:59 +0300 Date: Wed, 24 Apr 2024 16:10:58 +0300 From: Andy Shevchenko To: Dmitry Baryshkov Cc: Sui Jingfeng , dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: Re: [PATCH v2] software node: Implement device_get_match_data fwnode callback Message-ID: References: <20240422164658.217037-1-sui.jingfeng@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 On Wed, Apr 24, 2024 at 12:37:16AM +0300, Dmitry Baryshkov wrote: > On Wed, Apr 24, 2024 at 12:49:18AM +0800, Sui Jingfeng wrote: > > On 2024/4/23 21:28, Andy Shevchenko wrote: > > > On Tue, Apr 23, 2024 at 12:46:58AM +0800, Sui Jingfeng wrote: .. > But let me throw an argument why this patch (or something similar) looks > to be necessary. > > Both on DT and non-DT systems the kernel allows using the non-OF based > matching. For the platform devices there is platform_device_id-based > matching. > > Currently handling the data coming from such device_ids requires using > special bits of code, e.g. platform_get_device_id(pdev)->driver_data to > get the data from the platform_device_id. Having such codepaths goes > against the goal of unifying DT and non-DT paths via generic property / > fwnode code. > > As such, I support Sui's idea of being able to use device_get_match_data > for non-DT, non-ACPI platform devices. I'm not sure I buy this. We have a special helpers based on the bus type to combine device_get_match_data() with the respective ID table crawling, see the SPI and I?C cases as the examples. -- With Best Regards, Andy Shevchenko