lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Feb 2015 02:11:16 +0100
From:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:	Bryan Wu <cooloney@...il.com>
Cc:	Rob Herring <robh+dt@...nel.org>,
	Richard Purdie <rpurdie@...ys.net>,
	Linux LED Subsystem <linux-leds@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] led/led-class: Handle LEDs with the same name

Hello Bryan

On Wed, Feb 18, 2015 at 1:52 AM, Bryan Wu <cooloney@...il.com> wrote:
>>
>> Lets say that we have a type of add-on card. Described by this DT
>> overlay (card.dtb):
>>
>
> I think who write this card.dtb should understand this issue. And
> choose the right name.

card.dtb just describe the hardware in the card, and it is not be
aware of the rest of the system.

I dont think it is practical to have card_HOST0_PCI1.dtb,
card_HOST0_PCI2.dtb to HOST0_PCI16.dtb and then HOST1_, HOST2....

>> gpio_0: gpio_0 {
>What happen if you just use name 'gpio: gpio {' here.? Any conflicts
>or kernel oops?

No problem here, one will create the device

/sys/devices/pci0000:00/0000:00:05.0/0000:01:00.0/30040000.gpio

and the other:

/sys/devices/pci0000:00/0000:00:06.0/0000:01:00.0/40040000.gpio

Name is created with hierarnchy

/sys/class/gpio/  will also work fine, because the gpiochip id is
created dynamically

On the other hand all the leds are under,

/sys/class/leds/NAME

Do not have any dynamic naming or hierarchical name.


> So you're supposed to get 2 card.dtb files for 2 PCI cards, right?
> They should be different and you need to choose different name for the
> hardware.

There is only one card.dtb because both cards are identical cards,
they are just connected to different ports

>
> From device tree point of view, I believe different device should got
> different name although they can match to same compatible string. Let
> me invite DT folks for help.

Another example of duplicated names could be partitions on an mtd. You
can have two devices with a partition called Golden.

If my memory is right, you can even have two partition with the same
name on the same device. The offset of the partition will be part of
the name in that case.

>
> Thanks,
> -Bryan

Thanks!

-- 
Ricardo Ribalda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ