Received: by 10.192.165.148 with SMTP id m20csp408862imm; Fri, 27 Apr 2018 00:40:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrZM+95YsFa6kxU7aISz9sjlhqeLCS5B/wKd3cU87DOOWPVdMiQgSaYqRVxEIp5LCfE+gU/ X-Received: by 2002:a63:7702:: with SMTP id s2-v6mr1165442pgc.399.1524814811845; Fri, 27 Apr 2018 00:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524814811; cv=none; d=google.com; s=arc-20160816; b=y8sB0efO8xws53lkc7b/+CQB5rQNjstqeMuVgbzrTEkFfawS88LOfq484Gr/NiycRl VUMCD+562rChMQkCT4Wop4laqkb5fSmUo4BqkLmfA2uy97XZ98T8ay3qRd5ZuESCVUnj 4/U2EfkFqiPTR2Z/nXWE1OywSPPWcbxt8SZDHYxXoMrDclSuf/e0Jumog/Rax0Hd62Bt gE0wndrG/a+r+oTfcdLn8piIQNpvbvrjuMmqV3NX0pyz4zB6O1i2rG/IdIxgOKJt4HLs TU/+g/psNIo6GV80qz9jkihsrzzrMVj/hL5S581j9gUc8YEQvazR0VNKgJAsik380xFv /rvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=1+XEFRdHQzuAFuHnutfIZw8HVBuAq9g0uG0srCL+6Bw=; b=GAiVtGgUZdGIFpvIOx4cnZxxZGC+nZXtR3ba1bAXZ8tqhGwONxV65U/8YZyZuHCJ5z PydLgEMP/pi7fB5XIUZIPGPwDAEC2Cnbdl5+pYXeUdPSHuPBNXquAXwHG2N8cESm1Mce R3kbb/dLQL2EtuqVm8tsEkk7xewfDfRAFg2ar7uSRhwsYPDbN53OKHFnvIuqf4y3mu1U wWjr4g2pwqc0SKGPJE5C3kKTxPdcoca8YRaPbLGCC1Ujjk22r3VeHjI1fpXZ2Rt0cXM/ EaDVJ6Vb3BA5I/uT3hSGo005fZFTrao+yQpzlLUfNoaJ2zUpppibi/sfNPIHt0YZaMsm Ys1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiI8CguR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3-v6si731722pgc.463.2018.04.27.00.39.57; Fri, 27 Apr 2018 00:40:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiI8CguR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757621AbeD0Hiu (ORCPT + 99 others); Fri, 27 Apr 2018 03:38:50 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:50510 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757530AbeD0Hir (ORCPT ); Fri, 27 Apr 2018 03:38:47 -0400 Received: by mail-wm0-f67.google.com with SMTP id t11so1026065wmt.0 for ; Fri, 27 Apr 2018 00:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=1+XEFRdHQzuAFuHnutfIZw8HVBuAq9g0uG0srCL+6Bw=; b=iiI8CguRdfjK0PJm2Mx9g3iJl7xCcXx26CNpC+uQfNnCMxJEyzb1T9PE+PlGzD3rF/ 6wLeRu/BaB1EHhkPffMILQmd9DMN1/cdTw/fXk9if8lwvzCExOrTQIhOd+g2r1pPuxOm WbM52QU3JsRn/LbDVOSOq7FY3eDrYgGHrrcco= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1+XEFRdHQzuAFuHnutfIZw8HVBuAq9g0uG0srCL+6Bw=; b=fJBer7T1DXRwcmxuJSmIsb34A2u2RhF+vkpaq0aosJ908H9c7718vqtl16sRpvROBr Q88Q6f+oeV6AxVYA6uHw1iTyEehQtX/K/fmJh1NpeWJ17joJS5tMd9l3wFBtVtavXuUf L4Rz1Wp649I1SwO8FShlkfZ84ZQA+HxrnzSs13SozhOvof/2yXL/UfGdIytOLegbNktw yh1JdVczAI/EtpjNLBU7knJVYUTbyDu2WJ71qJZsNF81VNKX7Q4z7HznjGsvvv2U1fQW lo7hYPRMXyTAb37YFhoI/oBpZ2aAfEkW18rOhqUW9d3nybthdb4L+XMvwExWro+ppE2i +v9w== X-Gm-Message-State: ALQs6tDI77BOR5jj1Y4LfB3M4/V3jbOB+1Vk8lNsMzEfWF9kpT4wx/ZJ fgLjUaV3Om2j1lZ+qusOAMX8kg== X-Received: by 10.28.249.14 with SMTP id x14mr576493wmh.63.1524814726423; Fri, 27 Apr 2018 00:38:46 -0700 (PDT) Received: from dell ([2.27.167.55]) by smtp.gmail.com with ESMTPSA id z18-v6sm943896wrc.36.2018.04.27.00.38.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Apr 2018 00:38:45 -0700 (PDT) Date: Fri, 27 Apr 2018 08:38:43 +0100 From: Lee Jones To: Javier Arteaga Cc: Jacek Anaszewski , Pavel Machek , Dan O'Donovan , Andy Shevchenko , Mika Westerberg , Heikki Krogerus , Linus Walleij , linux-gpio@vger.kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support Message-ID: <20180427073843.ljeswd5tn6z3z4wc@dell> References: <20180421085009.28773-1-javier@emutex.com> <20180421085009.28773-3-javier@emutex.com> <20180426073314.g2ccjjkx6vgbknhm@dell> <20180426130354.4kidtdwcsxtn5f2g@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180426130354.4kidtdwcsxtn5f2g@localhost> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Apr 2018, Javier Arteaga wrote: [...] > > > static const struct regmap_range upboard_up2_readable_ranges[] = { > > > @@ -116,7 +124,18 @@ static const struct regmap_config upboard_up2_regmap_config = { > > > .wr_table = &upboard_up2_writable_table, > > > }; > > > > > > +static struct upboard_led_data upboard_up2_led_data[] = { > > > + { .id = 0, .color = "blue" }, > > > + { .id = 1, .color = "yellow" }, > > > + { .id = 2, .color = "green" }, > > > + { .id = 3, .color = "red" }, > > > +}; > > > > How is this data used? > > > > Does it ever change, from board to board? > > This provides indexes into the LED control register, so the leds driver > knows which regmap bits to flip, and maps them to color names, so it can > name the led devices accordingly. The mapping does change for each board > (UP1 has 3 LEDs, UP Core depends on the carrier board). I think this information should live in the driver which consumes it. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog