From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Pirmin Duss <pirmin.duss@flytec.ch>,
linux-iio@vger.kernel.org, "J . I . Cameron" <jic23@cam.ac.uk>
Subject: Re: [Patch v2.1] Adds support for the Texas Instruments ADS1110 adc.
Date: Sun, 01 Jan 2012 11:53:59 +0100 [thread overview]
Message-ID: <4F003B47.2060900@metafoo.de> (raw)
In-Reply-To: <4EFF699B.1000802@kernel.org>
> On 12/23/2011 09:02 AM, Pirmin Duss wrote:
>> +
> Why the values in this table? I'm not seeing that field
> used anywhere... Actually, other than address are these
> different? If not from a kernel point of view we almost
> certainly don't care, so just have one ads1110 entry in
> here...
>> +static const struct i2c_device_id ads1110_id[] = {
>> + { "ads1110-ed0", 0x48 },
>> + { "ads1110-ed1", 0x49 },
>> + { "ads1110-ed2", 0x50 },
>> + { "ads1110-ed3", 0x51 },
>> + { "ads1110-ed4", 0x52 },
>> + { "ads1110-ed5", 0x53 },
>> + { "ads1110-ed6", 0x54 },
>> + { "ads1110-ed7", 0x55 },
>> + {},
>> +};
>> +
>> +MODULE_DEVICE_TABLE(i2c, ads1110_id);
>> +
>> +static struct i2c_driver ads1110_driver = {
>> + .driver = {
>> + .name = "ads1110",
>> + },
>> + .probe = ads1110_probe,
>> + .remove = __devexit_p(ads1110_remove),
>> + .id_table = ads1110_id,
>> +};
>> +
>> +static int __init ads1110_init(void)
>> +{
>> + return i2c_add_driver(&ads1110_driver);
>> +}
>> +
>> +static void __exit ads1110_exit(void)
>> +{
>> + i2c_del_driver(&ads1110_driver);
>> +}
>> +
>> +MODULE_AUTHOR("Duss Pirmin <pirmin.duss@flytec.ch>");
>> +MODULE_DESCRIPTION("Texas Instruments ads1110 adc driver");
>> +MODULE_LICENSE("GPL v2");
>> +
>> +module_init(ads1110_init);
> I believe convension puts immediately after each relevant function.
>> +module_exit(ads1110_exit);
>
> There is a whole load of boiler plate removal code from Lars-Peter,
> but I'm not entirely sure on what the status is. Either you should
> provide him with a patch that uses that stuff or if Lars-Peter
> prefers he can just add this to his conversions.
> The core support is in driver-core for next (I think - certainly
> in linux next).
The other patches which remove this kind of boilerplate from IIO drivers have
already been applied to driver-core-next. If the module_i2c_driver macro shows
up in staging-next before this patch is ready, the cleanup can be added
directly to the patch it-self, otherwise we can do it later.
>
> See https://lkml.org/lkml/2011/11/16/78
>
next prev parent reply other threads:[~2012-01-01 10:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 11:17 [PATCH v2] Adds support for the Texas Instruments ADS1110 adc Pirmin Duss
2011-12-21 11:46 ` Lars-Peter Clausen
2011-12-22 10:18 ` [PATCH v2.1] " Pirmin Duss
2011-12-23 8:09 ` J.I. Cameron
2011-12-23 9:02 ` [Patch " Pirmin Duss
2011-12-31 19:59 ` Jonathan Cameron
2012-01-01 10:53 ` Lars-Peter Clausen [this message]
2012-01-03 9:37 ` Duss Pirmin
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=4F003B47.2060900@metafoo.de \
--to=lars@metafoo.de \
--cc=jic23@cam.ac.uk \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=pirmin.duss@flytec.ch \
/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.