Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753400AbbBQXfh (ORCPT ); Tue, 17 Feb 2015 18:35:37 -0500 Received: from mail-ig0-f172.google.com ([209.85.213.172]:56532 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752444AbbBQXfg (ORCPT ); Tue, 17 Feb 2015 18:35:36 -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:35:14 -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: 2233 Lines: 90 On Tue, Feb 17, 2015 at 2:54 PM, Ricardo Ribalda Delgado wrote: > Hello Bryan > > On Tue, Feb 17, 2015 at 11:34 PM, Bryan Wu wrote: >> >> Can you show me your device tree code for overlaying describing a camera? >> > > The camera is composed by fpga modules. The fpga is attached via pcie > to the host. > > The whole dt would be too long. > > Here you can see the relevant parts > > &axi1 { > > > packer_0: packer_0{ > #address-cells = <1>; > #size-cells = <1>; > compatible = "qtec,axi_matrix_packer-1.00.a"; > reg = < 0x30060000 0x10000 >; > qtec,serial_number = "Invalid Head Serial Number"; > qtec,bitstream_version = < 0 >; > qtec,head_i2c_address = < 0 >; > qtec,cdma = <&cdma_0>; > qtec,desc_mem= <&cdma_desc_mem>; > qtec,pcie_bridge= <&pcie_bridge_0>; > qtec,aperture-addr= < 0 4 >; > qtec,circular_buffer= <&video_mem>; > qtec,white_balance= <&white_0>; > qtec,sensor = <&ccd_fg_0>; > qtec,pll = < &pll_0 >; > qtec,xform = <&xform_0>; > qtec,testgen = <&testgen_0>; > qtec,encoder = <&encoder_0>; > interrupt-parent = <&xps_intc_0>; > interrupts = < 5 2 >; > }; > > gpio_0: gpio_0 { > #gpio-cells = <2>; > compatible = "xlnx,xps-gpio-1.00.a"; > reg = < 0x30040000 010000 >; > xlnx,dout-default = < 0xffffffff >; > xlnx,tri-default = < 0xfffffff8 >; > xlnx,gpio-width = < 5 >; > }; > > > /*Leds*/ > leds { > reg = < 0x30040000 010000 >; > compatible = "gpio-leds"; > red { So why not use name "red0" and name another one "red1"? since you have multiple different red leds here any way. -Bryan > gpios = <&gpio_0 0 0>; > linux,default-trigger = "drop-qt5023_video0"; > }; > yellow { > gpios = <&gpio_0 1 0>; > linux,default-trigger = "packer-qt5023_video0"; > }; > green { > gpios = <&gpio_0 2 0>; > linux,default-trigger = "heartbeat"; > }; > }; > > > If there are multiple cameras, then there will be multiple red, yellow > and green leds, throwing out the error I copied earlier. > > > Thanks! > > -- > Ricardo Ribalda -- 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/