Re: [RFC PATCH 4/6] OMAP4: Temperature sensor device support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Aug 10, 2011 at 04:17:05PM +0200, Cousson, Benoit wrote:
> 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@xxxxxx>  [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 :-)

Temporary or not, I would rather have this device created based on CPU
detection as it ought to be. But since we're moving to DT anyway, I
agree it might not be worth spending the time.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux