Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp413826imm; Fri, 21 Sep 2018 02:19:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZtnqpxkxghyA7KC0rut8o+Xwk0vCzPW5hu7/6nwBXLKcAc63aZAJMpIBZTKj+WlOU6aZ/k X-Received: by 2002:a65:4289:: with SMTP id j9-v6mr40822176pgp.284.1537521542308; Fri, 21 Sep 2018 02:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537521542; cv=none; d=google.com; s=arc-20160816; b=uhr6CEQhyPI1rupCTDK3GAGlYU4LlEpzW0jBMV4WHH7ATv29ISvl8BAOUd24ykoNfT +1pY7El4cPhKT0HL2al9CrwGB7QzrGhngY1ZMod+bn5cpOCklM3VJFxCSCusAte58NDb fDN7WuHyQyzHZCfJGvF/xX1nEIJdtqJ4TUq37Mdy2EQr7cU8awlQP6iM67prUgQKmg+Q LrL77LjBT8E4iMm7teNNk7MT47d8fZ+BNWPPAfJ6fAK4B862RV5ZpqBHxjWhzNRyT3XB njAi5VnR5LY/uSAOpezJPnJo4LQH4jDw/tBlwtMKNA2PpaXiBlPK6WvxpefDi8aD/okT CU9A== 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; bh=m0QsiBSI1xvPBtHEt9ynVPGCTkf10IYFx1kl8i0mLk0=; b=pmsgCCZhwoeE2Fa1QW06TY75LYytPGtuhTFZlyMcAqO+D70bOdlOdT3Dfw06KDy6YV 2ByaU6tR7HFoZbm7NFs/b5cV+QtCf+pEloc6XRjFEPgc5CDs1YsqF7s9HmS1reBFhvOZ 5gf5yHMuIh2q2mTyb6KPJuF3I7X82PuQUVLDIw1E3Dwv6Ozg3PwyuzHQP0FMYLmFG/HR S1ZKJaauF2N3d4H37ALTLo1hlQ4rzmozsPnAdD8U1XjQwOg3VhgUgCVqMP84rSWfVhvk WBIsm8ygBzfGHFR/MjI4aU9jRAgSUl44GO3k9FNRLZvZmWMJ28ChMUxlOQNO7o1cSLFu JhCA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 24-v6si27952728pft.235.2018.09.21.02.18.45; Fri, 21 Sep 2018 02:19:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389215AbeIUPFN (ORCPT + 99 others); Fri, 21 Sep 2018 11:05:13 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:46857 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725898AbeIUPFN (ORCPT ); Fri, 21 Sep 2018 11:05:13 -0400 Received: by mail-ot1-f67.google.com with SMTP id v44-v6so12297637ote.13 for ; Fri, 21 Sep 2018 02:17:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m0QsiBSI1xvPBtHEt9ynVPGCTkf10IYFx1kl8i0mLk0=; b=C7q5XTSP1MrOaS9so5/CiTUC2ga7pocGB3+5DfkfVz+RZy0sgISC2piCeNMi5IC5B4 Cjit6+mnefsxMZFSBz5R0zeHy4CI9AA/2e0XtuVE3wUIoH5pxR5SfwZEaBdcciWwcPA/ f/uChDJEoHMrscHte+LsFN1G+Qzy6goGwp9OT9e3tMMq2pzgZ9eNLqQtQfpyGFwkZ0cl dsgdERZmbLOBziVu/+A8zNp4a2LBebaLvNPL+obIOyK7B80rT8ewaT11ax8eLdQN/hIh h6yI9Ok6gGDMM3Uhv7Ry9qrVKnsK+o9/f2pTf3e0dcLMs1iqwtLDvrmSx42Ks+dTx4jJ 9zjw== X-Gm-Message-State: APzg51DosxhgoyMk+MQxSDFWof7g7ZYkvtETKgkHz8fskvlWIOM+I2XA ikFO0GlDHqtZX69HGnGjtIh+Pnps4kTNpT+loGK3bg29 X-Received: by 2002:a9d:42ee:: with SMTP id c43-v6mr23261137otj.54.1537521436670; Fri, 21 Sep 2018 02:17:16 -0700 (PDT) MIME-Version: 1.0 References: <1537422122-6166-1-git-send-email-svellattu@mvista.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 21 Sep 2018 11:17:05 +0200 Message-ID: Subject: Re: [PATCH] Driver core: add bus_find_device_by_of_node To: svellattu@mvista.com Cc: "Rafael J. Wysocki" , Greg Kroah-Hartman , Linux Kernel Mailing List 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 Fri, Sep 21, 2018 at 5:45 AM Silesh C V wrote: > > Hello Rafael, > > On Thu, Sep 20, 2018 at 1:06 PM Rafael J. Wysocki wrote: > > > > On Thu, Sep 20, 2018 at 7:43 AM Silesh C V wrote: > > > > > > Similar to bus_find_device_by_name, but finds the device having a > > > specific of_node. > > > > First, what do you need it for? Please describe your use case in the changelog. > > This will be useful for drivers that do not register a platform_driver > (but retrieve the "simple-bus" device_node using > of_find_compatible_node etc.) but are still interested in the struct > device. > > > > > Second, what about a more generic bus_find_device_by_fwnode() ? > > If you think that the above requirement warrants the inclusion of > bus_find_device_by_of_node, I can try implementing this in v2. I'm not really sure what you mean, but if there is bus_find_device_by_fwnode(), it will be useful not just for DT code, but generally, and getting an of_node from fwnode is trivial. Thanks, Rafael