summaryrefslogtreecommitdiff
path: root/drivers/power/reset/linkstation-poweroff.c
AgeCommit message (Collapse)AuthorFilesLines
2021-08-13power: reset: linkstation-poweroff: add new devicePawel Dembicki1-0/+42
This commit introduces support for NETGEAR ReadyNAS Duo v2. This device use bit 4 of LED[2:0] Polarity Control Register to indicate AC Power loss. For more details about AC loss detection in NETGEAR ReadyNAS Duo v2, please look at the file: RND_5.3.13_WW.src/u-boot/board/mv_feroceon/mv_hal/usibootup/usibootup.c from Netgear GPL sources. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-08-13power: reset: linkstation-poweroff: prepare for new devicesPawel Dembicki1-6/+29
This commit prepare driver for another device support. New power_off_cfg structure describes two most important things: name of mdio bus and pointer to register setting function. It allow to add new device with different mdio bus node and other phy register config. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-12-29power: reset: linkstation-poweroff: add missing put_device()Daniel González Cabanelas1-0/+1
The of_mdio_find_bus() takes a reference to the underlying device structure, we should release that reference using a put_device() call. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2020-07-28power: reset: add driver for LinkStation power offDaniel González Cabanelas1-0/+136
Some Buffalo LinkStations perform the power off operation, at restart time, depending on the state of an output pin (LED2/INTn) at the ethernet PHY. This pin is also used to wake the machine when a WoL packet is received by the PHY. The driver is required by the Buffalo LinkStation LS421DE (ARM MVEBU), and other models. Without it, the board remains forever halted if a power off command is executed, unless the PSU is disconnected and connected again. Add the driver to provide the power off function and also make the WoL feature to be available. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>