From patchwork Wed Sep 11 18:01:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 173627 Delivered-To: patch@linaro.org Received: by 2002:ac9:19ad:0:0:0:0:0 with SMTP id d45csp1102162oce; Wed, 11 Sep 2019 11:01:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXqq4dF50ccqzzDUpPsSmMWw26dlv13BYgURXHFdqWY8OwZ1Eh3+y7Gnrq2FSzvwikPHQw X-Received: by 2002:aa7:d40c:: with SMTP id z12mr37954410edq.30.1568224889106; Wed, 11 Sep 2019 11:01:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568224889; cv=none; d=google.com; s=arc-20160816; b=UqeJEF4ppL6GCGIp97qsZD/iY/XpzvQ4Hw03E2qJIumdNUEuwkpdEXxuH8MDZTTKdQ hZYCBqGrj7O74nHaIWBu51PCQxivMqcLMP2QfoAiLfIopmcDJu5f9JdiuPtfSbFNj+xT YvUz3eHCAPzs7XD88sE+IPdHa3KigqTox+CtjlBKlZWojGEegkLvESXE0QL6T+sd2ayX xDyEkvh+A/RHDvOnKvmyds0e2Y2gLrC2nT/J2EHrO4QL4izCZt3ehhGp6JnTwEO9Xsjn dOO8GlEXygeXQ7tw5VAIORfYxjDYQIJW4Ngpp76lPMM34UV9Pe2MzGcd56vo0Nr5jxQ0 05Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=coD1uOdxeWd8XAcB+R0bOihiQUQwg0Kf1020vJsHpZg=; b=IxBmp8q9rhRO4DCht8SXWIWxebWn/ajGP2kTP6yOceA/t/Dhd54Qmw0kEGeA+1Vxfq bcAwyhOF6ARf7j5IobFo5T6NeCIiJmIoN+6f0JlztpTfEJkptk3c+8Lz7ZaxYYt+Bzl8 MA3U0DngFw2C0D06S34bx80ultlGqGQk8AYecZNLM3t/cCg4fbRAgwsNo2r9nrUevGpK Kafa5aSGC8LcZswqr082v/rIWTmE26YTZmpyIE6oWfEp7XSqhamML6tFE8/MU/Bz9n+A +qZzJ8myXK/fbjOM90wKCHZfpXgJwnO9Ooe9eLX2qktnO2X/YbL1Zma1if4dgyOdXmYg GFng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="t/vtKpft"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gy24si11079999ejb.166.2019.09.11.11.01.28; Wed, 11 Sep 2019 11:01:29 -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=@ti.com header.s=ti-com-17Q1 header.b="t/vtKpft"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729911AbfIKSB0 (ORCPT + 27 others); Wed, 11 Sep 2019 14:01:26 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:36758 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729794AbfIKSBY (ORCPT ); Wed, 11 Sep 2019 14:01:24 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8BI1JHT040469; Wed, 11 Sep 2019 13:01:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568224879; bh=coD1uOdxeWd8XAcB+R0bOihiQUQwg0Kf1020vJsHpZg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=t/vtKpftOUya76eG8Tur4ApoLK6nFIe9b8k+kx8k+oAG/+K1ltw70M02/KgVGMIdU c1tm7itEAgffKREwNVvEPZBScHhsMMfvUzLC7A/yfZSEJ/Pf+buSElqJLD/jJJa16u MaAadTjK6FuSvTPCM9jV0PvjRFeWdPS/xJEntp2w= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8BI1Jvf043774 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Sep 2019 13:01:19 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 11 Sep 2019 13:01:18 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 11 Sep 2019 13:01:18 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8BI1IjE011148; Wed, 11 Sep 2019 13:01:18 -0500 From: Dan Murphy To: , CC: , , , Dan Murphy Subject: [PATCH v5 9/9] leds: Update the lp55xx to use the multi color framework Date: Wed, 11 Sep 2019 13:01:15 -0500 Message-ID: <20190911180115.21035-10-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20190911180115.21035-1-dmurphy@ti.com> References: <20190911180115.21035-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the lp5523 to use the multi color framework. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp5523.c | 13 +++ drivers/leds/leds-lp55xx-common.c | 131 ++++++++++++++++++---- drivers/leds/leds-lp55xx-common.h | 9 ++ include/linux/platform_data/leds-lp55xx.h | 6 + modules.builtin.modinfo | Bin 0 -> 43550 bytes 5 files changed, 137 insertions(+), 22 deletions(-) create mode 100644 modules.builtin.modinfo diff --git a/modules.builtin.modinfo b/modules.builtin.modinfo new file mode 100644 index 0000000000000000000000000000000000000000..e528d8f57796621b6cfef52ad0da44551a482481 GIT binary patch literal 43550 zcmcJ2?Q+|=(x(2ta}}twKjNIV|YGNXqfd?pCE75g*+RpaC?x8;w!ycl>2BO|zrh@WId3MUofUG7gi1 zeg~})3e2M*O!DyPegBfbM`0dh(V~dbwg7R&B1P3KKT7wLVNdEs~*1raD&TW%EP{%{_8 z$ujnJp?sMy!eqo)j~204gn8kO!nyz0{k)8aVW!ft%EKT{M!70db?--o8it@MR9ToW z<0zS^ahAr)KvD#uCBbrIT+quXDO!sRe`l-q`ty7LG52P1KJiA&c%catrH(*Fo`QS> zy=zgLbTwK6!~ z@4|Uke=GZqt}61ZP6^D85PeSh2Vj3z##mgFbRUAxSzCdHsWxnda zDEmH+9+rzPb*__rl%&XHe(IiT7Enk4mBDPeP@}L21L_%dKMfNFb`IV8+B`W9g}hq+gzUJhDD-uJu_Q&}!TuRmGx`#imm{cP6dHn}8y zpGNDlhVv+nil#~v^wK=^ljXv!7{qukToj3t$gU`j`562siE;u8PCSI8EQp^SL!Ru(6%pY5rx8rD%cjPL6 z7EDt`liJMnjxMCe(L7YkJRH$lI$TC`{3uJ6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PGk=BfGN1({W#-0c3dAJu4;QdEO0l@z1IR+A>JDoMP))W~AJPPOQfrW_nXY=VNFuyT2qw6y*YD|Q#s literal 0 HcmV?d00001 -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index d0b931a136b9..8b2cdb98fed6 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c @@ -791,6 +791,18 @@ static ssize_t store_master_fader_leds(struct device *dev, return ret; } +static int lp5523_led_intensity(struct lp55xx_led *led, int chan_num) +{ + struct lp55xx_chip *chip = led->chip; + int ret; + + mutex_lock(&chip->lock); + ret = lp55xx_write(chip, LP5523_REG_LED_PWM_BASE + chan_num, + led->brightness); + mutex_unlock(&chip->lock); + return ret; +} + static int lp5523_led_brightness(struct lp55xx_led *led) { struct lp55xx_chip *chip = led->chip; @@ -857,6 +869,7 @@ static struct lp55xx_device_config lp5523_cfg = { .max_channel = LP5523_MAX_LEDS, .post_init_device = lp5523_post_init_device, .brightness_fn = lp5523_led_brightness, + .color_intensity_fn = lp5523_led_intensity, .set_led_current = lp5523_set_led_current, .firmware_cb = lp5523_firmware_loaded, .run_engine = lp5523_run_engine, diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index 44ced02b49f9..8408d625f8da 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c @@ -136,9 +136,26 @@ static int lp55xx_set_brightness(struct led_classdev *cdev, { struct lp55xx_led *led = cdev_to_lp55xx_led(cdev); struct lp55xx_device_config *cfg = led->chip->cfg; + int adj_value[LED_COLOR_ID_MAX]; + int ret; + int i; + + if (led->mc_cdev.num_leds > 1) { + led_mc_set_cluster_brightness(&led->mc_cdev, + brightness, adj_value); + for (i = 0; i < led->mc_cdev.num_leds; i++) { + led->brightness = adj_value[i]; + ret = cfg->color_intensity_fn(led, + led->grouped_channels[i]); + if (ret) + break; + } + } else { + led->brightness = (u8)brightness; + ret = cfg->brightness_fn(led); + } - led->brightness = (u8)brightness; - return cfg->brightness_fn(led); + return ret; } static int lp55xx_init_led(struct lp55xx_led *led, @@ -147,9 +164,9 @@ static int lp55xx_init_led(struct lp55xx_led *led, struct lp55xx_platform_data *pdata = chip->pdata; struct lp55xx_device_config *cfg = chip->cfg; struct device *dev = &chip->cl->dev; + int max_channel = cfg->max_channel; char name[32]; int ret; - int max_channel = cfg->max_channel; if (chan >= max_channel) { dev_err(dev, "invalid channel: %d / %d\n", chan, max_channel); @@ -159,10 +176,35 @@ static int lp55xx_init_led(struct lp55xx_led *led, if (pdata->led_config[chan].led_current == 0) return 0; + if (pdata->led_config[chan].name) { + led->cdev.name = pdata->led_config[chan].name; + } else { + snprintf(name, sizeof(name), "%s:channel%d", + pdata->label ? : chip->cl->name, chan); + led->cdev.name = name; + } + + if (pdata->led_config[chan].num_colors > 1) { + led->mc_cdev.led_cdev = &led->cdev; + led->cdev.brightness_set_blocking = lp55xx_set_brightness; + led->cdev.groups = lp55xx_led_groups; + led->mc_cdev.num_leds = pdata->led_config[chan].num_colors; + led->mc_cdev.available_colors = pdata->led_config[chan].available_colors; + memcpy(led->channel_color, + pdata->led_config[chan].channel_color, + sizeof(led->channel_color)); + memcpy(led->grouped_channels, + pdata->led_config[chan].grouped_channels, + sizeof(led->grouped_channels)); + } else { + + led->cdev.default_trigger = pdata->led_config[chan].default_trigger; + led->cdev.brightness_set_blocking = lp55xx_set_brightness; + } led->cdev.groups = lp55xx_led_groups; + led->led_current = pdata->led_config[chan].led_current; led->max_current = pdata->led_config[chan].max_current; led->chan_nr = pdata->led_config[chan].chan_nr; - led->cdev.default_trigger = pdata->led_config[chan].default_trigger; if (led->chan_nr >= max_channel) { dev_err(dev, "Use channel numbers between 0 and %d\n", @@ -170,18 +212,11 @@ static int lp55xx_init_led(struct lp55xx_led *led, return -EINVAL; } - led->cdev.brightness_set_blocking = lp55xx_set_brightness; - led->cdev.groups = lp55xx_led_groups; + if (pdata->led_config[chan].num_colors > 1) + ret = led_classdev_multicolor_register(dev, &led->mc_cdev); + else + ret = led_classdev_register(dev, &led->cdev); - if (pdata->led_config[chan].name) { - led->cdev.name = pdata->led_config[chan].name; - } else { - snprintf(name, sizeof(name), "%s:channel%d", - pdata->label ? : chip->cl->name, chan); - led->cdev.name = name; - } - - ret = led_classdev_register(dev, &led->cdev); if (ret) { dev_err(dev, "led register err: %d\n", ret); return ret; @@ -466,7 +501,6 @@ int lp55xx_register_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) dev_err(&chip->cl->dev, "empty brightness configuration\n"); return -EINVAL; } - for (i = 0; i < num_channels; i++) { /* do not initialize channels that are not connected */ @@ -538,6 +572,38 @@ void lp55xx_unregister_sysfs(struct lp55xx_chip *chip) } EXPORT_SYMBOL_GPL(lp55xx_unregister_sysfs); +static int lp5xx_parse_channel_child(struct device_node *np, + struct lp55xx_led_config *cfg, + int chan_num) +{ + struct device_node *child; + int num_colors = 0; + u32 color_id; + u32 led_number; + int ret; + + cfg[chan_num].default_trigger = + of_get_property(np, "linux,default-trigger", NULL); + + for_each_child_of_node(np, child) { + of_property_read_string(child, "chan-name", + &cfg[chan_num].name); + of_property_read_u8(child, "led-cur", + &cfg[chan_num].led_current); + of_property_read_u8(child, "max-cur", + &cfg[chan_num].max_current); + of_property_read_u32(child, "color", &color_id); + cfg[chan_num].channel_color[num_colors] = color_id; + set_bit(color_id, &cfg[chan_num].available_colors); + ret = of_property_read_u32(child, "reg", &led_number); + cfg[chan_num].grouped_channels[num_colors] = led_number; + num_colors++; + } + cfg[chan_num].num_colors = num_colors; + + return 0; +} + struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, struct device_node *np) { @@ -545,7 +611,10 @@ struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, struct lp55xx_platform_data *pdata; struct lp55xx_led_config *cfg; int num_channels; + int channel_color; + u32 led_number; int i = 0; + int ret; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) @@ -565,13 +634,31 @@ struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, pdata->num_channels = num_channels; for_each_child_of_node(np, child) { - cfg[i].chan_nr = i; + ret = of_property_read_u32(child, "color", &channel_color); + if (ret) { + dev_err(dev,"Missing color property setting white\n"); + channel_color = LED_COLOR_ID_WHITE; + } - of_property_read_string(child, "chan-name", &cfg[i].name); - of_property_read_u8(child, "led-cur", &cfg[i].led_current); - of_property_read_u8(child, "max-cur", &cfg[i].max_current); - cfg[i].default_trigger = - of_get_property(child, "linux,default-trigger", NULL); + if (channel_color == LED_COLOR_ID_MULTI) + lp5xx_parse_channel_child(child, cfg, i); + else { + of_property_read_string(child, "chan-name", + &cfg[i].name); + of_property_read_u8(child, "led-cur", + &cfg[i].led_current); + of_property_read_u8(child, "max-cur", + &cfg[i].max_current); + cfg[i].default_trigger = + of_get_property(child, "linux,default-trigger", + NULL); + of_property_read_u32(child, "reg", &led_number); + + if (led_number < 0 || led_number > 6) + return ERR_PTR(EINVAL); + + cfg[i].chan_nr = led_number; + } i++; } diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h index 783ed5103ce5..d9c114259dcb 100644 --- a/drivers/leds/leds-lp55xx-common.h +++ b/drivers/leds/leds-lp55xx-common.h @@ -12,6 +12,8 @@ #ifndef _LEDS_LP55XX_COMMON_H #define _LEDS_LP55XX_COMMON_H +#include + enum lp55xx_engine_index { LP55XX_ENGINE_INVALID, LP55XX_ENGINE_1, @@ -109,6 +111,9 @@ struct lp55xx_device_config { /* access brightness register */ int (*brightness_fn)(struct lp55xx_led *led); + /* access specific brightness register */ + int (*color_intensity_fn)(struct lp55xx_led *led, int chan_num); + /* current setting function */ void (*set_led_current) (struct lp55xx_led *led, u8 led_current); @@ -159,6 +164,7 @@ struct lp55xx_chip { * struct lp55xx_led * @chan_nr : Channel number * @cdev : LED class device + * @mc_cdev : Multi color class device * @led_current : Current setting at each led channel * @max_current : Maximun current at each led channel * @brightness : Brightness value @@ -167,9 +173,12 @@ struct lp55xx_chip { struct lp55xx_led { int chan_nr; struct led_classdev cdev; + struct led_classdev_mc mc_cdev; u8 led_current; u8 max_current; u8 brightness; + int channel_color[LED_COLOR_ID_MAX]; + int grouped_channels[LED_COLOR_ID_MAX]; struct lp55xx_chip *chip; }; diff --git a/include/linux/platform_data/leds-lp55xx.h b/include/linux/platform_data/leds-lp55xx.h index 96a787100fda..0ac29f537ab6 100644 --- a/include/linux/platform_data/leds-lp55xx.h +++ b/include/linux/platform_data/leds-lp55xx.h @@ -12,6 +12,8 @@ #ifndef _LEDS_LP55XX_H #define _LEDS_LP55XX_H +#include + /* Clock configuration */ #define LP55XX_CLOCK_AUTO 0 #define LP55XX_CLOCK_INT 1 @@ -23,6 +25,10 @@ struct lp55xx_led_config { u8 chan_nr; u8 led_current; /* mA x10, 0 if led is not connected */ u8 max_current; + int num_colors; + unsigned long available_colors; + u32 channel_color[LED_COLOR_ID_MAX]; + int grouped_channels[LED_COLOR_ID_MAX]; }; struct lp55xx_predef_pattern {