All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt.com>
To: Grant Likely <glikely@gmail.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: MPC52xx: sysfs failure on adding new device driver
Date: Fri, 10 Jun 2005 16:09:32 +0200	[thread overview]
Message-ID: <42A99F1C.50104@246tNt.com> (raw)
In-Reply-To: <528646bc050609114857191ca7@mail.gmail.com>

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

  reply	other threads:[~2005-06-10 14:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 23:51 MPC52xx: sysfs failure on adding new device driver Grant Likely
2005-06-09 11:21 ` Mark Chambers
2005-06-09 11:32   ` Sylvain Munaut
2005-06-09 13:55     ` Wolfgang Denk
2005-06-09 15:28       ` Mark Chambers
2005-06-09 18:34         ` Grant Likely
2005-06-09 11:28 ` Sylvain Munaut
2005-06-09 14:54   ` Grant Likely
2005-06-09 15:20     ` Kumar Gala
2005-06-09 18:48       ` Grant Likely
2005-06-10 14:09         ` Sylvain Munaut [this message]
2005-06-10 16:06           ` Grant Likely
2005-06-13 19:08           ` Grant Likely
2005-06-09 19:56   ` Grant Likely

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=42A99F1C.50104@246tNt.com \
    --to=tnt@246tnt.com \
    --cc=glikely@gmail.com \
    --cc=linuxppc-embedded@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.