All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [RFC] adding back i2c_get_clients
Date: Thu, 17 Nov 2005 11:35:16 +0000	[thread overview]
Message-ID: <wxMZBkZM.1132222901.0262640.khali@localhost> (raw)
In-Reply-To: <20051117003330.21bfff26@inspiron>


Hi Alessandro,

> > What exactly is the problem you are trying to solve?
>
> a) I would like to send specific commands to my driver without having
> to export a function to do that.

If the command is really specific, I see no reason why exporting a
function would be avoided.

> b) I want to have drivers of the same class to respond to a common command
> subset, so that, for example, every i2c driver which is compatible
> with I2C_CLASS_RTC could be used in the same way from the higher layers.

The fact that your RTC chip is I2C-based is an implementation detail. If
you want a command to work on all RTC drivers, you certainly do not want
to rely on i2c-core in any way. Better have some rtc-core driver (if it
doesn't already exist) and have your RTC driver register with it.

Also, please keep in mind that I2C_CLASS_* is meant to limit the extent
of automatic chip probing. Only i2c adapters and drivers which want to
take part in the automatic chip probing (which is the only way right
now, but this should change soon) should define .class. You should not
expect *all* RTC chip drivers based on I2C to define it. In fact, I even
expect .class to disappear in the long run, once alternative probing
methods have been implemented and deployed.

> c) trying to understand and document the way i2c_driver->command should
> be used/abused.

/deleted?

--
Jean Delvare

  parent reply	other threads:[~2005-11-17 11:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17  0:34 [lm-sensors] [RFC] adding back i2c_get_clients Alessandro Zummo
2005-11-17  8:56 ` Greg KH
2005-11-17 11:03 ` Alessandro Zummo
2005-11-17 11:35 ` Jean Delvare [this message]
2005-11-17 11:56 ` Alessandro Zummo
2005-11-17 13:03 ` Jean Delvare
2005-11-17 13:20 ` Alessandro Zummo
2005-11-17 14:33 ` Jean Delvare
2005-11-17 15:04 ` Alessandro Zummo
2005-11-17 18:01 ` Greg KH
2005-11-17 19:23 ` Alessandro Zummo
2005-11-17 19:27 ` Greg KH

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=wxMZBkZM.1132222901.0262640.khali@localhost \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.