Skip to contentSkip to conversation

leds: pca9685: Remove leds-pca9685 driver

RFC PATCH In review Axel Lin 4 participants 5 messages Apr 6, 2014 – Apr 7, 2014 LED

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

RFC PATCH 1/1 leds: pca9685: Remove leds-pca9685 driver

This driver is replaced by pwm-pca9685 driver and there is no user uses this driver in current tree. So remove it.

---
Hi,
I found there is a modalias conflict between leds-pca9685.ko and pwm-pca9685.ko. I think this conflict will cause problem.
After checking the code, I think leds-pca9685 is replaced by pwm-pca9685. Use git grep to check current tree and found there is no user uses leds-pca9685. So this patch removes leds-pca9685 driver.

(I forgot to CC mailing list, so here is a resend) Regards,
Axel

 drivers/leds/Kconfig                       |  10 --
 drivers/leds/Makefile                      |   1 -
 drivers/leds/leds-pca9685.c                | 213 -----------------------------
 include/linux/platform_data/leds-pca9685.h |  35 -----
 4 files changed, 259 deletions(-)
 delete mode 100644 drivers/leds/leds-pca9685.c
 delete mode 100644 include/linux/platform_data/leds-pca9685.h
drivers/leds/Kconfig +0 -10
index 2062682..3e8a92b 100644
@@ -297,16 +297,6 @@ config LEDS_PCA963X
 	  LED driver chip accessed via the I2C bus. Supported
 	  devices include PCA9633 and PCA9634
 
-config LEDS_PCA9685
-	tristate "LED support for PCA9685 I2C chip"
-	depends on LEDS_CLASS
-	depends on I2C
-	help
-	  This option enables support for LEDs connected to the PCA9685
-	  LED driver chip accessed via the I2C bus.
-	  The PCA9685 offers 12-bit PWM (4095 levels of brightness) on
-	  16 individual channels.
-
 config LEDS_WM831X_STATUS
 	tristate "LED support for status LEDs on WM831x PMICs"
 	depends on LEDS_CLASS
drivers/leds/Makefile +0 -1
index 3cd76db..8979b0b 100644
@@ -36,7 +36,6 @@ obj-$(CONFIG_LEDS_OT200)		+= leds-ot200.o
 obj-$(CONFIG_LEDS_FSG)			+= leds-fsg.o
 obj-$(CONFIG_LEDS_PCA955X)		+= leds-pca955x.o
 obj-$(CONFIG_LEDS_PCA963X)		+= leds-pca963x.o
-obj-$(CONFIG_LEDS_PCA9685)		+= leds-pca9685.o
 obj-$(CONFIG_LEDS_DA903X)		+= leds-da903x.o
 obj-$(CONFIG_LEDS_DA9052)		+= leds-da9052.o
 obj-$(CONFIG_LEDS_WM831X_STATUS)	+= leds-wm831x-status.o
drivers/leds/leds-pca9685.c deleted +0 -213

213 lines not on this page · raw message

include/linux/platform_data/leds-pca9685.h deleted +0 -35
deleted file mode 100644
index 778e9e4..0000000
@@ -1,35 +0,0 @@
-/*
- * Copyright 2013 Maximilian Güntner <[email protected]>
- *
- * This file is subject to the terms and conditions of version 2 of
- * the GNU General Public License.  See the file COPYING in the main
- * directory of this archive for more details.
- *
- * Based on leds-pca963x.h by Peter Meerwald <[email protected]>
- *
- * LED driver for the NXP PCA9685 PWM chip
- *
- */
-
-#ifndef __LINUX_PCA9685_H
-#define __LINUX_PCA9685_H
-
-#include <linux/leds.h>
-
-enum pca9685_outdrv {
-	PCA9685_OPEN_DRAIN,
-	PCA9685_TOTEM_POLE,
-};
-
-enum pca9685_inverted {
-	PCA9685_NOT_INVERTED,
-	PCA9685_INVERTED,
-};
-
-struct pca9685_platform_data {
-	struct led_platform_data leds;
-	enum pca9685_outdrv outdrv;
-	enum pca9685_inverted inverted;
-};
-
-#endif /* __LINUX_PCA9685_H */
Signature · 1 line
1.8.3.2
#1 lore raw

Hi!

Quoted 9 lines · Axel Lin

This driver is replaced by pwm-pca9685 driver and there is no user uses this driver in current tree. So remove it.

---
Hi,
I found there is a modalias conflict between leds-pca9685.ko and pwm-pca9685.ko. I think this conflict will cause problem.
After checking the code, I think leds-pca9685 is replaced by pwm-pca9685.

This confused me for a second, as there was no driver to replace when I wrote the pwm-pca9685 driver and I thought I missed something. But it seems I didn't and the pwm-pca9685 is actually older.

Quoted 3 lines

Use git grep to check current tree and found there is no user uses leds-pca9685. So this patch removes leds-pca9685 driver.

If the platform setup is needed, maybe this can be integrated into the pwm driver instead of completely dropping it. I don't care for platform code, but if someone does, I don't want him to lose the support for it.

Otherwise I am okay with this drop (okay, I'm completely biased of course ;-)). But technically the pca9685 is not solely a LED driver IC, but a PWM IC, so it is in the wrong place anyhow.

Regards,
Steffen

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author
#2 lore raw

2014-04-06 17:30 GMT+08:00 Steffen Trumtrar <[email protected]>:

Quoted 13 lines

Hi!

Quoted 9 lines · Axel Lin

This driver is replaced by pwm-pca9685 driver and there is no user uses this driver in current tree. So remove it.

---
Hi,
I found there is a modalias conflict between leds-pca9685.ko and pwm-pca9685.ko. I think this conflict will cause problem.
After checking the code, I think leds-pca9685 is replaced by pwm-pca9685.

Quoted 3 lines

This confused me for a second, as there was no driver to replace when I wrote the pwm-pca9685 driver and I thought I missed something. But it seems I didn't and the pwm-pca9685 is actually older.

Ah.. right, leds-pca9685 is a newer driver.

2013-10-22 leds: Added driver for the NXP PCA9685 I2C chip 2013-05-30 pwm: add pca9685 driver

Quoted 8 lines
Quoted 4 lines

Use git grep to check current tree and found there is no user uses leds-pca9685. So this patch removes leds-pca9685 driver.

If the platform setup is needed, maybe this can be integrated into the pwm driver instead of completely dropping it. I don't care for platform code, but if someone does, I don't want him to lose the support for it.

Given the fact there is no user in current tree uses leds-pca9685, I suspect if we need to add platform setup to pwm-pca9685. ( I think the trend is to use DT, not the reverse )

Quoted 4 lines

Otherwise I am okay with this drop (okay, I'm completely biased of course ;-)). But technically the pca9685 is not solely a LED driver IC, but a PWM IC, so it is in the wrong place anyhow.

I also think PWM subsystem is better for this chip which is a PWM IC.

Thanks for the review,
Axel

#3 lore raw

2014-04-06 12:40 GMT+02:00 Axel Lin <[email protected]>:

Quoted 2 lines

2014-04-06 17:30 GMT+08:00 Steffen Trumtrar <[email protected]>:

Quoted 1 line

Hi!

Hello,

Quoted 9 lines
Quoted 3 lines

This confused me for a second, as there was no driver to replace when I wrote the pwm-pca9685 driver and I thought I missed something. But it seems I didn't and the pwm-pca9685 is actually older.

Ah.. right, leds-pca9685 is a newer driver.

2013-10-22 leds: Added driver for the NXP PCA9685 I2C chip 2013-05-30 pwm: add pca9685 driver

True. I wrote this driver in April 2013 since there was no driver available for the PCA9685 at this point.
When I submitted it in October I only checked 'drivers/leds/' for support but not 'drivers/pwm'.

Quoted 14 lines
Quoted 8 lines
Quoted 4 lines

Use git grep to check current tree and found there is no user uses leds-pca9685. So this patch removes leds-pca9685 driver.

If the platform setup is needed, maybe this can be integrated into the pwm driver instead of completely dropping it. I don't care for platform code, but if someone does, I don't want him to lose the support for it.

Given the fact there is no user in current tree uses leds-pca9685, I suspect if we need to add platform setup to pwm-pca9685. ( I think the trend is to use DT, not the reverse )

Quoted 1 line
Quoted 5 lines
Quoted 3 lines

Otherwise I am okay with this drop (okay, I'm completely biased of course ;-)). But technically the pca9685 is not solely a LED driver IC, but a PWM IC, so it is in the wrong place anyhow.

I also think PWM subsystem is better for this chip which is a PWM IC.

+1

I also ACK the drop of leds-pca9685 in favor of pwm-pca9685.

Thanks,

Maximilian

#4 lore raw
Quoted 38 lines · Maximilian Güntner

2014-04-06 12:40 GMT+02:00 Axel Lin <[email protected]>:

Quoted 2 lines

2014-04-06 17:30 GMT+08:00 Steffen Trumtrar <[email protected]>:

Quoted 1 line

Hi!

Hello,

Quoted 9 lines
Quoted 3 lines

This confused me for a second, as there was no driver to replace when I wrote the pwm-pca9685 driver and I thought I missed something. But it seems I didn't and the pwm-pca9685 is actually older.

Ah.. right, leds-pca9685 is a newer driver.

2013-10-22 leds: Added driver for the NXP PCA9685 I2C chip 2013-05-30 pwm: add pca9685 driver

True. I wrote this driver in April 2013 since there was no driver available for the PCA9685 at this point.
When I submitted it in October I only checked 'drivers/leds/' for support but not 'drivers/pwm'.

Quoted 18 lines
Quoted 8 lines
Quoted 4 lines

Use git grep to check current tree and found there is no user uses leds-pca9685. So this patch removes leds-pca9685 driver.

If the platform setup is needed, maybe this can be integrated into the pwm driver instead of completely dropping it. I don't care for platform code, but if someone does, I don't want him to lose the support for it.

Given the fact there is no user in current tree uses leds-pca9685, I suspect if we need to add platform setup to pwm-pca9685. ( I think the trend is to use DT, not the reverse )

Quoted 4 lines

Otherwise I am okay with this drop (okay, I'm completely biased of course ;-)). But technically the pca9685 is not solely a LED driver IC, but a PWM IC, so it is in the wrong place anyhow.

Quoted 8 lines
Quoted 1 line

I also think PWM subsystem is better for this chip which is a PWM IC.

+1

I also ACK the drop of leds-pca9685 in favor of pwm-pca9685.

Thanks,

Maximilian

OK, great, I will merge this change with Maximilian and Steffen's acks.

Thanks,
-Bryan