From: Olaf Hering <olaf@aepfle.de>
To: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 13/14] powerpc: add ps3 platform system bus support
Date: Mon, 30 Apr 2007 17:58:23 +0200 [thread overview]
Message-ID: <20070430155823.GA30344@aepfle.de> (raw)
In-Reply-To: <4636100C.7020006@am.sony.com>
On Mon, Apr 30, Geoff Levand wrote:
> > The generated modalias files do not match anything.
>
> Module support is still todo. I am just now started on it. David
> Woodhouse sent a few patches, but I just merged them in without
> testing.
This is my version, compile tested.
ps3fb calls into ps3av.
ps3av can be a module, but it does not force ps3fb to be a module as
well. Maybe this can be enforced via some Kconfig tweaks.
---
arch/powerpc/platforms/ps3/system-bus.c | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -167,6 +167,30 @@ static int ps3_system_bus_remove(struct
return 0;
}
+static const char *ps3_system_bus_modalias(enum ps3_match_id match_id)
+{
+ const char *p;
+ switch (match_id) {
+ case PS3_MATCH_ID_EHCI:
+ p = "ps3-ehci";
+ break;
+ case PS3_MATCH_ID_OHCI:
+ p = "ps3-ohci";
+ break;
+ case PS3_MATCH_ID_GELIC:
+ p = "gelic_net";
+ break;
+ case PS3_MATCH_ID_AV_SETTINGS:
+ p = "ps3av";
+ break;
+ case PS3_MATCH_ID_SYSTEM_MANAGER:
+ default:
+ p = "unknown";
+ break;
+ }
+ return p;
+}
+
static int ps3_system_bus_uevent(struct device *_dev, char **envp,
int num_envp, char *buffer, int buffer_size)
{
@@ -174,8 +198,8 @@ static int ps3_system_bus_uevent(struct
int i=0, length = 0;
if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
- &length, "MODALIAS=ps3:%d",
- dev->match_id))
+ &length, "MODALIAS=%s",
+ ps3_system_bus_modalias(dev->match_id)))
return -ENOMEM;
envp[i] = NULL;
@@ -186,7 +210,7 @@ static ssize_t modalias_show(struct devi
char *buf)
{
struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
- int len = snprintf(buf, PAGE_SIZE, "ps3:%d\n", dev->match_id);
+ int len = snprintf(buf, PAGE_SIZE, "%s\n", ps3_system_bus_modalias(dev->match_id));
return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
}
next prev parent reply other threads:[~2007-04-30 15:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 4:21 [PATCH 13/14] powerpc: add ps3 platform system bus support Geoff Levand
2007-04-30 10:47 ` Olaf Hering
2007-04-30 15:49 ` Geoff Levand
2007-04-30 15:58 ` Olaf Hering [this message]
2007-05-01 6:44 ` David Woodhouse
2007-05-01 23:39 ` Arnd Bergmann
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=20070430155823.GA30344@aepfle.de \
--to=olaf@aepfle.de \
--cc=geoffrey.levand@am.sony.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).