From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: gpmc-smsc911x: add required smsc911x regulators
Date: Mon, 13 Feb 2012 16:52:09 +0000 [thread overview]
Message-ID: <20120213165209.GA31482@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1329151422-2146-1-git-send-email-mporter@ti.com>
On Mon, Feb 13, 2012 at 11:43:42AM -0500, Matt Porter wrote:
> This fixes smsc911x support on platforms using gpmc_smsc911x_init().
> Commit c7e963f6888816f04d1f5da0e07bec4e0092f227 added the requirement
> that platforms provide vdd33a and vddvario supplies.
Thanks. Only one comment on this.
> +static struct platform_device gpmc_smsc911x_regulator = {
> + .name = "reg-fixed-voltage",
> + .id = 0,
$ grep -A1 reg-fixed-voltage arch/arm/*omap* -r
arch/arm/mach-omap2/board-omap3evm.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-omap3evm.c- .id = 1,
--
arch/arm/mach-omap2/board-zoom-peripherals.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-zoom-peripherals.c- .id = 1,
--
arch/arm/mach-omap2/board-overo.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-overo.c- .id = 1,
--
arch/arm/mach-omap2/board-omap4panda.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-omap4panda.c- .id = 1,
--
arch/arm/mach-omap2/board-rm680.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-rm680.c- .dev = {
--
arch/arm/mach-omap2/board-igep0020.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-igep0020.c- .id = 0,
--
arch/arm/mach-omap2/board-4430sdp.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-4430sdp.c- .id = -1,
--
arch/arm/mach-omap2/board-4430sdp.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-4430sdp.c- .id = 1,
--
arch/arm/mach-omap2/board-omap3pandora.c: .name = "reg-fixed-voltage",
arch/arm/mach-omap2/board-omap3pandora.c- .id = 1,
igep0020.c does this:
static struct omap_smsc911x_platform_data smsc911x_cfg = {
.cs = IGEP2_SMSC911X_CS,
.gpio_irq = IGEP2_SMSC911X_GPIO,
.gpio_reset = -EINVAL,
.flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
};
static inline void __init igep2_init_smsc911x(void)
{
gpmc_smsc911x_init(&smsc911x_cfg);
}
so it seems to use the gpmc_smsc stuff as well. So we're ending up with
two "reg-fixed-voltage" devices both with ID 0. That's not going to work,
and the driver model/sysfs will give you a nice warning there about that.
I think OMAP (or even the reg-fixed-voltage folk) needs to create an enum
similar to what I did for 8250 to control the allocation of platform
device IDs for this, otherwise we're going to keep on running over this
problem.
/*
* Allocate 8250 platform device IDs. Nothing is implied by
* the numbering here, except for the legacy entry being -1.
*/
enum {
PLAT8250_DEV_LEGACY = -1,
PLAT8250_DEV_PLATFORM,
PLAT8250_DEV_PLATFORM1,
PLAT8250_DEV_PLATFORM2,
PLAT8250_DEV_FOURPORT,
PLAT8250_DEV_ACCENT,
PLAT8250_DEV_BOCA,
PLAT8250_DEV_EXAR_ST16C554,
PLAT8250_DEV_HUB6,
PLAT8250_DEV_MCA,
PLAT8250_DEV_AU1X00,
PLAT8250_DEV_SM501,
};
Added Mark for his comment.
next prev parent reply other threads:[~2012-02-13 16:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 16:43 [PATCH] ARM: OMAP2+: gpmc-smsc911x: add required smsc911x regulators Matt Porter
2012-02-13 16:52 ` Russell King - ARM Linux [this message]
2012-02-13 16:56 ` Mark Brown
2012-02-13 17:52 ` Tony Lindgren
2012-02-13 18:02 ` Russell King - ARM Linux
2012-02-13 18:14 ` Tony Lindgren
2012-02-13 18:58 ` Mark Brown
2012-02-21 18:46 ` Tony Lindgren
2012-02-21 21:11 ` Matt Porter
2012-02-13 18:17 ` Matt Porter
2012-02-14 11:08 ` Russell King - ARM Linux
2012-02-22 16:29 ` Matt Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120213165209.GA31482@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).