Subject: Re: MPC52xx: sysfs failure on adding new device driver

From: Sylvain Munaut <[email-masked]>
Date: Fri, 10 Jun 2005 16:09:32 +0200

Hi Grant

> In the mean time, here's another option:  Leave
> arch/ppc/syslib/mpc52xx_devices.c alone, but modify the table in the
> board setup code to assign specific drivers to the PSC devices before
> the table is parsed by the platform bus.  This has the added advantage
> of eliminating the need for mpc52xx_match_psc_function() and it's
> cousins.

> +	/* Assign driver names to PSC devices */
> +	ppc_sys_platform_devices[MPC52xx_PSC1].name = "mpc52xx-psc.uart";
> +	ppc_sys_platform_devices[MPC52xx_PSC2].name = "mpc52xx-psc.uart";
> +	ppc_sys_platform_devices[MPC52xx_PSC3].name = "mpc52xx-psc.spi";

Yes, I kinda like that. That maybe the cleanest way, just 1 line of code 
per device and when no subfn is assigned, nothing is loaded.

I don't really like messing manually with the ppc_sys_platform 
"internals" outside of the ppc_sys code, but maybe creating a call like

ppc_sys_assign_subfn(MPC52xx_PSC1,"uart");

and place it in the ppc_sys code so that other platforms havin such 
"multi usage" device all have an uniform way of handling that. Galak ?

	Sylvain