drivers: phy: Make NULL a valid phy reference
authorAndrew Lunn <andrew@lunn.ch>
Tue, 4 Feb 2014 17:33:11 +0000 (18:33 +0100)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:47:45 +0000 (11:47 +0900)
commit4930f33430815bb249198c5d6c9af119ee3f5aac
tree720e76c97900afa78f6f3f38fb5d8c3a1b426a3a
parent54343962081e4bc330554f8348eb44e726dd25e6
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.

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>
[backport from upstream commit 04c2facad8fee66c981a51852806d8923336f362]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I387a29962849f50fa8df1ab684babcbbe3227c84
Documentation/phy.txt
drivers/phy/phy-core.c