Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp423417lqd; Wed, 24 Apr 2024 06:39:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWc5oYvWqrajHdmkWEXOpukIdA2sP3Q8VRNoUSl5xxj7RBQydG/+nF31/VmbeZr5w52AlCQVRay+r23wA2jEU54q7fNtlVREmncEKbcUg== X-Google-Smtp-Source: AGHT+IHMabpS51rmJIZJV9WxEnALagSta9G9WT/DJWa/HZdkDmPtwYQvbLNJddn9bMPzXfq5oWkA X-Received: by 2002:a50:f68a:0:b0:56f:e568:16a5 with SMTP id d10-20020a50f68a000000b0056fe56816a5mr2582598edn.14.1713965974464; Wed, 24 Apr 2024 06:39:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713965974; cv=pass; d=google.com; s=arc-20160816; b=uZOS1HOMMPMvaCAdZ61X6oBxewlTNJ0kHTlL3LaB8GmXfpWOaWTezKWB3pAaut8PZ0 b2eV3b06Z0doPachIJuCDhYvpOsSdIdUkrqnouo0sXwgxVzxGJobRaqkzIvy3WYFSRzY Zb9VxFpu+ubAvsRPd+0b4JvarX9b0F/oNoCc8w/rIjPzhGOcyznFHoW53aTuoFtgks6P 1GyrQ41zqLWDbMityYia3Au59EiNWGvrDjlzT1vsiRT6yVu2sN6z+CWhH42tfCeJHQjo /iPUSkOiLCjeUI+KHzz2Vxia+kuKLjC2/HxlxJkSqMlYTJW0+BzrJkbiPbFajowgLaMw 59sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=v5uts0F+G005dBPvbk0jOnlqwhvA4TASHvWq3ETeWdw=; fh=+4zBhY9orFxkN3WdYsPZSqCbzvPXUa0HrG12+It0c10=; b=p5pc26wEUodt4pmxri7y6yzjXq3a8z++QZ3eGPYln7EcWakVNRVuFjJZA2Vqoj+k7S pyXfPwmJBNkGQeNLZUKoV7u6jwVAUxu23To00XzWxxjJM0zEzdxmzRHlQztDsBp8L6lr 6zsxNLEq8QBypSrWKmFAG2qK/0QmaCr9xLAyZTuxj0b38KZrD7y+2EU63f3Y3VATqgs8 4MAxHRohnthqZZAxazz+eL6TVXb28Hp40UXimf9EkIT/E6bxSDf7n3wig3D1Cu3pzd0C 37mZl2E+3TQG+jMcB9uuyXpjBnr0cU0lpkwd+O3fPL65G9G6GlEayEI4N9+PntPOWpBK 9I7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oY+3fx0g; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-156986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r9-20020aa7d589000000b005723084d953si854314edq.236.2024.04.24.06.39.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 06:39:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oY+3fx0g; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-156986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3494E1F2104F for ; Wed, 24 Apr 2024 13:39:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 075A515FA90; Wed, 24 Apr 2024 13:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oY+3fx0g" Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0DCE15CD7F for ; Wed, 24 Apr 2024 13:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713965693; cv=none; b=uNYqNFLq5ruonOsTzj1gOKVy7/BlV/dBpDzISTH2iAuLcUWb0EoeS9J5YIKYV+OkaxZA7r9NlCksxUDdaf2p4fcak34CKucXEiZZ9lomRVtWS1sBTPq1Yc4+uOMPVk9crVwwcigeybT9vFtw+qHINxZidEJ0d3CgcmRH0BHlfE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713965693; c=relaxed/simple; bh=v5uts0F+G005dBPvbk0jOnlqwhvA4TASHvWq3ETeWdw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tCeilAZFufcHddGcnRdw9wTiJEiq3yYRxDAhA3ov76btNU3S2mOV5+2Wej6qoyn7LLDRjVTNRmqTFNDLA/Btwg5spXDYAi/kLhOWw017cUCzs8oNIbm1OFGbiv6veM9b8aJJ84GOSjjMQhndoom24cVaSlhptKPrQkhLBFyTjHQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oY+3fx0g; arc=none smtp.client-ip=209.85.219.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f182.google.com with SMTP id 3f1490d57ef6-de55708c616so1723456276.1 for ; Wed, 24 Apr 2024 06:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713965691; x=1714570491; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=v5uts0F+G005dBPvbk0jOnlqwhvA4TASHvWq3ETeWdw=; b=oY+3fx0gQCP4JdIzfu5YUlLxKHqmaBqlM9oZmXqM5rMYPv8WRwObnn/i/Acl2Lq9PY qewv8MG2IXzRg/2YB59vw824iXr3W0KwztRRhxzubXLzsWu44yFyvIDTEiRqhjP3U/IH yb3KWNb26saDPdkdn9YLVigbqTNO7ezBc2Gns+fc0iG8+UXcKW88vys5zWNVcshCaPAf MhS/Yvn3wnNY+hSsA4kvwd683IV+P3PxDT+SEr9BqiAyMuA1579t5Ng5wsfBsHDETuem +NhXucaYEu8wECoq47CFc8kPjVZOEcl5evjYRXJUFRTWgXZ7q+aE+lTiPU1vlzliy5LN o8Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713965691; x=1714570491; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v5uts0F+G005dBPvbk0jOnlqwhvA4TASHvWq3ETeWdw=; b=EC+EEpIxtAa7hbHd0IrZCYSUBl5H7X3GCFpRHq2U5QgESwFZ1eAmiXbannovIu0+Cl 8p5rMw3SCQ78/2An9uTfGiQo46iGYJWhQk3keeVSzkaqiZlepr1gmPdCs0w72BUb7Au3 FTLLKDBFfoogebORKqERj6WGCKEgsJvTGBo3GHx20/WBbOuTs3v+m+i+evntPL04fIIb cHSljElWbCtJ/KEiO6B4s7/VKao/yDX9JJNExfiKulZVjE80r/qLGstWO/RrCikq8AJv 5nFmQPa32ZT+eK8q/s35/V+nJ3ncwjjlYDZFsTDzpAB+lBdDzoEpEtiSCnH5J6gNGvo1 xMWw== X-Forwarded-Encrypted: i=1; AJvYcCX/Z5/XcNxI8CtDMitxsWRvx7YlseVkypVuKCxSvckMRV+zsVljC6MlfblBZwMVp3DwCMfP55qg3uPHnWtnapph6bUXCPe3Ni2AAu+3 X-Gm-Message-State: AOJu0Yxeo2OILlDmlK9viuIzd/N8uiLY6Wfcpupqezys8beBEG6NwUd4 V5fuuO3MP05uVYGPGmNcAW/Fw9zDEKrGP1ng0pz96a1Q79L5ezsKZQdnAXDrjwGQrQK3Y8St0uq WQJ+Lncapt6FSKkSE4Xk4I0FUCps6t0AJmOvEVA== X-Received: by 2002:a25:a1a7:0:b0:de5:53a6:24ed with SMTP id a36-20020a25a1a7000000b00de553a624edmr2514259ybi.50.1713965690752; Wed, 24 Apr 2024 06:34:50 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240422164658.217037-1-sui.jingfeng@linux.dev> In-Reply-To: From: Dmitry Baryshkov Date: Wed, 24 Apr 2024 16:34:39 +0300 Message-ID: Subject: Re: [PATCH v2] software node: Implement device_get_match_data fwnode callback To: Andy Shevchenko 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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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) look= s > > 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_dat= a > > 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, se= e > the SPI and I=C2=B2C cases as the examples. I was thinking that we might be able to deprecate these helpers and always use device_get_match_data(). --=20 With best wishes Dmitry