All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] Qs on chips/pc87360
@ 2005-06-22 16:50 Jim Cromie
  2005-06-22 17:22 ` [lm-sensors] " Jean Delvare
  2005-06-22 20:13 ` Jim Cromie
  0 siblings, 2 replies; 3+ messages in thread
From: Jim Cromie @ 2005-06-22 16:50 UTC (permalink / raw)
  To: lm-sensors


Im working on a pc87366_gpio module, and it seems necessary
to coordinate locking in some way.

The simplest thing seems to be to EXPORT_SYMBOL the 2
semaphores in pc87360_data, but then I looked more closely,
and found something I dont understand...

/*
 * Client data (each client gets its own)
 */

struct pc87360_data {
        struct i2c_client client;
        struct semaphore lock;
        struct semaphore update_lock;


How is it possible to have each client get a separate struct
and separate locks, and still get any protection ?

Do semaphores magically interlock with other semaphores
protecting the same resource ?   And how do they know what
theyre protecting ? 

I see plenty of up/down ops on the lock, but no place where theyre
told what theyre locking access to.

Am I missing something ?


Do the earlier chips, 60, 65, etc also have a GPIO section,
or is it just the 66 ?


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

end of thread, other threads:[~2005-06-22 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-22 16:50 [lm-sensors] Qs on chips/pc87360 Jim Cromie
2005-06-22 17:22 ` [lm-sensors] " Jean Delvare
2005-06-22 20:13 ` Jim Cromie

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.