All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Protocol driver probe function never invoked
Date: Tue, 24 Jul 2007 06:28:14 -0700	[thread overview]
Message-ID: <200707240628.14536.david-b@pacbell.net> (raw)
In-Reply-To: <46A59E7A.8010204-4VKA1VU3ct/j+vYz1yj4TQ@public.gmane.org>

On Monday 23 July 2007, llandre wrote:
> The probe function is not invoked because the controller does not allow 
> to reach the max_speed_hz.
> I did not realize this before because, even if the debug messages were 
> enabled, I did not see any warning message about this.

I want to be sure I understand this correctly.  You're saying that
the call to spi_setup() inside of spi_new_device() failed silently?
And thus the scan_boardinfo() failed?

If so, I'm thinking the following patch would help ... right?

--- g26.orig/drivers/spi/spi.c	2007-07-24 06:27:04.000000000 -0700
+++ g26/drivers/spi/spi.c	2007-07-24 06:26:39.000000000 -0700
@@ -325,9 +325,17 @@ static void scan_boardinfo(struct spi_ma
 		unsigned		n;
 
 		for (n = bi->n_board_info; n > 0; n--, chip++) {
+			int	status;
+
 			if (chip->bus_num != master->bus_num)
 				continue;
-			(void) spi_new_device(master, chip);
+			status = spi_new_device(master, chip);
+			if (status < 0)
+				dev_err(master->cdev.dev,
+					"can't create spi_device, err %d; "
+					"chipselect %d, modalias %s\n",
+					status, chip->chip_select,
+					chip->modalias);
 		}
 	}
 	mutex_unlock(&board_lock);




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

  parent reply	other threads:[~2007-07-24 13:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23  8:54 Protocol driver probe function never invoked llandre
     [not found] ` <46A46CCA.7010303-4VKA1VU3ct/j+vYz1yj4TQ@public.gmane.org>
2007-07-24  6:38   ` llandre
     [not found]     ` <46A59E7A.8010204-4VKA1VU3ct/j+vYz1yj4TQ@public.gmane.org>
2007-07-24 13:28       ` David Brownell [this message]
     [not found]         ` <200707240628.14536.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2007-07-24 13:32           ` David Brownell
     [not found]             ` <200707240632.53496.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2007-07-26  7:30               ` llandre

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=200707240628.14536.david-b@pacbell.net \
    --to=david-b-ybekhbn/0ldr7s880joybq@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.