Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2407561yba; Thu, 25 Apr 2019 16:13:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/JF7Q+TjDjzbb39WNBEr1bpAzJvv/NAiSIFBJM6+YR8lRMTrMvt9ANirr1feLuGmZCFDa X-Received: by 2002:a62:e501:: with SMTP id n1mr11526650pff.17.1556234033865; Thu, 25 Apr 2019 16:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556234033; cv=none; d=google.com; s=arc-20160816; b=Ep+f6BZ6vnZPo1kuWpQx1xDzMS+0O3TAXJcAYourjpWHZRzceun6/faCKToxY6elOL zj5bhXsCmhlM5SEneGmeSJ7y1c5MXBtAqxkSSTWkaHbffMZvi895l8zrtjU8kGn1kZqx Yifii/UQn1JZdHO1wOIB5dUlmGaKbatx5RNDsM/HiAF+ImNMLHRvMUVQtsqDU+FqfH02 o8SQie8iE41yrtAce3DiWI2LgQG1lbW6WnqzETlDEi1KpzBBjgcZXl2VkE3vjlG5DcIS 9jTerEHXkaDGlarpgIcCf64HPALuUZRdMI8ltwehS6E9Ig5Ghmsop/Gio+EOaGmNNu+L JFTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Eprjm84BhC2I/2qng2niEABfLtXC+cdm7ceZPlT0YsA=; b=q1bxJO9GRIUty3APLKf5t1612zDlXU6C9fZqX5+NKF4jTG6QaG+0eozkbz7CCpow5W JQAfD4MrENOtq5s8C4YmqpQ+20QtcHgX3OzbQ51rZ2dr+9gVOS8g/oHQ6YQzZOClgt/5 uI4yYym91iC5l/VIFl6wCu0lD0MkasL6aIoFHmHnf+sOdV744v7ueFmgO6W148fJTWNU tATkqNFf244mJMQIjW2JCF4U0cshKtmtw8QAvHkICon+gzqeKfK8VqV6gSNwUbdIH0uH 408bkoFKS82OjxcPbfqLl/uj2JP0j8pgQCCw40UGNQ8FB1LcQKy6356KQ8JZkFXI74GO YFnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OgW08xEE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si13459201pgy.134.2019.04.25.16.13.38; Thu, 25 Apr 2019 16:13:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OgW08xEE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387510AbfDYXDM (ORCPT + 99 others); Thu, 25 Apr 2019 19:03:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:40642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727208AbfDYXDM (ORCPT ); Thu, 25 Apr 2019 19:03:12 -0400 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4FACF20895; Thu, 25 Apr 2019 23:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556233391; bh=Eprjm84BhC2I/2qng2niEABfLtXC+cdm7ceZPlT0YsA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OgW08xEEXa6hDXPgLBqA/k/oaZZ5omsPp7Tv8nsfMUCEBCBp6C4/cWZ4r8RDRiSX9 FA8z48MwaGzYoRWNg0odThNhM9W4RGBuyuPVoVNxhe318pvhq61zqf2yGqm9iqJvbX HrN4UnUc28V70nyTJmJMglUv3BebrQV0npRlSYCU= Received: by mail-qt1-f172.google.com with SMTP id j6so2145248qtq.1; Thu, 25 Apr 2019 16:03:10 -0700 (PDT) X-Gm-Message-State: APjAAAUgtVrjMCP5GBiC5yb6yrOEERUtlBbHsuVkl0aQbNkvQj5a7TMP HsddeVOJ1+ANCLmiJOeL130qsvpdmqSFiLtfFw== X-Received: by 2002:aed:37a1:: with SMTP id j30mr1670849qtb.144.1556233390145; Thu, 25 Apr 2019 16:03:10 -0700 (PDT) MIME-Version: 1.0 References: <20190424101913.1534-1-benjamin.gaignard@st.com> In-Reply-To: From: Rob Herring Date: Thu, 25 Apr 2019 18:02:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/5] Add of_ functions for device_link_add() To: Dmitry Torokhov Cc: Benjamin Gaignard , "Wysocki, Rafael J" , Mark Rutland , Bastien Nocera , Frank Rowand , Marco Felsch , =?UTF-8?Q?Guido_G=C3=BCnther?= , Yannick Fertre , Arnd Bergmann , Linux Input , DTML , "linux-kernel@vger.kernel.org" , linux-stm32@st-md-mailman.stormreply.com, Mark Brown Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 25, 2019 at 2:24 PM Dmitry Torokhov wrote: > > On Thu, Apr 25, 2019 at 11:08 AM Rob Herring wrote: > > > > On Wed, Apr 24, 2019 at 5:19 AM Benjamin Gaignard > > wrote: > > > > > > It could happen that we need to control suspend/resume ordering between > > > devices without obvious consumer/supplier link. For example when touchscreens > > > and DSI panels share the same reset line, in this case we need to be sure > > > of pm_runtime operations ordering between those two devices to correctly > > > perform reset. > > > DSI panel and touchscreen aren't sharing any heriachical relationship (unlike > > > I2C client and I2C bus or regulator client and regulator provider) so we need > > > to describe this in device-tree. > > > > Needing to know which touchscreen is attached to a panel could be > > important to describe if you have multiple displays. > > > > Doesn't the reset subsystem already have some support for shared > > resets? Seems like it could provide clients with struct device or > > device_node ptrs to other devices sharing a reset. > > > > > > > > This series introduce of_device_links_{add,remove} and devm_of_device_links_add() > > > helpers to find and parse 'links-add' property in a device-tree node. > > > > Going to document that property somewhere? :) > > > > I think this is too generic and coupled to Linux. It doesn't have any > > information as to what is the dependency or connection nor what the > > direction of the dependency is. > > > > I'm not convinced we need to solve this generically vs. defining > > something for this specific example. > > I am pretty sure there will be more drivers needing complex > dependencies. Doesn't ACPI allow defining relationship between devices > that goes beyond the tree structure? Can't speak to ACPI, but I assume you where implying ACPI supports this so DT should too. Almost every binding we have is defining relationships between devices. Interrupts, clocks, gpio, pinctrl, etc. all do this. To use a similar example to the one here, we already define the relationship between a display and a backlight with a 'backlight' property in the display node. Why should touchscreen be any different than backlight? What really concerns me here is folks just add relationships to 'links-add' which are already captured in DT (such as backlight) just because they'll get it for free and not have to go add support to handle each specific binding. Rob