Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7605c0b0 authored by Pali Rohár's avatar Pali Rohár Committed by Anton Vorontsov
Browse files

ARM: OMAP: rx51: Register platform device for rx51_battery



This is needed to make the battery monitor actually work on Nokia N900.

Signed-off-by: default avatarPali Rohár <pali.rohar@gmail.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
parent 76d8a23b
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -255,6 +255,11 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
	},
	},
};
};


static struct platform_device rx51_battery_device = {
	.name	= "rx51-battery",
	.id	= -1,
};

static void rx51_charger_set_power(bool on)
static void rx51_charger_set_power(bool on)
{
{
	gpio_set_value(RX51_USB_TRANSCEIVER_RST_GPIO, on);
	gpio_set_value(RX51_USB_TRANSCEIVER_RST_GPIO, on);
@@ -276,6 +281,7 @@ static void __init rx51_charger_init(void)
	WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO,
	WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO,
		GPIOF_OUT_INIT_HIGH, "isp1704_reset"));
		GPIOF_OUT_INIT_HIGH, "isp1704_reset"));


	platform_device_register(&rx51_battery_device);
	platform_device_register(&rx51_charger_device);
	platform_device_register(&rx51_charger_device);
}
}