From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Balbi, Felipe" <balbi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>, "J, KEERTHY" <j-keerthy@ti.com>,
"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
"Sripathy, Vishwanath" <vishwanath.bs@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Nayak, Rajendra" <rnayak@ti.com>
Subject: Re: [RFC PATCH 4/6] OMAP4: Temperature sensor device support
Date: Wed, 10 Aug 2011 16:17:05 +0200 [thread overview]
Message-ID: <4E4292E1.2070504@ti.com> (raw)
In-Reply-To: <20110810124800.GK12882@legolas.emea.dhcp.ti.com>
On 8/10/2011 2:48 PM, Balbi, Felipe wrote:
> Hi,
>
> On Wed, Aug 10, 2011 at 05:41:02AM -0700, Tony Lindgren wrote:
>> * Felipe Balbi<balbi@ti.com> [110810 05:31]:
>>>
>>> On Wed, Aug 10, 2011 at 05:55:20PM +0530, Keerthy wrote:
>>>> +
>>>> +int __init omap_devinit_temp_sensor(void)
>>>> +{
>>>> + if (!cpu_is_omap446x())
>>>> + return 0;
>>>> +
>>>> + return omap_hwmod_for_each_by_class("temperature_sensor",
>>>> + temp_sensor_dev_init, NULL);
>>>> +}
>>>> +
>>>> +arch_initcall(omap_devinit_temp_sensor);
>>>
>>> I really dislike people adding more and more *initcall() to their pieces
>>> of code. But Tony is the final Judge.
>>
>> Yes how about making this just a regular device driver and have it
>> live under drivers/ somewhere?
>>
>> Or is there some reason why this could not be a loadable module?
>
> driver is loadable, this is just creating the platform_device, but still
> I don't think it deserves its own arch_initcall(), it could very well be
> something which is called after we know we're running at omap4, or
> called by each board...
Funny, because I thought we were trying to get rid of the ugly init
devices from board file to use *initcall() from a dedicated device file.
The advantage is that you do not have anymore a central place that
everybody will change and that is thus subject to merge conflicts.
The drawback is that you do not know where an when the devices are created.
That being said, device-tree will provide a nice way to build all this
devices without any initcall or board hacks.
This is just a temporary issue :-)
Benoit
next prev parent reply other threads:[~2011-08-10 14:17 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 12:25 [RFC PATCH 0/6] OMAP4: Temperature sensor driver Keerthy
2011-08-10 12:25 ` [RFC PATCH 1/6] OMAP4: Clock: Associate clocks for OMAP temperature sensor Keerthy
2011-08-10 12:25 ` [RFC PATCH 2/6] OMAP4: Adding the temperature sensor register set bit fields Keerthy
2011-08-10 12:25 ` [RFC PATCH 3/6] OMAP4: Hwmod: OMAP temperature sensor Keerthy
2011-08-10 12:25 ` [RFC PATCH 4/6] OMAP4: Temperature sensor device support Keerthy
2011-08-10 12:36 ` Felipe Balbi
2011-08-10 12:41 ` Tony Lindgren
2011-08-10 12:48 ` Felipe Balbi
2011-08-10 14:17 ` Cousson, Benoit [this message]
2011-08-10 21:37 ` Felipe Balbi
2011-08-11 2:40 ` J, KEERTHY
2011-08-11 10:30 ` Felipe Balbi
2011-08-11 11:01 ` J, KEERTHY
2011-08-11 14:05 ` Felipe Balbi
2011-08-11 14:15 ` J, KEERTHY
2011-08-10 12:25 ` [RFC PATCH 5/6] OMAP4460: Temperature sensor data Keerthy
2011-08-10 12:37 ` Felipe Balbi
2011-08-10 15:08 ` J, KEERTHY
2011-08-10 12:25 ` [RFC PATCH 6/6] hwmon: OMAP4: On die temperature sensor driver Keerthy
2011-08-10 12:46 ` Felipe Balbi
2011-08-11 9:57 ` J, KEERTHY
2011-08-11 10:36 ` Felipe Balbi
2011-08-11 13:00 ` J, KEERTHY
2011-08-11 14:12 ` Felipe Balbi
2011-08-11 14:25 ` Rajendra Nayak
2011-08-11 14:32 ` J, KEERTHY
2011-08-11 18:54 ` Felipe Balbi
2011-08-11 18:55 ` Felipe Balbi
2011-08-11 21:37 ` Roger Quadros
2011-08-12 1:02 ` J, KEERTHY
2011-08-12 3:26 ` Rajendra Nayak
2011-08-12 8:44 ` Felipe Balbi
2011-08-22 23:58 ` Kevin Hilman
2011-08-23 4:18 ` Rajendra Nayak
2011-08-23 6:42 ` J, KEERTHY
2011-08-23 17:15 ` Kevin Hilman
2011-08-24 4:07 ` Rajendra Nayak
2011-08-11 16:38 ` Guenter Roeck
2011-08-10 16:35 ` [lm-sensors] " R, Durgadoss
2011-08-15 6:22 ` J, KEERTHY
2011-08-17 10:37 ` J, KEERTHY
2011-08-17 13:45 ` Guenter Roeck
2011-08-17 15:03 ` [lm-sensors] " J, KEERTHY
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=4E4292E1.2070504@ti.com \
--to=b-cousson@ti.com \
--cc=balbi@ti.com \
--cc=j-keerthy@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=rnayak@ti.com \
--cc=tony@atomide.com \
--cc=vishwanath.bs@ti.com \
/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