Re: platform device , uevent file

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

 



On Mon, Feb 9, 2009 at 12:20 AM, Greg KH <greg@xxxxxxxxx> wrote:
> On Sun, Feb 08, 2009 at 07:47:05PM +0200, Daniel Baluta wrote:
>> Hello,
>>
>> I don't really understand how kernel generates events when working
>> with platform devices and drivers ( [1] ).
>> I have registered my driver with platform_driver_register and my
>> device with platform_device_register_simple.
>>
>> I want to dynamically create the node in /dev , and for that i need
>> the kernel to send events like ( MAJOR=x, MINOR=y)
>> that will be interpreted by the udev daemon acording to rules from
>> /etc/udev/rules.d.
>
> Platform devices can't do this, you need to use a "real" struct device,
> or register with a class that handles major/minor allocation for you
> (input, block, etc.)
>
> hope this helps,
>
> greg k-h
>

thanks for your answer.

I'm writing a driver for a character device [hex display] .

Registering with an existing class its pretty hard since it doesn't
fit well in none of the existing classes.
One good option would be misc class but this enforces the usage of major 10.

So , the only solution remaining is using a "real" struct device. I'm
already using a struct cdev , and it is not very clear for me the
link between struct cdev and struct device.

Thanks,
Daniel.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux