RE: hwmod and insertable modules

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

 



> -----Original Message-----
> From: Nayak, Rajendra 
> Sent: Friday, October 22, 2010 3:08 PM
> To: Premi, Sanjeev; linux-omap@xxxxxxxxxxxxxxx
> Subject: RE: hwmod and insertable modules
> 
> Sanjeev,
> 
> > -----Original Message-----
> > From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-
> > owner@xxxxxxxxxxxxxxx] On Behalf Of Premi, Sanjeev
> > Sent: Friday, October 22, 2010 2:43 PM
> > To: linux-omap@xxxxxxxxxxxxxxx
> > Subject: hwmod and insertable modules
> > 
> > Hi all,
> > 
> > I was trying to use hwmod in one of the modules that user 
> could choose
> > to insert via insmod.
> > 
> > During module_init I used omap_device_build() to create the 
> omap_device.
> > But when trying to implement the module_exit, I couldn't find the
> > corresponding 'destructor'.
> 
> omap_device_build essentially does  a platform_device register today
> and hence its not something to be done from a insmod'able 'driver'.

[sp] How does this work for - say dspbridge - where the DSP as device
may not be 'registered' until it is really expected to be used?

> 
> Device registrations should happen only once from a board file or some
> other place appropriate. The insmod'able driver can then be inserted
> and rmmoded as many times without removing the device registration.
> 
> Regards,
> Rajendra
> 
> > 
> > I do see 4 kzalloc()s being called for each 
> omap_device_build(). I do
> > have a half-implemented destructor; but before I proceeded ahead I
> > wanted to pose few questions which can help undertand if I am on a
> > good track:
> > 
> > 1) Is the omap_device supposed to be persistent? i.e. subsequent
> >    calls will return me the same device object?
> > 
> > 2) Has someone else tried to to use omap_device and done multiple
> >    insmod and rmmod operations?
> > 
> > 3) Is my fear of memory leak real? OR there is some magic behind
> >    omap_device_shutdown() that I haven't yet discovered?
> > 
> > Best regards,
> > Sanjeev--
> > To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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