Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754563AbbBQX70 (ORCPT ); Tue, 17 Feb 2015 18:59:26 -0500 Received: from mail-ie0-f172.google.com ([209.85.223.172]:35064 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752945AbbBQX7Y (ORCPT ); Tue, 17 Feb 2015 18:59:24 -0500 MIME-Version: 1.0 In-Reply-To: References: <1423657572-22299-1-git-send-email-ricardo.ribalda@gmail.com> From: Bryan Wu Date: Tue, 17 Feb 2015 15:59:01 -0800 Message-ID: Subject: Re: [PATCH] led/led-class: Handle LEDs with the same name To: Ricardo Ribalda Delgado Cc: Richard Purdie , Linux LED Subsystem , lkml Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1226 Lines: 31 On Tue, Feb 17, 2015 at 3:47 PM, Ricardo Ribalda Delgado wrote: > Hi > > On Wed, Feb 18, 2015 at 12:35 AM, Bryan Wu wrote: > >> So why not use name "red0" and name another one "red1"? since you have >> multiple different red leds here any way. > > I cannot control how many cameras the user will decide to attach to > the system, and if two similar cameras are attached to pciA and pciB, > they would try to load the same dt. > DT just describe the hardware, so if it's a different hardware, they should have different name. red0 for GPIO 0, red1 for GPIO 1 or choose other good name instead of 0 and 1. If this is true, you can just name one LED like gpio-led and let the kernel to add number after that name. I don't think this is a good idea to name the hardware. And These aren't like other devices which will create device node like /dev/video0 /dev/video1. This is from device tree to describe the hardware. Thanks, -Bryan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/