Commit graph

8 commits

Author SHA1 Message Date
Kishon Vijay Abraham I
79e6f2625d phy: core: Let node ptr of PHY point to PHY and not of PHY provider
In case of multi-phy PHY providers, each PHY should be modeled as a sub
node of the PHY provider. Then each PHY will have a different node pointer
(node pointer of sub node) than that of PHY provider. Added this provision
in the PHY core.Also fixed all drivers to use the updated API.

Change-Id: I1c6ad35456cb1b06561c95e2de79559c0e49babb
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
[ygardi@codeaurora.org: merging with qcom-specific changes, and removing
non existing files]
Git-commit: f0ed817638b59aa927f1f7e9564dd8796b18dc4f
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/kishon/linux-phy.git/
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2014-09-18 14:55:47 +03:00
Yaniv Gardi
3036b13553 Revert "phy: extend APIs of the generic phy framework"
This reverts commit 21bd073ffc.
This patch reverts unnecessary and unused APIs from the generic PHY
framework.

Change-Id: I60022b07bc20a0be0543634c610751c032ea23fd
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2014-08-07 10:33:01 +03:00
Yaniv Gardi
21bd073ffc phy: extend APIs of the generic phy framework
This change adds a few more APIs to the phy_ops structure:
advertise_quirks - API for setting the phy quirks
suspend - API for the implementation of phy suspend sequence
resume - API for the implementation of phy resume sequence

Change-Id: I44dd77f2603d20acb02ccb0cc0d20ade884f97c2
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2014-07-28 16:49:56 -07:00
Andrew Lunn
61847b6fde drivers: phy: Add support for optional phys
Add devm_phy_optional_get and phy_optional_get, which should be used
when the phy is optional. They does not return an error when the phy
does not exist, rather they returns NULL, which is considered as a valid
phy, but results in NOPs when used with the consumer API.

Change-Id: I70fff892e2a7531a23f935793b503efdedc8034a
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Git-commit: 788a4d56ff378bff0b8e685d03a962b36903a149
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2014-07-29 02:29:11 +03:00
Andrew Lunn
59fd9372c5 drivers: phy: Make NULL a valid phy reference
The common clock framework considers NULL a valid clock
reference. This makes handling optional clocks simple, in that if the
optional clock is not available, a NULL reference can be used in the
place of a real clock, simplifying the clock consumer.

Extend this concept to the phy consumer API. A NULL can be passed to
the release calls, the phy_init() and phy_exit() calls, and
phy_power_on() and phy_power_off() and a NOP is performed.

Change-Id: Ib1f2147abc25abec05a23a3976609f487a1ed162
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Git-commit: 04c2facad8fee66c981a51852806d8923336f362
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2014-07-29 02:26:41 +03:00
Yaniv Gardi
11235d6b69 Revert "phy: extend APIs of the generic phy framework"
This reverts commit 63566d8d49.

This change reverts changes in the generic PHY framework.
Many changes were uploaded into the generic PHY framework in the
upstream code.
In order to avoid conflicts, we need to revert this patch, then
cherry-pick the changes of generic PHY framework from the
upstream.

Change-Id: Idbbe331255f8199f0869bcb76d7ad00767fb83e1
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2014-07-28 22:36:31 +03:00
Yaniv Gardi
63566d8d49 phy: extend APIs of the generic phy framework
This change adds a few more APIs to the phy_ops structure:
advertise_quirks - an API for setting the phy quirks
suspend - an API for the implementation of
          phy suspend sequence
resume - an API for implementation of phy resume sequence

Change-Id: Idc76e7aef7fa1029f4d9d8baedae869346992da8
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2014-07-08 03:08:31 -07:00
Kishon Vijay Abraham I
06111d5283 drivers: phy: add generic PHY framework
The PHY framework provides a set of APIs for the PHY drivers to
create/destroy a PHY and APIs for the PHY users to obtain a reference to the
PHY with or without using phandle. For dt-boot, the PHY drivers should
also register *PHY provider* with the framework.

PHY drivers should create the PHY by passing id and ops like init, exit,
power_on and power_off. This framework is also pm runtime enabled.

The documentation for the generic PHY framework is added in
Documentation/phy.txt and the documentation for dt binding can be found at
Documentation/devicetree/bindings/phy/phy-bindings.txt

Change-Id: I02be3faa7082e3c93c14ca3ac57059569c905eed
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: ff764963479a1b18721ab96e531404c50fefe8b1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-12-10 08:17:57 +05:30