[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    RE: devfs problem,
From:       <Lin.Colin () iac ! com ! tw>
Date:       2004-07-12 9:22:43
Message-ID: B38CF30B366CA2479DDECF0B5B228B2508D559 () nt52 ! IEC2 ! IAC
[Download RAW message or body]


Hi matthias,

> But until you mount the root filesystem, there won't be a /dev anyway. If your 
> driver is in kernel, it will be initialized before / is mounted, so you would 
> not have device files anyway, regardless of devfs, would you?

Ok, I see.

> Isn't there another way to do i2c from your USB driver but using file 
> operations from inside the kernel?

Why USB driver wants to use file operations to i2c is that it requires i2c's internal data:
			if (!IS_ERR(i2c_file = filp_open(filename, O_RDWR, 0))) {
				omap_i2c_client = (struct i2c_client *) i2c_file->private_data;
							......

I am curious that if the USB device driver from Montavista can work well without modifying.

Regards,
Colin


-----Original Message-----
From: Matthias Welwarsky [mailto:mwelwarsky@web.de] 
Sent: Friday, July 09, 2004 6:06 PM
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: Lin, Colin(林建安 IAC); Vadim.Yatsenko@malva.ua
Subject: Re: devfs problem, OMAP USB device driver cannot open I2C device fi le

On Friday 09 July 2004 11:50, Lin.Colin@iac.com.tw wrote:
> Hi,
> What do you mean?
> I once tried to create /dev/i2c-0 and I found that it will disappear after
> the system reboots. /dev is created by devfs and the device file you create
> in /dev won't be saved. Because the USB device driver is embedded in
> kernel, it won’t search out "/dev/i2c-0" when kernel is booting. Why I
> donot compile USB device driver as module? That's because I want to use
> KGDB to debug it.

But until you mount the root filesystem, there won't be a /dev anyway. If your 
driver is in kernel, it will be initialized before / is mounted, so you would 
not have device files anyway, regardless of devfs, would you?

Isn't there another way to do i2c from your USB driver but using file 
operations from inside the kernel?

regards,
	matthias


>
> Regards,
> Colin
>
> -----Original Message-----
> From: Vadim Yatsenko [mailto:Vadim.Yatsenko@malva.ua]
> Sent: Friday, July 09, 2004 5:15 PM
> To: Lin, Colin(林建安 IAC)
> Cc: linux-arm
> Subject: Re: devfs problem, OMAP USB device driver cannot open I2C device
> file
>
> Did you try to use none devfs names: i.e. /dev/i2c0 ?
>
> ----- Original Message -----
> From: <Lin.Colin@iac.com.tw>
> To: <linux-arm-kernel@lists.arm.linux.org.uk>
> Sent: Friday, July 09, 2004 9:46 AM
> Subject: devfs problem, OMAP USB device driver cannot open I2C device file
>
>
>
> Hello all,
> I am now developing OMAP 1610 USB driver.
> The Linux is from Montavista, and it uses devfs, but no uses devfsd daemon.
> Both USB and I2C drivers are all compiled in kernel.
> Its USB driver will make use of I2C, and it try to open "/dev/i2c/0".
> The problem is, it will fail to open it in USB driver because, I think,
> devfs will mount "/dev/" later than USB driver open "/dev/i2c/0".
> Before devfs mounts "/dev/", "/dev/i2c/0" is not there.
> How can I do to solve this problem?
>
> Thanks and regards,
> Colin
>
>
> -------------------------------------------------------------------
> Subscription options:
> http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
> FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
> Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
>
>
> -------------------------------------------------------------------
> Subscription options:
> http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ:      
> http://www.arm.linux.org.uk/armlinux/mlfaq.php
> Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic