lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Jan 2014 19:58:33 +0530
From:	Kishon Vijay Abraham I <kishon@...com>
To:	Pratyush Anand <pratyush.anand@...com>
CC:	Arnd Bergmann <arnd@...db.de>, Mohit Kumar <mohit.kumar@...com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: Query: Phy: How to find consumer device on dt platform

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ