From: Arnd Bergmann Date: Fri, 30 Sep 2022 11:18:46 +0000 (+0200) Subject: leds: remove s3c24xx driver X-Git-Tag: v6.6.7~3533^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d1ec119e3c1ec060370f5dc58490b51368c554c;p=platform%2Fkernel%2Flinux-starfive.git leds: remove s3c24xx driver The s3c24xx platform is gone, so the led driver can be removed as well. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann --- diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 499d0f2..be2eeb3 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -244,14 +244,6 @@ config LEDS_MT6323 This option enables support for on-chip LED drivers found on Mediatek MT6323 PMIC. -config LEDS_S3C24XX - tristate "LED Support for Samsung S3C24XX GPIO LEDs" - depends on LEDS_CLASS - depends on ARCH_S3C24XX || COMPILE_TEST - help - This option enables support for LEDs connected to GPIO lines - on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440. - config LEDS_NET48XX tristate "LED Support for Soekris net48xx series Error LED" depends on LEDS_CLASS diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index 4fd2f92..a790c96 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -74,7 +74,6 @@ obj-$(CONFIG_LEDS_PM8058) += leds-pm8058.o obj-$(CONFIG_LEDS_POWERNV) += leds-powernv.o obj-$(CONFIG_LEDS_PWM) += leds-pwm.o obj-$(CONFIG_LEDS_REGULATOR) += leds-regulator.o -obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o obj-$(CONFIG_LEDS_SUNFIRE) += leds-sunfire.o obj-$(CONFIG_LEDS_SYSCON) += leds-syscon.o diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c deleted file mode 100644 index 3c0c7aa..0000000 --- a/drivers/leds/leds-s3c24xx.c +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* drivers/leds/leds-s3c24xx.c - * - * (c) 2006 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * Ben Dooks - * - * S3C24XX - LEDs GPIO driver -*/ - -#include -#include -#include -#include -#include -#include -#include - -/* our context */ - -struct s3c24xx_gpio_led { - struct led_classdev cdev; - struct s3c24xx_led_platdata *pdata; - struct gpio_desc *gpiod; -}; - -static inline struct s3c24xx_gpio_led *to_gpio(struct led_classdev *led_cdev) -{ - return container_of(led_cdev, struct s3c24xx_gpio_led, cdev); -} - -static void s3c24xx_led_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - struct s3c24xx_gpio_led *led = to_gpio(led_cdev); - - gpiod_set_value(led->gpiod, !!value); -} - -static int s3c24xx_led_probe(struct platform_device *dev) -{ - struct s3c24xx_led_platdata *pdata = dev_get_platdata(&dev->dev); - struct s3c24xx_gpio_led *led; - int ret; - - led = devm_kzalloc(&dev->dev, sizeof(struct s3c24xx_gpio_led), - GFP_KERNEL); - if (!led) - return -ENOMEM; - - led->cdev.brightness_set = s3c24xx_led_set; - led->cdev.default_trigger = pdata->def_trigger; - led->cdev.name = pdata->name; - led->cdev.flags |= LED_CORE_SUSPENDRESUME; - - led->pdata = pdata; - - /* Default to off */ - led->gpiod = devm_gpiod_get(&dev->dev, NULL, GPIOD_OUT_LOW); - if (IS_ERR(led->gpiod)) - return PTR_ERR(led->gpiod); - - /* register our new led device */ - ret = devm_led_classdev_register(&dev->dev, &led->cdev); - if (ret < 0) - dev_err(&dev->dev, "led_classdev_register failed\n"); - - return ret; -} - -static struct platform_driver s3c24xx_led_driver = { - .probe = s3c24xx_led_probe, - .driver = { - .name = "s3c24xx_led", - }, -}; - -module_platform_driver(s3c24xx_led_driver); - -MODULE_AUTHOR("Ben Dooks "); -MODULE_DESCRIPTION("S3C24XX LED driver"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:s3c24xx_led"); diff --git a/include/linux/platform_data/leds-s3c24xx.h b/include/linux/platform_data/leds-s3c24xx.h deleted file mode 100644 index 64f8d14..0000000 --- a/include/linux/platform_data/leds-s3c24xx.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2006 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * Ben Dooks - * - * S3C24XX - LEDs GPIO connector -*/ - -#ifndef __LEDS_S3C24XX_H -#define __LEDS_S3C24XX_H - -struct s3c24xx_led_platdata { - char *name; - char *def_trigger; -}; - -#endif /* __LEDS_S3C24XX_H */