Skip to content

Use raspberrypi-power to turn on USB power #1700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@
&hdmi {
power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
};

&usb {
power-domains = <&power RPI_POWER_DOMAIN_USB>;
};
22 changes: 0 additions & 22 deletions drivers/firmware/raspberrypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,6 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
}
}

static int raspberrypi_firmware_set_power(struct rpi_firmware *fw,
u32 domain, bool on)
{
struct {
u32 domain;
u32 on;
} packet;
int ret;

packet.domain = domain;
packet.on = on;
ret = rpi_firmware_property(fw, RPI_FIRMWARE_SET_POWER_STATE,
&packet, sizeof(packet));
if (!ret && packet.on != on)
ret = -EINVAL;

return ret;
}

static int rpi_firmware_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
Expand Down Expand Up @@ -232,9 +213,6 @@ static int rpi_firmware_probe(struct platform_device *pdev)

rpi_firmware_print_firmware_revision(fw);

if (raspberrypi_firmware_set_power(fw, 3, true))
dev_err(dev, "failed to turn on USB power\n");

return 0;
}

Expand Down