Re: [PATCH v3] ARM: OMAP2+: gpmc-smsc911x: add required smsc911x regulators

From: Kevin Hilman
Date: Thu Mar 01 2012 - 15:37:01 EST


Matt Porter <mporter@xxxxxx> writes:

> This fixes smsc911x support on platforms using gpmc_smsc911x_init().
>
> Commit c7e963f6888816 (net/smsc911x: Add regulator support) added
> the requirement that platforms provide vdd33a and vddvario supplies.
>
> Signed-off-by: Matt Porter <mporter@xxxxxx>

[...]

> /*
> * Initialize smsc911x device connected to the GPMC. Note that we
> * assume that pin multiplexing is done in the board-*.c file,
> @@ -55,6 +101,12 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
>
> gpmc_cfg = board_data;
>
> + ret = platform_device_register(&gpmc_smsc911x_regulator);
> + if (ret < 0) {
> + pr_err("Unable to register smsc911x regulators: %d\n", ret);
> + return;
> + }
> +

Boards that have more than one instance of the smsc911x (OMAP3/Overo)
barf here because of trying to register the same device twice.

We need something like the patch below to make Overo boot again.

Kevin