* Re: [PATCH v27 12/15] leds: lp5523: Update the lp5523 code to add multicolor brightness function
@ 2020-06-09 6:38 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-06-09 6:38 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3196 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200608193917.13084-13-dmurphy@ti.com>
References: <20200608193917.13084-13-dmurphy@ti.com>
TO: Dan Murphy <dmurphy@ti.com>
TO: jacek.anaszewski(a)gmail.com
TO: pavel(a)ucw.cz
CC: devicetree(a)vger.kernel.org
CC: linux-leds(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: Dan Murphy <dmurphy@ti.com>
Hi Dan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pavel-linux-leds/for-next]
[also build test WARNING on robh/for-next v5.7 next-20200608]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dan-Murphy/Multicolor-Framework-v27/20200609-034319
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: x86_64-randconfig-m001-20200607 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/leds/leds-lp5523.c:810 lp5523_multicolor_brightness() error: uninitialized symbol 'ret'.
# https://github.com/0day-ci/linux/commit/9e1a8e50ad52b8552435409f69eed2d3155e903c
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 9e1a8e50ad52b8552435409f69eed2d3155e903c
vim +/ret +810 drivers/leds/leds-lp5523.c
52da81eafaff13 Toshi Kikuchi 2015-05-11 793
9e1a8e50ad52b8 Dan Murphy 2020-06-08 794 static int lp5523_multicolor_brightness(struct lp55xx_led *led)
9e1a8e50ad52b8 Dan Murphy 2020-06-08 795 {
9e1a8e50ad52b8 Dan Murphy 2020-06-08 796 struct lp55xx_chip *chip = led->chip;
9e1a8e50ad52b8 Dan Murphy 2020-06-08 797 int ret;
9e1a8e50ad52b8 Dan Murphy 2020-06-08 798 int i;
9e1a8e50ad52b8 Dan Murphy 2020-06-08 799
9e1a8e50ad52b8 Dan Murphy 2020-06-08 800 mutex_lock(&chip->lock);
9e1a8e50ad52b8 Dan Murphy 2020-06-08 801 for (i = 0; i < led->mc_cdev.num_colors; i++) {
9e1a8e50ad52b8 Dan Murphy 2020-06-08 802 ret = lp55xx_write(chip,
9e1a8e50ad52b8 Dan Murphy 2020-06-08 803 LP5523_REG_LED_PWM_BASE +
9e1a8e50ad52b8 Dan Murphy 2020-06-08 804 led->mc_cdev.subled_info[i].channel,
9e1a8e50ad52b8 Dan Murphy 2020-06-08 805 led->mc_cdev.subled_info[i].brightness);
9e1a8e50ad52b8 Dan Murphy 2020-06-08 806 if (ret)
9e1a8e50ad52b8 Dan Murphy 2020-06-08 807 break;
9e1a8e50ad52b8 Dan Murphy 2020-06-08 808 }
9e1a8e50ad52b8 Dan Murphy 2020-06-08 809 mutex_unlock(&chip->lock);
9e1a8e50ad52b8 Dan Murphy 2020-06-08 @810 return ret;
9e1a8e50ad52b8 Dan Murphy 2020-06-08 811 }
9e1a8e50ad52b8 Dan Murphy 2020-06-08 812
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36733 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v27 00/15] Multicolor Framework v27
@ 2020-06-08 19:39 Dan Murphy
2020-06-08 19:39 ` [PATCH v27 12/15] leds: lp5523: Update the lp5523 code to add multicolor brightness function Dan Murphy
0 siblings, 1 reply; 2+ messages in thread
From: Dan Murphy @ 2020-06-08 19:39 UTC (permalink / raw)
To: jacek.anaszewski, pavel; +Cc: devicetree, linux-leds, linux-kernel, Dan Murphy
Hello
This is the multi color LED framework. This framework presents clustered
colored LEDs into an array and allows the user space to adjust the brightness
of the cluster using a single file write. The individual colored LEDs
intensities are controlled via a single file that is an array of LEDs
Dan
Dan Murphy (15):
dt: bindings: Add multicolor class dt bindings documention
leds: Add multicolor ID to the color ID list
leds: multicolor: Introduce a multicolor class definition
dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers
leds: lp50xx: Add the LP50XX family of the RGB LED driver
dt-bindings: leds: Convert leds-lp55xx to yaml
ARM: dts: n900: Add reg property to the LP5523 channel node
ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 channel node
ARM: dts: ste-href: Add reg property to the LP5521 channel nodes
leds: lp55xx: Convert LED class registration to devm_*
leds: lp55xx: Add multicolor framework support to lp55xx
leds: lp5523: Update the lp5523 code to add multicolor brightness
function
leds: lp5521: Add multicolor framework multicolor brightness support
leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros
leds: lp5523: Fix various formatting issues in the code
.../ABI/testing/sysfs-class-led-multicolor | 36 +
.../bindings/leds/leds-class-multicolor.yaml | 37 +
.../devicetree/bindings/leds/leds-lp50xx.yaml | 130 +++
.../devicetree/bindings/leds/leds-lp55xx.txt | 228 -----
.../devicetree/bindings/leds/leds-lp55xx.yaml | 218 +++++
Documentation/leds/index.rst | 1 +
Documentation/leds/leds-class-multicolor.rst | 88 ++
arch/arm/boot/dts/imx6dl-yapp4-common.dtsi | 14 +-
arch/arm/boot/dts/omap3-n900.dts | 29 +-
arch/arm/boot/dts/ste-href.dtsi | 22 +-
drivers/leds/Kconfig | 24 +
drivers/leds/Makefile | 2 +
drivers/leds/led-class-multicolor.c | 210 +++++
drivers/leds/led-core.c | 1 +
drivers/leds/leds-lp50xx.c | 783 ++++++++++++++++++
drivers/leds/leds-lp5521.c | 43 +-
drivers/leds/leds-lp5523.c | 62 +-
drivers/leds/leds-lp5562.c | 22 +-
drivers/leds/leds-lp55xx-common.c | 212 +++--
drivers/leds/leds-lp55xx-common.h | 16 +-
drivers/leds/leds-lp8501.c | 23 +-
include/dt-bindings/leds/common.h | 3 +-
include/linux/led-class-multicolor.h | 121 +++
include/linux/platform_data/leds-lp55xx.h | 8 +
24 files changed, 1978 insertions(+), 355 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-class-led-multicolor
create mode 100644 Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
create mode 100644 Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
delete mode 100644 Documentation/devicetree/bindings/leds/leds-lp55xx.txt
create mode 100644 Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
create mode 100644 Documentation/leds/leds-class-multicolor.rst
create mode 100644 drivers/leds/led-class-multicolor.c
create mode 100644 drivers/leds/leds-lp50xx.c
create mode 100644 include/linux/led-class-multicolor.h
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v27 12/15] leds: lp5523: Update the lp5523 code to add multicolor brightness function
2020-06-08 19:39 [PATCH v27 00/15] Multicolor Framework v27 Dan Murphy
@ 2020-06-08 19:39 ` Dan Murphy
0 siblings, 0 replies; 2+ messages in thread
From: Dan Murphy @ 2020-06-08 19:39 UTC (permalink / raw)
To: jacek.anaszewski, pavel; +Cc: devicetree, linux-leds, linux-kernel, Dan Murphy
Add the multicolor brightness call back to support the multicolor
framework. This call back allows setting brightness on grouped channels
in a single function.
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
drivers/leds/Kconfig | 1 +
drivers/leds/leds-lp5523.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 8fe94f3571e2..869b299a9eed 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -408,6 +408,7 @@ config LEDS_LP5521
config LEDS_LP5523
tristate "LED Support for TI/National LP5523/55231 LED driver chip"
depends on LEDS_CLASS && I2C
+ depends on LEDS_CLASS_MULTI_COLOR || !LEDS_CLASS_MULTI_COLOR
select LEDS_LP55XX_COMMON
help
If you say yes here you get support for TI/National Semiconductor
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index b076c16df9ab..9776dc72a764 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -791,6 +791,25 @@ static ssize_t store_master_fader_leds(struct device *dev,
return ret;
}
+static int lp5523_multicolor_brightness(struct lp55xx_led *led)
+{
+ struct lp55xx_chip *chip = led->chip;
+ int ret;
+ int i;
+
+ mutex_lock(&chip->lock);
+ for (i = 0; i < led->mc_cdev.num_colors; i++) {
+ ret = lp55xx_write(chip,
+ LP5523_REG_LED_PWM_BASE +
+ led->mc_cdev.subled_info[i].channel,
+ led->mc_cdev.subled_info[i].brightness);
+ if (ret)
+ break;
+ }
+ mutex_unlock(&chip->lock);
+ return ret;
+}
+
static int lp5523_led_brightness(struct lp55xx_led *led)
{
struct lp55xx_chip *chip = led->chip;
@@ -857,6 +876,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,
+ .multicolor_brightness_fn = lp5523_multicolor_brightness,
.set_led_current = lp5523_set_led_current,
.firmware_cb = lp5523_firmware_loaded,
.run_engine = lp5523_run_engine,
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-09 6:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 6:38 [PATCH v27 12/15] leds: lp5523: Update the lp5523 code to add multicolor brightness function kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2020-06-08 19:39 [PATCH v27 00/15] Multicolor Framework v27 Dan Murphy
2020-06-08 19:39 ` [PATCH v27 12/15] leds: lp5523: Update the lp5523 code to add multicolor brightness function Dan Murphy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.