From: jim.cromie@gmail.com (Jim Cromie)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] use of struct platform_device vs struct device in
Date: Fri, 03 Feb 2006 01:13:08 +0000 [thread overview]
Message-ID: <43E2AE24.9020602@gmail.com> (raw)
In-Reply-To: <43E12BDF.1020805@gmail.com>
Jean Delvare wrote:
> Hi Jim,
>
>
>> while LXR'g (http://sosdg.org/~coywolf/lxr/)
>> for usage of struct platform_device, I found your code.
>>
>> What were your reasons for using platform_device, what are the benefits ?
>>
>> Were they special-case considerations, or is this something that
>> other hwmon drivers should consider moving towards ?
>>
>
> Well, the reasons were simply that the Fintek F71805F/FG is not an
> I2C/SMBus device. For too long, all hardware monitoring drivers have
> been implemented as i2c drivers, even when they were absolutely not
> I2C/SMBus related. This was made possible by the i2c-isa driver, which
> has an historical reason for existing: some chips (LM78 and W83781D to
> name the most popular ones) used to have two possible interfaces, I2C
> and ISA. In order to avoid code duplication while keeping the drivers
> simple, it was decided to handle the ISA interface as a fake I2C bus.
>
> Now, there are more and more hardware monitoring devices which are
> either integrated into PCI devices, of integrated into Super-I/O chips,
> with a simple ISA interface. Depending on the whole i2c stack to drive
> these is quite boring and inefficient now, so I have been working on a
> clean separation between i2c and hwmon for the past few months. This
> included a full rewrite of i2c-isa, and moving of all hardware
> monitoring drivers from drivers/i2c/chips to drivers/hwmon, and a lot
> of cleanups all around the place. Then we introduced the hwmon class,
> which makes it possible for user-space to locate hardware monitoring
> chips in sysfs regardless of their interface. This was supported by
> libsensors in lm_sensors 2.9.2 for the first time.
>
> The ultimate goal is to convert all non-I2C hardware monitoring drivers
> to platform drivers. However, we need to wait for lm_sensors 2.9.2 and
> later to be widely deployed before we modify the exiting drivers, as it
> makes them incompatible with earlier releases of lm_sensors. For the
> f71805f driver, it was new so compatibility wasn't an issue. All other
> drivers, except the newly ported vt8231 driver, will have to wait at
> least another 6 months before we can consider converting them. New
> drivers or drivers being ported these days (e.g. vt1211) should be
> implemented as platform drivers directly.
>
> I hope I clarified the point :)
>
>
Thanks Jean,
A helpful and thorough answer, thanks.
WRT waiting for 2.9.2, it would take some months to get updates
thru -mm and then into mainline. Certainly drivers could sit in -mm
until the time is right.
Actually though, the question I posed was twisted from an OT one;
Im working on pc8736x_gpio, which is an adaptation of scx200_gpio,
so its a char-dev. I was looking for a way to get a struct device that
I could use in dev_dbg() and friends,
I may imitate your work in pc87360, just to get some familiarity
with platform_device, (along with on-topic help ;-), then apply that
to my gpio project.
next prev parent reply other threads:[~2006-02-03 1:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-01 21:45 [lm-sensors] use of struct platform_device vs struct device in Jim Cromie
2006-02-02 21:53 ` Jean Delvare
2006-02-03 1:13 ` Jim Cromie [this message]
2006-02-04 10:51 ` 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=43E2AE24.9020602@gmail.com \
--to=jim.cromie@gmail.com \
--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.