From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Cc: Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>,
Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Michael Hennerich
<Michael.Hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 3/5] SPI: Add helper macro for spi_driver boilerplate
Date: Thu, 24 Nov 2011 08:29:36 +0100 [thread overview]
Message-ID: <4ECDF260.5030907@metafoo.de> (raw)
In-Reply-To: <20111124001342.GN19115-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
On 11/24/2011 01:13 AM, Ben Dooks wrote:
> On Wed, Nov 16, 2011 at 10:12:54AM -0700, Grant Likely wrote:
>> On Wed, Nov 16, 2011 at 2:13 AM, Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org> wrote:
>>> This patch introduces the module_spi_driver macro which is a convenience macro
>>> for SPI driver modules similar to module_platform_driver. It is intended to be
>>> used by drivers which init/exit section does nothing but register/unregister
>>> the SPI driver. By using this macro it is possible to eliminate a few lines of
>>> boilerplate code per SPI driver.
>>>
>>> Signed-off-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>>
>> Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
>
> I'm begining to think we need to make some of these driver and device
> bits more generic... there seems to be so much similar but not quite
> the same code.
>
I've been thinking the same. A good start would probably be consolidating
the platform/spi/i2c device id handling code. Since those are all name based
ids the code for handling them looks rather similar, though there are some
minor differences.
- Lars
WARNING: multiple messages have this Message-ID (diff)
From: Lars-Peter Clausen <lars@metafoo.de>
To: Ben Dooks <ben-i2c@fluff.org>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Greg Kroah-Hartman <gregkh@suse.de>,
Jean Delvare <khali@linux-fr.org>,
Jonathan Cameron <jic23@kernel.org>,
Michael Hennerich <Michael.Hennerich@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-i2c@vger.kernel.org,
spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH 3/5] SPI: Add helper macro for spi_driver boilerplate
Date: Thu, 24 Nov 2011 08:29:36 +0100 [thread overview]
Message-ID: <4ECDF260.5030907@metafoo.de> (raw)
In-Reply-To: <20111124001342.GN19115@trinity.fluff.org>
On 11/24/2011 01:13 AM, Ben Dooks wrote:
> On Wed, Nov 16, 2011 at 10:12:54AM -0700, Grant Likely wrote:
>> On Wed, Nov 16, 2011 at 2:13 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>>> This patch introduces the module_spi_driver macro which is a convenience macro
>>> for SPI driver modules similar to module_platform_driver. It is intended to be
>>> used by drivers which init/exit section does nothing but register/unregister
>>> the SPI driver. By using this macro it is possible to eliminate a few lines of
>>> boilerplate code per SPI driver.
>>>
>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>>
>> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
> I'm begining to think we need to make some of these driver and device
> bits more generic... there seems to be so much similar but not quite
> the same code.
>
I've been thinking the same. A good start would probably be consolidating
the platform/spi/i2c device id handling code. Since those are all name based
ids the code for handling them looks rather similar, though there are some
minor differences.
- Lars
next prev parent reply other threads:[~2011-11-24 7:29 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 9:13 [PATCH 0/5] Generalize module_platform_driver Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
2011-11-16 9:13 ` [PATCH 1/5] drivercore: " Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
[not found] ` <1321434819-23678-2-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2011-11-16 17:11 ` Grant Likely
2011-11-16 17:11 ` Grant Likely
2011-11-16 17:11 ` Grant Likely
[not found] ` <CACxGe6twCU9Nb+b00ei83jxaz0YnVa6nT0ra6Kp0c4PO7hjT6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-17 6:51 ` Jonathan Cameron
2011-11-17 6:51 ` Jonathan Cameron
2011-11-17 20:04 ` Greg KH
2011-11-17 20:04 ` Greg KH
2012-01-13 9:07 ` Guennadi Liakhovetski
2012-01-13 9:07 ` Guennadi Liakhovetski
2012-01-13 18:23 ` Greg KH
2011-11-16 9:13 ` [PATCH 2/5] I2C: Add helper macro for i2c_driver boilerplate Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
[not found] ` <1321434819-23678-3-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2011-11-16 17:12 ` Grant Likely
2011-11-16 17:12 ` Grant Likely
2011-11-16 17:12 ` Grant Likely
[not found] ` <CACxGe6toOFjOdP7-oZ4O2J=g2U+Y+aWOUzHDoCaX6goAs6zKsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-17 6:47 ` Jonathan Cameron
2011-11-17 6:47 ` Jonathan Cameron
2011-11-16 9:13 ` [PATCH 3/5] SPI: Add helper macro for spi_driver boilerplate Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
[not found] ` <1321434819-23678-4-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2011-11-16 17:12 ` Grant Likely
2011-11-16 17:12 ` Grant Likely
2011-11-16 17:12 ` Grant Likely
[not found] ` <CACxGe6tz0ppZj=a_e4rkgNxzhQ4MSCtXKXGk_dPov80QDU4MCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-24 0:13 ` Ben Dooks
2011-11-24 0:13 ` Ben Dooks
[not found] ` <20111124001342.GN19115-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-11-24 7:29 ` Lars-Peter Clausen [this message]
2011-11-24 7:29 ` Lars-Peter Clausen
2011-11-16 9:13 ` [PATCH 4/5] staging:iio: Use module_i2c_driver to register I2C drivers Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
[not found] ` <1321434819-23678-5-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2011-11-17 6:50 ` Jonathan Cameron
2011-11-17 6:50 ` Jonathan Cameron
[not found] ` <1321434819-23678-1-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2011-11-16 9:13 ` [PATCH 5/5] staging:iio: Use module_spi_driver to register SPI driver Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
2011-11-16 9:13 ` Lars-Peter Clausen
2011-11-16 17:15 ` Grant Likely
2011-11-16 17:15 ` Grant Likely
[not found] ` <CACxGe6su+18Ct6E7z8VfbXcOwftxMm49A9Q49Eat8+StT17F4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-17 6:48 ` Jonathan Cameron
2011-11-17 6:48 ` Jonathan Cameron
[not found] ` <1321434819-23678-6-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2011-11-17 6:49 ` Jonathan Cameron
2011-11-17 6:49 ` Jonathan Cameron
2011-11-16 16:02 ` [PATCH 0/5] Generalize module_platform_driver Greg KH
2011-11-16 16:02 ` Greg KH
2011-11-16 16:36 ` Jean Delvare
2011-11-16 16:37 ` Greg KH
[not found] ` <20111116163728.GA7196-l3A5Bk7waGM@public.gmane.org>
2011-11-16 17:13 ` Grant Likely
2011-11-16 17:13 ` Grant Likely
[not found] ` <CACxGe6sMJN6ZuF2E5vtbf-jquJRUPizzo_Ttdy1UkwtMO4axUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-17 19:49 ` Greg KH
2011-11-17 19:49 ` Greg KH
2011-11-16 20:14 ` Wolfram Sang
2011-11-16 20:14 ` Wolfram Sang
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=4ECDF260.5030907@metafoo.de \
--to=lars-qo5elluwu/uelga04laivw@public.gmane.org \
--cc=Michael.Hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
--cc=ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=gregkh-l3A5Bk7waGM@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.