ARM: ux500: move top level platform devices in sysfs to /sys/devices/socX
At the request of Arnd Bergmann this patch moves all SoC platform devices found in sysfs from /sys/devices/platform to /sys/devices/soc<SoCNum>/. It is believed as the devices are SoC specific and a /sys/devices/soc node has recently become available, that this would be a more appropriate place to display the data. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
eda413c228
commit
b024a0c804
@ -610,6 +610,7 @@ static void __init mop500_init_machine(void)
|
|||||||
{
|
{
|
||||||
struct device *parent = NULL;
|
struct device *parent = NULL;
|
||||||
int i2c0_devs;
|
int i2c0_devs;
|
||||||
|
int i;
|
||||||
|
|
||||||
mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
|
mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
|
||||||
|
|
||||||
@ -617,6 +618,9 @@ static void __init mop500_init_machine(void)
|
|||||||
|
|
||||||
mop500_pins_init();
|
mop500_pins_init();
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
|
||||||
|
mop500_platform_devs[i]->dev.parent = parent;
|
||||||
|
|
||||||
platform_add_devices(mop500_platform_devs,
|
platform_add_devices(mop500_platform_devs,
|
||||||
ARRAY_SIZE(mop500_platform_devs));
|
ARRAY_SIZE(mop500_platform_devs));
|
||||||
|
|
||||||
@ -639,11 +643,15 @@ static void __init snowball_init_machine(void)
|
|||||||
{
|
{
|
||||||
struct device *parent = NULL;
|
struct device *parent = NULL;
|
||||||
int i2c0_devs;
|
int i2c0_devs;
|
||||||
|
int i;
|
||||||
|
|
||||||
parent = u8500_init_devices();
|
parent = u8500_init_devices();
|
||||||
|
|
||||||
snowball_pins_init();
|
snowball_pins_init();
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
|
||||||
|
snowball_platform_devs[i]->dev.parent = parent;
|
||||||
|
|
||||||
platform_add_devices(snowball_platform_devs,
|
platform_add_devices(snowball_platform_devs,
|
||||||
ARRAY_SIZE(snowball_platform_devs));
|
ARRAY_SIZE(snowball_platform_devs));
|
||||||
|
|
||||||
@ -665,6 +673,7 @@ static void __init hrefv60_init_machine(void)
|
|||||||
{
|
{
|
||||||
struct device *parent = NULL;
|
struct device *parent = NULL;
|
||||||
int i2c0_devs;
|
int i2c0_devs;
|
||||||
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The HREFv60 board removed a GPIO expander and routed
|
* The HREFv60 board removed a GPIO expander and routed
|
||||||
@ -677,6 +686,9 @@ static void __init hrefv60_init_machine(void)
|
|||||||
|
|
||||||
hrefv60_pins_init();
|
hrefv60_pins_init();
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
|
||||||
|
mop500_platform_devs[i]->dev.parent = parent;
|
||||||
|
|
||||||
platform_add_devices(mop500_platform_devs,
|
platform_add_devices(mop500_platform_devs,
|
||||||
ARRAY_SIZE(mop500_platform_devs));
|
ARRAY_SIZE(mop500_platform_devs));
|
||||||
|
|
||||||
|
@ -136,6 +136,7 @@ static void __init u5500_uart_init(struct device *parent)
|
|||||||
static void __init u5500_init_machine(void)
|
static void __init u5500_init_machine(void)
|
||||||
{
|
{
|
||||||
struct device *parent = NULL;
|
struct device *parent = NULL;
|
||||||
|
int i;
|
||||||
|
|
||||||
parent = u5500_init_devices();
|
parent = u5500_init_devices();
|
||||||
nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins));
|
nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins));
|
||||||
@ -144,6 +145,9 @@ static void __init u5500_init_machine(void)
|
|||||||
u5500_sdi_init(parent);
|
u5500_sdi_init(parent);
|
||||||
u5500_uart_init(parent);
|
u5500_uart_init(parent);
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(u5500_platform_devices); i++)
|
||||||
|
u5500_platform_devices[i]->dev.parent = parent;
|
||||||
|
|
||||||
platform_add_devices(u5500_platform_devices,
|
platform_add_devices(u5500_platform_devices,
|
||||||
ARRAY_SIZE(u5500_platform_devices));
|
ARRAY_SIZE(u5500_platform_devices));
|
||||||
}
|
}
|
||||||
|
@ -227,6 +227,7 @@ static struct device * __init db5500_soc_device_init(void)
|
|||||||
struct device * __init u5500_init_devices(void)
|
struct device * __init u5500_init_devices(void)
|
||||||
{
|
{
|
||||||
struct device *parent;
|
struct device *parent;
|
||||||
|
int i;
|
||||||
|
|
||||||
parent = db5500_soc_device_init();
|
parent = db5500_soc_device_init();
|
||||||
|
|
||||||
@ -236,6 +237,9 @@ struct device * __init u5500_init_devices(void)
|
|||||||
db5500_add_rtc(parent);
|
db5500_add_rtc(parent);
|
||||||
db5500_add_usb(parent, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg);
|
db5500_add_usb(parent, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg);
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(db5500_platform_devs); i++)
|
||||||
|
db5500_platform_devs[i]->dev.parent = parent;
|
||||||
|
|
||||||
platform_add_devices(db5500_platform_devs,
|
platform_add_devices(db5500_platform_devs,
|
||||||
ARRAY_SIZE(db5500_platform_devs));
|
ARRAY_SIZE(db5500_platform_devs));
|
||||||
|
|
||||||
|
@ -188,6 +188,7 @@ static struct device * __init db8500_soc_device_init(void)
|
|||||||
struct device * __init u8500_init_devices(void)
|
struct device * __init u8500_init_devices(void)
|
||||||
{
|
{
|
||||||
struct device *parent;
|
struct device *parent;
|
||||||
|
int i;
|
||||||
|
|
||||||
parent = db8500_soc_device_init();
|
parent = db8500_soc_device_init();
|
||||||
|
|
||||||
@ -195,7 +196,12 @@ struct device * __init u8500_init_devices(void)
|
|||||||
db8500_add_gpios(parent);
|
db8500_add_gpios(parent);
|
||||||
db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
|
db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
|
||||||
|
|
||||||
platform_device_register_simple("cpufreq-u8500", -1, NULL, 0);
|
platform_device_register_data(parent,
|
||||||
|
"cpufreq-u8500", -1, NULL, 0);
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
|
||||||
|
platform_devs[i]->dev.parent = parent;
|
||||||
|
|
||||||
platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
|
platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
|
@ -47,6 +47,8 @@ dbx500_add_amba_device(struct device *parent, const char *name,
|
|||||||
|
|
||||||
dev->dev.platform_data = pdata;
|
dev->dev.platform_data = pdata;
|
||||||
|
|
||||||
|
dev->dev.parent = parent;
|
||||||
|
|
||||||
ret = amba_device_register(dev, &iomem_resource);
|
ret = amba_device_register(dev, &iomem_resource);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
@ -126,9 +128,14 @@ dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq,
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return platform_device_register_resndata(NULL, "gpio", id,
|
return platform_device_register_resndata(
|
||||||
resources, ARRAY_SIZE(resources),
|
parent,
|
||||||
pdata, sizeof(*pdata));
|
"gpio",
|
||||||
|
id,
|
||||||
|
resources,
|
||||||
|
ARRAY_SIZE(resources),
|
||||||
|
pdata,
|
||||||
|
sizeof(*pdata));
|
||||||
}
|
}
|
||||||
|
|
||||||
void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
|
void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/usb/musb.h>
|
#include <linux/usb/musb.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
|
|
||||||
#include <plat/ste_dma40.h>
|
#include <plat/ste_dma40.h>
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/usb.h>
|
#include <mach/usb.h>
|
||||||
@ -151,5 +152,7 @@ void ux500_add_usb(struct device *parent, resource_size_t base, int irq,
|
|||||||
ux500_usb_dma_update_rx_ch_config(dma_rx_cfg);
|
ux500_usb_dma_update_rx_ch_config(dma_rx_cfg);
|
||||||
ux500_usb_dma_update_tx_ch_config(dma_tx_cfg);
|
ux500_usb_dma_update_tx_ch_config(dma_tx_cfg);
|
||||||
|
|
||||||
|
ux500_musb_device.dev.parent = parent;
|
||||||
|
|
||||||
platform_device_register(&ux500_musb_device);
|
platform_device_register(&ux500_musb_device);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user