All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Francis Moreau <francis.moro@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	i2c@lm-sensors.org
Subject: Re: qestion about I2C_CLASS_HWMON flag
Date: Fri, 5 Sep 2008 15:49:48 +0200	[thread overview]
Message-ID: <20080905154948.24d2b460@hyperion.delvare> (raw)
In-Reply-To: <38b2ab8a0809050638m524feaeet51817a8207505b87@mail.gmail.com>

On Fri, 5 Sep 2008 15:38:23 +0200, Francis Moreau wrote:
> On Fri, Sep 5, 2008 at 3:11 PM, Jean Delvare <khali@linux-fr.org> wrote:
> > It's not about hacking, it can be done cleanly. Just have the adapter
> > driver code check for information in the platform data, and if class
> > information is provided, use that instead of the default value. Or if
> > all users will provide the information, don't even have a default in
> > the driver. Again, the class flags are a (needed) mechanism, the policy
> > is left for driver authors and platform maintainers to establish.
> 
> Ah OK I see now.
> 
> On v2.6.23 i2c-gpio.c had no I2C_CLASS_HWMON flag set and
> had no way to pass this info from platform board.
> 
> But on v2.6.27 it is now set whatever the platforms.
> 
> Wouldn't it have been better to allow the platform code to pass this type
> information through the 'i2c_gpio_platform_data' structure for example ?

If you have a need for that, sure. If you don't, that's making the code
more complex for no good reason.

I expect I2C_CLASS_HWMON to be removed from that driver soon. Now that
almost all hwmon drivers have been converted to support instantiated
I2C devices, and given that all users of i2c-gpio are embedded
architectures with platform code, it should be no longer needed. But
again I am leaving it to whoever is actually using this driver to
decide what is best for them.

-- 
Jean Delvare

  reply	other threads:[~2008-09-05 13:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04  7:43 qestion about I2C_CLASS_HWMON flag Francis Moreau
2008-09-04  7:58 ` Jean Delvare
2008-09-04  8:04   ` Francis Moreau
     [not found] ` <38b2ab8a0809040043g7f944872l47f84c53bb213829-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-04  8:05   ` Francis Moreau
2008-09-04  8:05     ` Francis Moreau
2008-09-04  8:37     ` Jean Delvare
2008-09-04  8:49       ` Francis Moreau
2008-09-04 10:08         ` Jean Delvare
2008-09-05  8:57           ` Francis Moreau
2008-09-05  9:20             ` Jean Delvare
2008-09-05 12:44               ` Francis Moreau
2008-09-05 13:11                 ` Jean Delvare
2008-09-05 13:38                   ` Francis Moreau
2008-09-05 13:49                     ` Jean Delvare [this message]
2008-09-05 14:44                       ` Francis Moreau

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=20080905154948.24d2b460@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=francis.moro@gmail.com \
    --cc=i2c@lm-sensors.org \
    --cc=linux-kernel@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.