* 4xx ocp proc_fs & pm
@ 2002-02-01 10:59 Armin
2002-02-02 8:47 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Armin @ 2002-02-01 10:59 UTC (permalink / raw)
To: ppc_devel
I would like to add the ability of the ocp devices to provide a way to
supply device information to users and to expand the power management of
these devices through the proc file system.
I have modeled the proc file system after the pci proc and pci pm
implimentations. Each driver would register a driver struct via a
ocp_register.
struct ocp_driver {
struct list_head global_list;
char name[16];
u16 num;
enum ocp_type type; /* OCP device type */
u16 irq;
u32 base_addr;
void *driver_data; /* data private to the driver */
#if defined(CONFIG_PM)
u32 current_state; /* Current operating state /*
int (*save_state) ( u32 state); /* Save Device Context */
int (*suspend)( u32 state); /* Device suspended */
int (*resume) (u32 state); /* Device woken up */
int (*enable_wake) (u32 state, int enable); /* Enable wake event */
#endif
#if defined(CONFIG_PROC_FS)
struct proc_dir_entry *procdir; /* dir entry in /proc/bus */
struct proc_dir_entry *procent; /* device entry in /proc/bus/ocp */
#endif
};
With the type field, I can customize how data is read & written to the
proc entries. So for the ethernet driver I can provide additional values
for the nubmer of buffers so it can be tweek w/o recompiling. Also the
type field could allow me to incorperate the other device registration
calls so there would only be one registration call in the module_init().
There will be a an entry under /proc/bus/ocp with an entry
for each ocp device and an acsii version containing all devices in
/bus/ocp/devices.
With a proc_fs , I can expand the power management support for the ocp
devices.
I do have a basic proc working.
I would like some feedback.
regards,
armin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: 4xx ocp proc_fs & pm
2002-02-01 10:59 4xx ocp proc_fs & pm Armin
@ 2002-02-02 8:47 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2002-02-02 8:47 UTC (permalink / raw)
To: Armin; +Cc: ppc_devel
On Fri, 1 Feb 2002, Armin wrote:
> I would like to add the ability of the ocp devices to provide a way to
> supply device information to users and to expand the power management of
> these devices through the proc file system.
>
> I have modeled the proc file system after the pci proc and pci pm
> implimentations. Each driver would register a driver struct via a
> ocp_register.
>
> struct ocp_driver {
Have you read the documents about Patrick Mochel's new driver framework yet? It
is being merged into 2.5.x.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-02 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-01 10:59 4xx ocp proc_fs & pm Armin
2002-02-02 8:47 ` Geert Uytterhoeven
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).