]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
net: macb: Add support for phy reset using gpio
authorPunnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>
Thu, 8 Mar 2018 12:50:42 +0000 (18:20 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 16 Mar 2018 09:25:52 +0000 (10:25 +0100)
commit6ac0523278a99648b8d0bb31026889f7c27e91af
tree6bd3faca4eb749c2e58ba9cd39d0fe4f846f019e
parentaa9d494bed3ef2e28aca4fa457b3cb7ca0e0caff
net: macb: Add support for phy reset using gpio

Added phy reset functionality using the gpio. This patch assumes that the phy
reset involves an active high/low pulse for certain duration. So, it expects
device tree parameters for reset pulse duration and reset active low or active
high state.

The flags, when requesting gpio for phy reset, should have direction
reflected in bit 0 (as out) and active low/high reflected in bit 1.
Currently these flags are wrong in the driver. Correct this to use
the GPIOF_OUT_INIT_* definitions already available.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/ethernet/cadence/macb_main.c