Re: Strange location and name for platform devices when device-tree is used.

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

 




On Fri, 2013-11-01 at 16:03 +1100, NeilBrown wrote:

> Do you mean we could allow multiple devices on the one bus to have the same
> name, but get sysfs to notice and de-duplicate by mangling one name?  I don't
> think I like that but I might have misunderstood.

What other option do we have ?

> On my device I seem to have some platform devices registered through
> device-tree, and some registered through platform_device_add (e.g.
> 'alarmtimer').  Guaranteeing they remain disjoint sets if the kernel is
> allowed to evolve independently of the devicetree might be tricky....
> Maybe we need "/sys/devices/platform" and "/sys/devices/dt_platform" ??

No, I think device-tree created platform devices should go
to /sys/devices/platform like the "classic" ones.

The problem is really how to deal with potential name duplication. We
could try to register, if we get -EEXIST (assuming sysfs returns the
right stuff), try again with ".1" etc...

> Hoping someone who understands the device model better than me will help.

Greg ? :-)

 .../...

> The  'backlight' device is a virtual device.  It uses a 'pwm' device to
> provide the variable brightness to the back light.
> 
> The 'pwm' device itself is virtual, making use of a 'dmtimer' to provide the
> timing...  The timer device (timer11 in omap3.dtsi) has a 'reg' property.
> 
> A random example from current mainline is 
>   arch/arm/boot/dts/am335x-evmsk.dts
> which has 'backlight' as a virtual device compatible with pwm-backlight.
> It also has  'gpio-keys', 'gpio-leds', and 'regulator-fixed' compatible
> virtual devices.  They seem fairly common.

Ok.

Cheers,
Ben.

> Thanks,
> NeilBrown
> 
> 
> > 
> > Cheers,
> > Ben.
> > 
> > > Cheers,
> > > Ben.
> > > 
> > > > Any help understanding and/or fixing this discrepancy greatly appreciated.
> > > > 
> > > > The change of name is particularly annoying to me because one of my platform
> > > > devices is a pwm_bl.c backlight.  With a boardfile I
> > > > get /sys/class/pwm_backlight.  With devicetree the best I can get
> > > > is /sys/class/pwm_backlight.23 (or similar).  It would be really nice to have
> > > > a more stable and sensible name here.
> > > 
> > 
> 


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux