mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 19:23:57 +08:00
ARM: ux500: Do not attempt to register non-existent i2c devices on Snowball
This patch prevents i2c devices which are not present on the Snowball low-cost development board from being registered. Devices such as; tc3589x, bu1780 and lp5521 are present on other supported boards, but are not located on Snowball. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
3de3d74956
commit
4809f90aad
@ -646,7 +646,6 @@ static void __init mop500_init_machine(void)
|
|||||||
static void __init snowball_init_machine(void)
|
static void __init snowball_init_machine(void)
|
||||||
{
|
{
|
||||||
struct device *parent = NULL;
|
struct device *parent = NULL;
|
||||||
int i2c0_devs;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
parent = u8500_init_devices();
|
parent = u8500_init_devices();
|
||||||
@ -664,11 +663,6 @@ static void __init snowball_init_machine(void)
|
|||||||
mop500_spi_init(parent);
|
mop500_spi_init(parent);
|
||||||
mop500_uart_init(parent);
|
mop500_uart_init(parent);
|
||||||
|
|
||||||
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
|
|
||||||
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
|
|
||||||
i2c_register_board_info(2, mop500_i2c2_devices,
|
|
||||||
ARRAY_SIZE(mop500_i2c2_devices));
|
|
||||||
|
|
||||||
/* This board has full regulator constraints */
|
/* This board has full regulator constraints */
|
||||||
regulator_has_full_constraints();
|
regulator_has_full_constraints();
|
||||||
}
|
}
|
||||||
@ -767,7 +761,6 @@ static void __init u8500_init_machine(void)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
parent = u8500_init_devices();
|
parent = u8500_init_devices();
|
||||||
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
|
for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
|
||||||
mop500_platform_devs[i]->dev.parent = parent;
|
mop500_platform_devs[i]->dev.parent = parent;
|
||||||
@ -785,6 +778,12 @@ static void __init u8500_init_machine(void)
|
|||||||
ARRAY_SIZE(mop500_platform_devs));
|
ARRAY_SIZE(mop500_platform_devs));
|
||||||
|
|
||||||
mop500_sdi_init(parent);
|
mop500_sdi_init(parent);
|
||||||
|
|
||||||
|
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
|
||||||
|
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
|
||||||
|
i2c_register_board_info(2, mop500_i2c2_devices,
|
||||||
|
ARRAY_SIZE(mop500_i2c2_devices));
|
||||||
|
|
||||||
} else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
|
} else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
|
||||||
snowball_pins_init();
|
snowball_pins_init();
|
||||||
platform_add_devices(snowball_platform_devs,
|
platform_add_devices(snowball_platform_devs,
|
||||||
@ -798,19 +797,21 @@ static void __init u8500_init_machine(void)
|
|||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
|
mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
|
||||||
i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
|
|
||||||
hrefv60_pins_init();
|
hrefv60_pins_init();
|
||||||
platform_add_devices(mop500_platform_devs,
|
platform_add_devices(mop500_platform_devs,
|
||||||
ARRAY_SIZE(mop500_platform_devs));
|
ARRAY_SIZE(mop500_platform_devs));
|
||||||
|
|
||||||
hrefv60_sdi_init(parent);
|
hrefv60_sdi_init(parent);
|
||||||
|
|
||||||
|
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
|
||||||
|
i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
|
||||||
|
|
||||||
|
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
|
||||||
|
i2c_register_board_info(2, mop500_i2c2_devices,
|
||||||
|
ARRAY_SIZE(mop500_i2c2_devices));
|
||||||
}
|
}
|
||||||
mop500_i2c_init(parent);
|
mop500_i2c_init(parent);
|
||||||
|
|
||||||
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
|
|
||||||
i2c_register_board_info(2, mop500_i2c2_devices,
|
|
||||||
ARRAY_SIZE(mop500_i2c2_devices));
|
|
||||||
|
|
||||||
/* This board has full regulator constraints */
|
/* This board has full regulator constraints */
|
||||||
regulator_has_full_constraints();
|
regulator_has_full_constraints();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user