Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp627719lqd; Wed, 24 Apr 2024 11:54:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjdXZkc8BKaEOKZkJpu0rROkPgrVOw9lUbScyv7YGXErsrsdW28ewge2To3EPqAXL2POm7EixDpG3py0tOrErI6Z6yGSZ93dc/mn6HKQ== X-Google-Smtp-Source: AGHT+IGY5qP+hjphmdFQKh2GKTayQGBa7nl1Y9sYD0D76c9iyldcmH2WFgEFylML/icPzo0JHvss X-Received: by 2002:a17:90b:792:b0:2a5:506f:161c with SMTP id l18-20020a17090b079200b002a5506f161cmr813909pjz.4.1713984843109; Wed, 24 Apr 2024 11:54:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713984843; cv=pass; d=google.com; s=arc-20160816; b=cRR5WdWLC8QvsBpMMt5qoPcok1PxuAZWIBS6UIUu04k5UVqYGvCNSw4HjZa420bGR7 xSYN6KwY5H5p+sD/NELl9f1fYWDOYbQgy6HfJMzKSk0cZhVv7TrTZrT5L4rI3tE7G1JH UYB1CtgcVhm6g6bnRYeO8slRWH2KalfTyIpl8DvQUhJ1O9xZcsCQ5kUk53I2KVCjYK6b dNyjrjMkX9juf/pvDIlCo8Dtsk9CMt80CR47Bxp/OPsM03EWpxLCVKDmyl56Qci1tFRt 684TGYsX+jF9UZMMKNX/t7gl/UrO1z1i7Fmi1ZyFHsV8FzqoV7+TIOv/aUnE+6GrwOcc /V+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=66hZfsJzzaPzAu4YPowed7j50esceCBieSOQ5CkBk6Q=; fh=yDTlTPsMW6Ou+x9Omx+GwMuTsvnRGoa6NBuKOyPAFkY=; b=SPW5CJmU90gho3/8qABW8uxITcxPPQAK69izS4h1OFrR5kIle82D0vj+G8A3TPWF9t E/pQcFOsIs+qoscA3aaOYXZ+Zibl5364sDVcOfBLNZoZHzQ0bvwgj6wyYGzn6KUR4gin DR+Lc5G4QWqZTuTYjR6x5RRbLzfS9WozSoaPzokEWXZOViWZ5MmXLeI/f8rjhrCN8sVc 28B9GqOP34OkY0uMbO9oZfA2oBY0/kjocFHOFKTCe9CnHW4j3LITW3QDBDS/qUfZGiw6 8y/26BQp/LoTKqb7/nc99JsMz02qhImjBdbGhMFrJzfv259sO7E+QZiNOAL9/7E417fB 0Asw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LXGY0R4O; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-157523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ep2-20020a17090ae64200b002adca8b1e67si5875558pjb.31.2024.04.24.11.54.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:54:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157523-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=pass header.i=@linux.dev header.s=key1 header.b=LXGY0R4O; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-157523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 5473AB2FA14 for ; Wed, 24 Apr 2024 18:30:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4784516F27E; Wed, 24 Apr 2024 18:20:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LXGY0R4O" Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 088F116E868 for ; Wed, 24 Apr 2024 18:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982811; cv=none; b=Yhxx5P+NbW/s4aCU9zl8j9M4m6ZRomZDE0FK4RMgqRyORzKVr3h2S+Qmf45KGeyuTKPZbWrIR2AwllqIHQ5EhguMyng/IjxMQ/YPeQTDrW17JIT7AhJBixKzcrYI6CBJZ5Wrk8wNFvCf4k479Z3qBnA8rokUf5Pg7zeGirdfbtA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982811; c=relaxed/simple; bh=bBAIBJsQ5GJsThi5boUOdskG5XZSazMGzcC7D+GxWPg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=W2vsiSaOd/sOT1GEqtZhQ7V3txxK7fN72grAQ53G1EMuYlPxsIhNMtucjCWd57L3eoreQhNQPQ4c6/xA2Oijsk1AbrlRPyzDWVkfetwip73Bc0jE2nPhtZDSaWwzsq6GCi6lOUSlercb/8SkY+/dQOuOsoFNBxYBJTDCFDmlatk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=LXGY0R4O; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <66b0f579-1406-4f9f-97b5-7d21171610b8@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713982806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=66hZfsJzzaPzAu4YPowed7j50esceCBieSOQ5CkBk6Q=; b=LXGY0R4OQw1TJoHsEsVMLetaStGhGUWYVv5m/va0F+pVOenUX8l/CcNm4Bce5yQN+DOCug 3FqeoS4iEkPELgv18RihZYGg1BZPIRb3dR9JxR2JAnNsKon8Bsag2m2nMifPnD2To0kKCh rYDAOpcsmS/aq0QX263XJgetenboGhc= Date: Thu, 25 Apr 2024 02:19:51 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2] software node: Implement device_get_match_data fwnode callback To: Dmitry Baryshkov , Andy Shevchenko Cc: 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" References: <20240422164658.217037-1-sui.jingfeng@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Hi, On 2024/4/25 00:34, Dmitry Baryshkov wrote: > On Wed, Apr 24, 2024 at 05:52:03PM +0300, Andy Shevchenko wrote: >> On Wed, Apr 24, 2024 at 04:34:39PM +0300, Dmitry Baryshkov wrote: >>> On Wed, 24 Apr 2024 at 16:11, Andy Shevchenko >>> wrote: >>>> 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. >>> I was thinking that we might be able to deprecate these helpers and >>> always use device_get_match_data(). >> True, but that is orthogonal to swnode match_data support, right? >> There even was (still is?) a patch series to do something like a new >> member to struct device_driver (? don't remember) to achieve that. > Maybe the scenario was not properly described in the commit message, No thecommit message is very clear, just you don't clear. Can't you see that only you are out of scope here and complaining with wrong hypothesis? > or > maybe I missed something. No, you miss and mess everything. > The usecase that I understood from the commit > message was to use instatiated i2c / spi devices, which means > i2c_device_id / spi_device_id. It can also be platform device with manually assigned software node. > The commit message should describe why > the usecase requires using 'compatible' property and swnode. Ideally it > should describe how these devices are instantiated at the first place. > Yes, I admit it, its not the first time you do such a thing. I know you might good at debating and directing blindly. But those skills are not really helpful. As it brings ZERO benefits to the developers and end user of Linux kernel. What the end user need is a good DRM driver and infrastructure like i915, amdgpu, radeon, vc4, ast, X server or wayland etc. Its fine to keep quite if you don't understand something very well, especially, the for the things that not directly maintained by you. As you don't have to responsible for it and you don't need to pay for the obligation. You might deceive yourself to believe that you are reviewing, actually, you are just wasting your time as well as other people's time. If the the commit message is really matters to you, then do you thing about the following series [1][2][3] ? [1] https://patchwork.freedesktop.org/series/123812/ [2] https://patchwork.freedesktop.org/patch/579730/?series=130021&rev=2 [3] https://patchwork.freedesktop.org/series/123737/ How about the witting of its commit message, very well, right? Think before you type, and type with the brain not with the emotion. -- Best regards, Sui