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

On 6/10/05, Sylvain Munaut <tnt@246tnt.com> wrote:
> Hi Grant
>=20
> > +     /* Assign driver names to PSC devices */
> > +     ppc_sys_platform_devices[MPC52xx_PSC1].name =3D "mpc52xx-psc.uart=
";
> > +     ppc_sys_platform_devices[MPC52xx_PSC2].name =3D "mpc52xx-psc.uart=
";
> > +     ppc_sys_platform_devices[MPC52xx_PSC3].name =3D "mpc52xx-psc.spi"=
;
>=20
> 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.
>=20
> 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
>=20
> ppc_sys_assign_subfn(MPC52xx_PSC1,"uart");
>=20
>=20
> 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 ?
Hmm, yes...  I like this better.  I was also uncomfortable with
messing with the table directly.  A function like that can make sure
that the table is not modified after it is registered with the
platform bus; or if it is, make sure that a driver has not yet been
assigned and that sysfs is properly updated.  It would protect against
doing something stupid like:

ppc_sys_platform_devices[MPC52xx_MSCAN1].name =3D "mpc52xx-psc.uart";

g.

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

Thread overview: 13+ 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
2005-06-10 16:06           ` Grant Likely [this message]
2005-06-13 19:08           ` 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=528646bc050610090654d01bbe@mail.gmail.com \
    --to=glikely@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=tnt@246tnt.com \
    /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).