All of lore.kernel.org
 help / color / mirror / Atom feed
* probe gets called without i2c device
@ 2018-03-23  7:19 MUHAMMED ASAD P T
  0 siblings, 0 replies; 5+ messages in thread
From: MUHAMMED ASAD P T @ 2018-03-23  7:19 UTC (permalink / raw)
  To: kernelnewbies

Hi all,



We didn't connect our i2c device with our board. But kernel driver subsystem calls the probe function from driver code. How to debug the issue.









Thanks & Regards

- Asad

  IQ Root Technologies





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180323/40c51929/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* probe gets called without i2c device
  2018-03-23 13:37   ` MUHAMMED ASAD P T
@ 2018-03-23 14:59     ` valdis.kletnieks at vt.edu
  0 siblings, 0 replies; 5+ messages in thread
From: valdis.kletnieks at vt.edu @ 2018-03-23 14:59 UTC (permalink / raw)
  To: kernelnewbies

On Fri, 23 Mar 2018 19:07:41 +0530, MUHAMMED ASAD P T said:
> We have the device tree information and wrote in the board. In this device
> tree, we specify our I2c device details.

So you told the kernel the device is there.

> In usual, if the device is there, then driver probe gets called. This is the proper scenario.

So the kernel acts like it's there.

> But if the device is not there, then i2c master controller will not get the
> Ack from slave device. Still driver probe gets called without device
>  connected (In device tree, device node is there for slave device).

Why is the slave listed if it isn't actually present and wired up?

> How the driver probe gets called?? This is the problem for us.

Maybe if you don't want the driver called if the device isn't there, you
shouldn't lie to the kernel and write a device tree entry that says it *is*
there.

Just a thought...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180323/68b889e2/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* probe gets called without i2c device
  2018-03-23 12:27 ` Greg KH
@ 2018-03-23 13:37   ` MUHAMMED ASAD P T
  2018-03-23 14:59     ` valdis.kletnieks at vt.edu
  0 siblings, 1 reply; 5+ messages in thread
From: MUHAMMED ASAD P T @ 2018-03-23 13:37 UTC (permalink / raw)
  To: kernelnewbies

Hi Greg,



Thanks for the reply. 



We have the device tree information and wrote in the board. In this device tree, we specify our I2c device details. 

In usual, if the device is there, then driver probe gets called. This is the proper scenario.

But if the device is not there, then i2c master controller will not get the Ack from slave device. Still driver probe gets called without device

 connected (In device tree, device node is there for slave device). 

How the driver probe gets called?? This is the problem for us. 



Thanks &amp; Regards

- Asad

  IQ Root Technologies






---- On Fri, 23 Mar 2018 17:57:31 +0530 Greg KH &lt;greg at kroah.com&gt; wrote ----




On Fri, Mar 23, 2018 at 05:47:01PM +0530, MUHAMMED ASAD P T wrote: 

&gt; Hi all, 

&gt; 

&gt; 

&gt; 

&gt; We didn't connect our i2c device with our board. But kernel driver 

&gt; 

&gt; subsystem calls the probe function from driver code. How to debug the 

&gt; 

&gt; issue. 

&gt; 

&gt; 

&gt; 

&gt; our observation is as follows, 

&gt; 

&gt; 

&gt; 

&gt; In driver, if we comment out the .id_table in driver struct, then it 

&gt; is not loaded. When the device is connected or not, both the time, the 

&gt; driver is not loaded. 

 

i2c is not a "hotplug" bus, so how would your device be found in order 

to know to load it or not? 

 

Shouldn't you have some device tree information that knows to bind your 

device to the driver properly? 

 

good luck! 

 

greg k-h 

 

_______________________________________________ 

Kernelnewbies mailing list 

Kernelnewbies at kernelnewbies.org 

https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies 






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180323/74e35c92/attachment-0001.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* probe gets called without i2c device
  2018-03-23 12:17 MUHAMMED ASAD P T
@ 2018-03-23 12:27 ` Greg KH
  2018-03-23 13:37   ` MUHAMMED ASAD P T
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2018-03-23 12:27 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Mar 23, 2018 at 05:47:01PM +0530, MUHAMMED ASAD P T wrote:
> Hi all,
> 
>  
> 
>  We didn't connect our i2c device with our board. But kernel driver
> 
>  subsystem calls the probe function from driver code. How to debug the
> 
>  issue.
> 
> 
> 
> our observation is as follows,
> 
>  
> 
>  In driver, if we comment out the .id_table in driver struct, then it
>  is not loaded. When the device is connected or not, both the time, the
>  driver is not loaded.

i2c is not a "hotplug" bus, so how would your device be found in order
to know to load it or not?

Shouldn't you have some device tree information that knows to bind your
device to the driver properly?

good luck!

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* probe gets called without i2c device
@ 2018-03-23 12:17 MUHAMMED ASAD P T
  2018-03-23 12:27 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: MUHAMMED ASAD P T @ 2018-03-23 12:17 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

 

 We didn't connect our i2c device with our board. But kernel driver

 subsystem calls the probe function from driver code. How to debug the

 issue.



our observation is as follows,

 

 In driver, if we comment out the .id_table in driver struct, then it

 is not loaded. When the device is connected or not, both the time, the

 driver is not loaded.








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180323/79a02545/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-23 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23  7:19 probe gets called without i2c device MUHAMMED ASAD P T
2018-03-23 12:17 MUHAMMED ASAD P T
2018-03-23 12:27 ` Greg KH
2018-03-23 13:37   ` MUHAMMED ASAD P T
2018-03-23 14:59     ` valdis.kletnieks at vt.edu

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.