Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp329420lqd; Wed, 24 Apr 2024 03:52:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTas/+iyCrFleUkgEQEDWP4OpPcw1R4FzmtVga5IC8cQ/GyVEbbUERIbl0hggMxsun5V3rmK2Hi3DwMo4HTQB5M0zHVCUAAHRW+hgnMQ== X-Google-Smtp-Source: AGHT+IFVlKid24w5+UhoO6MaOoRnZ5iIEcY4SyyEZFdwNq0hML2udZyio2HUXC9f9EZ83IufYJ2S X-Received: by 2002:a05:620a:22f9:b0:790:5e9c:dec7 with SMTP id p25-20020a05620a22f900b007905e9cdec7mr2026222qki.37.1713955928996; Wed, 24 Apr 2024 03:52:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713955928; cv=pass; d=google.com; s=arc-20160816; b=yAa6HbLP4hbPAeh56cFQalWU8s91l8EtIVKLzaf8BD+aLLlPnPLjutkAikgOkuCUqk WNA/Kzc8NI/PpaIO+dc+wVWh5uGp6FHCCjurdQlukNaZb2RSAep/6jsWRQ8rBFgWP7g+ wQXBtlhKRxcu0zsrTUIyMVg0Yg/gh6jPNsqUPfAoK24N/Crt2SyKhE9Ktvyvtw4aOtlM dMzH+C3R4s66ySdB775AB55+ALQhLGM1KTKA5glXLyTDimtbs2PBRkJu1AAY//LmeaZX Td/7PjLWiaOpxZ6jgSvb4NU/ezDtSHj+7k7suGdnhXcO7agbv4ySHkIXYrOglV3tiDxh 26hg== 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=efh86KadtveKwdflYcTs9rm1RrY2uLyDFDzyIYk7Rgk=; fh=eNDX9qT4eRNS4+IXHMfSBk4dckNbnctMQ2yAgJG44Mk=; b=B9iMg29pteBmfFtGtIy4u4q5SNpDQscMIemEUEmJL+us1rMtmvvp5xPinixzVkLSvZ onbX+JsDEcFEKR7gXn2OHmJf9NLvtafW/+xBiFE8plHWbSja4rQ7HnvAoRIqwUyWp4wL r/MaEVRlWYdAO0pqJRYak8O/lrLhH6Ht6IdVYTgPf523wQyX5IKPIujaRBRWaK72Oinn +c/zT6lHrfU+snxC+Xbzi2bjeJppcAf4fl8hYwOsyy6gp6mwIFzZCZrvzJjIh+Tw8gbm r1A+VvmzPG4P/F2d0JU/NqSLCQAqiYmrhdc3ttQQT6x+v8+eojxDbIFUjNhtj9b0V3p5 pXAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=nYtZzdaV; 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-156752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156752-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j9-20020a37c249000000b0078f18339fe4si12547277qkm.564.2024.04.24.03.52.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 03:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=nYtZzdaV; 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-156752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156752-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id ABBB61C21D90 for ; Wed, 24 Apr 2024 10:52:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5B921598F1; Wed, 24 Apr 2024 10:52:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="nYtZzdaV" Received: from out-175.mta1.migadu.com (out-175.mta1.migadu.com [95.215.58.175]) (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 E1BC154F8D for ; Wed, 24 Apr 2024 10:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713955922; cv=none; b=MTd6Ahvtd8gas8OBe/kTBySmv9Dk9t7RdP0iCbTcxVPA70doHG38SARaOL/IF367yHjjxMsPZqaZy6PXet2dfZyfPgRdmvbCiq5doVPv04IO8RWFBIrnQ5Z+LD7bNFVU2nVcnyJbz8OLQk0hsqDsrWZw/5Tu51paOUJZHPIhC/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713955922; c=relaxed/simple; bh=oEJnS67rUdPQroVoyX+dqXeH9nIPzaqkkQvNgVBBJdQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rAbwMlz+iIKa1R15hxzvI24ockMqf1AN8hyk4xwsC8Bea7VjjT930xnIU1PHmH3LIQZsGOFkU1EtH+trV65yzs/QI8sm14XHE2WcpF3zDw1xPbE9kFDtG/jAJ1q51Jfrl1kbJo8zfFlg5SHZOEW8kpSfzFjDlVE8v9lx0X71/y8= 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=nYtZzdaV; arc=none smtp.client-ip=95.215.58.175 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: <365445ed-8f1d-4c05-90a4-e7867e67977a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713955917; 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=efh86KadtveKwdflYcTs9rm1RrY2uLyDFDzyIYk7Rgk=; b=nYtZzdaVHzAhegl6uBw6q0FR1RFmSoDrwoOcZbLWmXVt+xBTJowI/LGPcJMV/a9QNxdrXo /UKDDpvUaBEL2+FWVnEpYxpRBAsSGUoxMIB2LipsuOyzUlMb/prcCQ0nBUfpHW7ueRKLFD RxQIfj76x1ta8OBiRBFTZD941IbWZro= Date: Wed, 24 Apr 2024 18:51:47 +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 Cc: Andy Shevchenko , 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> <22979e28-ed48-467f-a5cf-82be57bcc2f7@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: 7bit X-Migadu-Flow: FLOW_OUT Hi, On 2024/4/24 16:39, Dmitry Baryshkov wrote: > Ok, what is the_bug_ that is being fixed by this patch? I didn't have a way to use that driver under non DT environment, this is the bug. Note: I demanding full features. Both st7735r.c and repaper.c requires additional device property. - For st7735r.c: device_property_read_u32(dev, "rotation", &rotation); - For repaper.c: device_property_read_string(dev, "pervasive,thermal-zone", &thermal_zone) Under non DT environment, those device properties can not be read. Software node backend provided a way. Otherwise, the net results of the patch doesn't meet the description in the commit message. > If you check > the 'submitting-patches.rst', you'll find this phrase as a description > of the Fixes: tag. I have readthe 'submitting-patches.rst', the first sentence tell us that "A Fixes: tag indicates that the patch fixes an issue in a previous commit." So what's the problem? >>>> Hence, before my patch is applied, the two "Make driver OF-independent" patch >>>> have no effect. Using device_get_match_data() itself is exactly*same* with >>>> using of_device_get_match_data() as long as the .device_get_match_data hook is >>>> not implemented. > As far as I can see, repaper correctly handles the case by falling > back to the spi_id. So does st7735r.c. Yeah, this explicitly is the issue. Falling back to other means is robust design, but it explicitly says that the freshly addeddevice_get_match_data() don't works at all under non DT environment. This is the bug, so what's you concern? According to the commit message, the purpose of the introduction of thedevice_get_match_data() is to achieve OF independent. But as you said, it will fall back, then how does the goal "Make driver OF-independent" can be achieved by the patch itself? -- Best regards, Sui