linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Pratyush Anand <pratyush.anand@st.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Mohit Kumar <mohit.kumar@st.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: Query: Phy: How to find consumer device on dt platform
Date: Tue, 28 Jan 2014 19:58:33 +0530	[thread overview]
Message-ID: <52E7BE91.8030209@ti.com> (raw)
In-Reply-To: <20140128141356.GC3519@pratyush-vbox>

Hi,

On Tuesday 28 January 2014 07:43 PM, Pratyush Anand wrote:
> Hi Kishon,
> 
> I have a phy driver which has to be used by two different consumer
> driver, say pcie and sata.

I assume you have multiple instances of the same IP and you have a single
driver for it?
> 
> I have a common set of registers, which need to be programmed
> differently for PCIe and SATA during phy init/exit.

One way is differentiate using different compatible strings fro pcie and sata
and use of_device_is_compatible to select a particular path.
> 
> Therefore, in the init/exit routine of phy_ops, I need some way of
> identifying that phy_init/exit has been called from PCIe driver or
> SATA driver.

In this case you'll be actually registering two different PHYs (each for pcie
and sata), so your phy_get should give you the only the appropriate phy.

Cheers
Kishon

  reply	other threads:[~2014-01-28 14:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 14:13 Query: Phy: How to find consumer device on dt platform Pratyush Anand
2014-01-28 14:28 ` Kishon Vijay Abraham I [this message]
2014-01-28 21:26   ` Arnd Bergmann
2014-01-29  5:41     ` Kishon Vijay Abraham I
2014-01-29  9:50       ` Pratyush Anand
2014-01-29 14:24         ` Arnd Bergmann
2014-01-29 14:17           ` Pratyush Anand
2014-01-29 13:39       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E7BE91.8030209@ti.com \
    --to=kishon@ti.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mohit.kumar@st.com \
    --cc=pratyush.anand@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).