linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* pcf8563 and i2c kernel abstarct
@ 2003-06-26 12:37 Wojciech Kromer
  2003-06-26 13:09 ` Wojciech Kromer
  0 siblings, 1 reply; 2+ messages in thread
From: Wojciech Kromer @ 2003-06-26 12:37 UTC (permalink / raw)
  To: linuxppc-embedded


Hell there.

I have some toubles using pcf8563_rtc driver. It causes 'kernel panic'
in rtc_rd function. I've done some debugging, ad discoverd what
back-follows:

- i2c_client *clnt is not set on call to rtc_rd
- it was called from pcf8563_rtc_init (by now = pcf8563_get_rtc_time();)
- clnt is created in pcf8563_attach
- prior call to i2c_add_driver(&pcf8563_driver) does not call
   pcf8563_attach, which should be caled from this part of
   i2c-core.c:i2c_add_driver:

/* now look for instances of driver on our adapters

               if (driver->flags& (I2C_DF_NOTIFY|I2C_DF_DUMMY)) {
                                for (i=0;i<I2C_ADAP_MAX;i++)
                                                 if (adapters[i]!=NULL)
                                                                  /*
Ignore errors */
      driver->attach_adapter(adapters[i]);


-this is because adapters[...] are not set


Q:
- did i miss anything adding this driver
- where and how adaptes should be set


?
I need only add support in ppc_md, so I can write my own functions to
implement talking with pcf8563. But... why to reinvent working (or not
?) code?


--
* * * * * * * * * * * *
* per pedes ad astra! *
* * * * * * * * * * * *    mailto:krom@dgt-lab.com.pl


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: pcf8563 and i2c kernel abstarct
  2003-06-26 12:37 pcf8563 and i2c kernel abstarct Wojciech Kromer
@ 2003-06-26 13:09 ` Wojciech Kromer
  0 siblings, 0 replies; 2+ messages in thread
From: Wojciech Kromer @ 2003-06-26 13:09 UTC (permalink / raw)
  To: linuxppc-embedded


.... i've forgot to call si2c_init before, now there is another starnge
thig, here is my backtrace

#0  add_wait_queue_exclusive (q=0xc01ba738, wait=0xc03f7f28)
    at linux/include/linux/list.h:44
#1  0xc00095bc in __down (sem=0xc01ba730) at semaphore.c:79
#2  0xc00e83a0 in i2c_add_driver (driver=0xc017d3fc)
    at linux/include/asm/semaphore.h:94
#3  0xc018deb0 in pcf8563_rtc_init () at pcf8563.c:265
#4  0xc018d92c in misc_init () at misc.c:270
#5  0xc018d1b0 in chr_dev_init () at mem.c:677
#6  0xc01866dc in do_initcalls () at init/main.c:474
#7  0xc0186724 in do_basic_setup () at init/main.c:558
#8  0xc0002294 in init (unused=0x1) at init/main.c:574
#9  0xc0006d24 in kernel_thread () at time.c:447



--
* * * * * * * * * * * *
* per pedes ad astra! *
* * * * * * * * * * * *    mailto:krom@dgt-lab.com.pl


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2003-06-26 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-26 12:37 pcf8563 and i2c kernel abstarct Wojciech Kromer
2003-06-26 13:09 ` Wojciech Kromer

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).