linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: New-style I2C driver not getting probed because of_register_i2c_devices() is not setting info.driver_name
Date: Wed, 14 May 2008 15:48:23 -0500	[thread overview]
Message-ID: <482B5017.7080804@freescale.com> (raw)

I'm converting sound/soc/codecs/cs4270.c into a new-style I2C driver, and this
driver is not getting probed.  I believe the problem is that i2c_device_match()
is returning failure, because of this line:

	return strcmp(client->driver_name, drv->name) == 0;

when this line is executed, client->drivername is blank.  Therefore, the strcmp
never matches.

I think this string is blank because when of_register_i2c_devices() in fsl_soc.c
calls i2c_register_board_info(), the info.driver_name field is also blank.
i2c_new_device() copies info->driver_name to client->driver_name.

I don't understand why this code doesn't work for me.  Most of the core I2C code
has been in place for a year, and I can't see how my driver is different from
any other new-style I2C driver that works on OF platforms.

Can anyone help me?

-- 
Timur Tabi
Linux kernel developer at Freescale

                 reply	other threads:[~2008-05-14 20:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=482B5017.7080804@freescale.com \
    --to=timur@freescale.com \
    --cc=linuxppc-dev@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 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).