Re: [blug-prog] Query rgd driver_register, platform_device_register ...
- On 3/30/06, Vishwas P S <vishwas.ps@...> wrote:
> All,In case of mix of all these first is register_chrdev and
> Whats the correct order in which register_chrdev, driver_register and
> platform_device_register should occur ?
driver_register. platform_device_register can be be done in some
platform specific files or after these two calls.
> As per my limited understanding, register_chardev allocates/creates a cdevYes. you can call.
> entry and registers the name and fops and creates the device node (I agree
> that this call should not be invoked in a 2.6 kernel, but I'm working on a
> driver thats blindly ported and surviving due to backward compatibility of
> the 2.6 kernel).
> The driver_register registers the dynamic power management functions (if its
> configured) and platform_device_register registers the device to the
> platform bus and creates an entry in sysfs.
> Is it Ok to have all these calls in the driver's init function? Also whatz