]> www.infradead.org Git - users/willy/linux.git/commit
phy: Add configuration interface
authorMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 7 Dec 2018 13:55:29 +0000 (14:55 +0100)
committerKishon Vijay Abraham I <kishon@ti.com>
Sat, 8 Dec 2018 04:05:00 +0000 (09:35 +0530)
commit5cf14cc2423f2f1296cf7acc2a1a9d57ca0ac0e6
treebc6bee709b95f0f46a5591776a13bae5dadf2100
parentf8cf01139b531fff5b8b1f724fc927bc70d72019
phy: Add configuration interface

The phy framework is only allowing to configure the power state of the PHY
using the init and power_on hooks, and their power_off and exit
counterparts.

While it works for most, simple, PHYs supported so far, some more advanced
PHYs need some configuration depending on runtime parameters. These PHYs
have been supported by a number of means already, often by using ad-hoc
drivers in their consumer drivers.

That doesn't work too well however, when a consumer device needs to deal
with multiple PHYs, or when multiple consumers need to deal with the same
PHY (a DSI driver and a CSI driver for example).

So we'll add a new interface, through two funtions, phy_validate and
phy_configure. The first one will allow to check that a current
configuration, for a given mode, is applicable. It will also allow the PHY
driver to tune the settings given as parameters as it sees fit.

phy_configure will actually apply that configuration in the phy itself.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-core.c
include/linux/phy/phy.h