From: Steve Hardy <steve@linuxrealtime.co.uk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
Date: Tue, 18 Dec 2007 20:56:44 +0000 [thread overview]
Message-ID: <4768340C.60208@linuxrealtime.co.uk> (raw)
In-Reply-To: <20071212022550.d8d3b295.akpm@linux-foundation.org>
Andrew,
Thanks your your comments, I'm currently preparing/testing a revised patch based on your suggestions, which I will post later this week.
A couple of comments inline.
Steve
> I wouldn't bother with EXPERIMENTAL personally. It seems a farily
> pointless thing.
>
OK, I copied one of the other hwmon drivers, many of which are marked experimental.
>> +static int ads7828_attach_adapter(struct i2c_adapter *adapter);
>> +static int ads7828_detect(struct i2c_adapter *adapter, int address, int
>> kind);
>> +static void ads7828_init_client(struct i2c_client *client);
>> +static int ads7828_detach_client(struct i2c_client *client);
>> +static struct ads7828_data *ads7828_update_device(struct device *dev);
>> +static u16 ads7828_read_value(struct i2c_client *client, u8 reg);
>
> I do dislike all these forward declarations, but they're all needed here
> give the order of the functions. Maybe from my Pascal-on-pdp11 days..
>
OK, this is due to re-using the driver structure/style of other hwmon drivers, will try to improve.
>> +static int ads7828_attach_adapter(struct i2c_adapter *adapter)
>> +{
>> + if (!(adapter->class & I2C_CLASS_HWMON))
>> + return 0;
>
> Can this happen?
Hmmm, this code exists in pretty much all of the other hwmon drivers, so I will leave it in.
I think it relates to I2C vs ISA connected devices, to avoid detecting something with the correct ID on the wrong bus?
next prev parent reply other threads:[~2007-12-18 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 17:59 [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D Steve Hardy
2007-12-12 10:25 ` Andrew Morton
2007-12-18 20:56 ` Steve Hardy [this message]
2007-12-19 14:54 ` Jean Delvare
2007-12-19 15:35 ` Jean Delvare
[not found] <477D50CC.6020504@linuxrealtime.co.uk>
2008-01-04 7:34 ` Steve Hardy
2008-01-10 0:30 ` Andrew Morton
2008-01-10 13:19 ` Jean Delvare
2008-01-14 22:28 ` Steve Hardy
2008-01-15 10:31 ` 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=4768340C.60208@linuxrealtime.co.uk \
--to=steve@linuxrealtime.co.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox