LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Andrew Paprocki" <andrew@ishiboo.com>
To: linux-kernel@vger.kernel.org
Cc: "Jorge Boncompte" <jorge@dti2.net>,
	"Jean Delvare" <khali@linux-fr.org>,
	"Chris Gauthron" <chrisg@0-in.com>
Subject: I/O collisions w/ hwmon/it87.c and watchdog/it8712f_wdt.c? (Super I/O chips in general..)
Date: Sun, 10 Feb 2008 16:04:25 -0500	[thread overview]
Message-ID: <76366b180802101304j359e2873vd9dd974920bf6745@mail.gmail.com> (raw)

I'm interested in expanding the current support for the it87 Super I/O
chip to provide access to more of its capabilities. I started by
looking at two existing drivers which talk to different parts of the
chip. Maybe I'm missing something, but what guarantees that both of
these drivers won't attempt to talk to the chip at the same time?

The watchdog/it8712f_wdt.c driver has an internal spinlock, the
hwmon/it87.c driver doesn't, and I don't see how a lock could be
shared across both unless it is taken care of at a lower level that
I'm not aware of. You can see that code is essentially copied between
the two files to talk to the chip.

This brings me to a more general question regarding SuperI/O chips.
Since these chips touch many different parts of traditionally separate
driver areas, how should the drivers be structured so that they can
all talk to the chip? Should the low level communications routines for
the chip live in a library which all the drivers could use? Should all
of the created devices live inside one file? (e.g. platform/it87.c
instead of hwmon, watchdog, etc)

Thanks,
-Andrew

             reply	other threads:[~2008-02-10 21:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-10 21:04 Andrew Paprocki [this message]
2008-02-10 23:05 ` Alan Cox
2008-02-10 23:32   ` Andrew Paprocki
2008-02-11  8:40 ` Jean Delvare

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=76366b180802101304j359e2873vd9dd974920bf6745@mail.gmail.com \
    --to=andrew@ishiboo.com \
    --cc=chrisg@0-in.com \
    --cc=jorge@dti2.net \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: I/O collisions w/ hwmon/it87.c and watchdog/it8712f_wdt.c? (Super I/O chips in general..)' \
    /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

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