linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Need help: Watchdog-driver over smbus (i2c)
@ 2009-11-30 21:30 Sven Anders
       [not found] ` <4B14395F.4070608-3bOZC6EutKuELgA04lAiVw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Anders @ 2009-11-30 21:30 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 1599 bytes --]

Hello!

I'm trying to code a watchdog driver for the Winbond w83793g chip. I
already coded a watchdog for another Winbond chip before, but for
this I need to access it over the system managment bus (or more
specific the i2c, client address 2E).

I already coded the detection and initialization routines, but now I
need some help, because I do not know how to use the i2c framework
together with the watchdog framework.
All other drivers I found are using the sysfs framework. This functions
use the to_i2c_client() function to get a pointer to the i2c client.

I tried to store the i2c client pointer to a global variable, to use
it later in the watchdog functions.
But when I try to use the "i2c_smbus_read_byte_data()" or
"i2c_smbus_write_byte_data()" functions, I will get a kernel OOPS
(without any hw-sensors driver loaded!).

What is the best method to get the watchdog framework (i.e. the open,
close, write, read and ioctl functions) to work with the i2c framework?


Moreover the w83793g hardware sensors driver may already
accessing the same chip. What is the normal way to deal with this?


Regards
 Sven Anders

-- 
 Sven Anders <anders-3bOZC6EutKuELgA04lAiVw@public.gmane.org>                 () Ascii Ribbon Campaign
                                                 /\ Support plain text e-mail
 ANDURAS service solutions AG
 Innstrasse 71 - 94036 Passau - Germany
 Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 50-55

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

[-- Attachment #1.2: anders.vcf --]
[-- Type: text/x-vcard, Size: 367 bytes --]

begin:vcard
fn:Sven Anders
n:Anders;Sven
org:ANDURAS AG;Research and Development
adr;quoted-printable:;;Innstra=C3=9Fe 71;Passau;Bavaria;94036;Germany
email;internet:anders-3bOZC6EutKuELgA04lAiVw@public.gmane.org
title:Dipl. Inf.
tel;work:++49 (0)851 / 490 50 -0
tel;fax:++49 (0)851 / 590 50 - 55
x-mozilla-html:FALSE
url:http://www.anduras.de
version:2.1
end:vcard


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 4888 bytes --]

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

end of thread, other threads:[~2009-12-03 22:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30 21:30 Need help: Watchdog-driver over smbus (i2c) Sven Anders
     [not found] ` <4B14395F.4070608-3bOZC6EutKuELgA04lAiVw@public.gmane.org>
2009-12-01  9:31   ` Jean Delvare
     [not found]     ` <20091201103120.6ba0f7e0-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-12-03 20:56       ` Sven Anders
     [not found]         ` <4B18261B.8070507-3bOZC6EutKuELgA04lAiVw@public.gmane.org>
2009-12-03 22:17           ` Jean Delvare

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