Re: creating a sysfs directory

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

 



Hi Greg,

On 9/3/07, Greg KH <greg@xxxxxxxxx> wrote:
> On Mon, Sep 03, 2007 at 04:22:40PM -0400, Felipe Balbi wrote:
> > Hi
> >
> > On 9/3/07, Greg KH <greg@xxxxxxxxx> wrote:
> > > On Mon, Sep 03, 2007 at 10:40:10AM -0400, Felipe Balbi wrote:
> > > > Hello all,
> > > >
> > > > How could I create a new directory under sysfs??
> > > >
> > > > I want to create the following directory structure for usb devices:
> > > >
> > > > $PWD = /sys/class/usb_device/usbdevB.D/device
> > > >
> > > > ls $PWD/otg
> > > > (some attributes will go here)
> > > >
> > > > ls $PWD/otg/whitelist
> > > > (other attributes will go here)
> > > >
> > > > How could I create directories 'otg' and 'otg/whitelist' ??
> > >
> > > Why do you want to create subdirectories for all usb devices?
> > >
> > > Anyway, just use the sysfs_create_dir() if you really want to do this
> > > (and I think, in the end, you really don't, but that conversation should
> > > be on the linux-usb-devel mailing list where you present what you feel
> > > these extra sysfs files will do for you...)
> >
> > Thanks Greg...
> >
> > I'll sending a preliminary patch series soon... I hope you all
> > understand why I need such new directories ;-)
>
> I really do not.  If you have OTG specific attributes that are
> applicable for this specific USB device, just put them in the same
> directory as the device itself.  No subdir needed at all.  If you have
> namespace conflicts with files already in that directory, just use a
> common prefix ("otg_" perhaps?)

This is not only for this device... this would apply to any USB OTG
Controller/transceiver...

The attributes I'll be exporting will ease the activities during usb
certification.

I'll finish those patches and send to you privately... they're not
ready to be published yet ;-)

Thanks

>
> thanks,
>
> greg k-h
>


-- 
Best Regards,

Felipe Balbi
felipebalbi@xxxxxxxxxxxxxxxxxxxxx

--
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