From patchwork Thu May 4 12:03:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 98516 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp546024qgd; Thu, 4 May 2017 05:03:16 -0700 (PDT) X-Received: by 10.99.103.193 with SMTP id b184mr45526527pgc.35.1493899396467; Thu, 04 May 2017 05:03:16 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j19si1915760pgk.123.2017.05.04.05.03.16 for ; Thu, 04 May 2017 05:03:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-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; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-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 S1751118AbdEDMDQ (ORCPT ); Thu, 4 May 2017 08:03:16 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:32814 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbdEDMDP (ORCPT ); Thu, 4 May 2017 08:03:15 -0400 Received: by mail-lf0-f54.google.com with SMTP id r17so6541498lfg.0 for ; Thu, 04 May 2017 05:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Tb62Ui+moNW9utHt4nlPeiVMloQnYFjUFU9yQ9m73q8=; b=TAqjMBYNXGh5W0HrAo4sbl9M8eMh1yKDoECgZdZ/UjNJm8UWWfBS4DY1v8ExQ9plj3 Q0iwzZEkMQaP3htnEgLt1jiphQR8eT4ZXX1KAddIoomsZPoODFkqZSpyekNpRhdDGyPn fKbwusCBL7kxhIRbRdzh37wNjUPcUZofvayho= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Tb62Ui+moNW9utHt4nlPeiVMloQnYFjUFU9yQ9m73q8=; b=kTRZDvL3A/PPliPBp/sfTo+tlE0ZBebh1YPrawgkfd/9HlcR43SQsneyTw8TrO1eVC r9dACN8GfK1gcGDdRyOHd9DVcespwCkChYd1/Tm0WrAhkUEiSxBfQ9fyGYVPavILlXu5 I13vv1d4yu1vW115Nj8wrf0VwaD1hXRRVVdUBbRg4vmXD2LXREtZcq+IOWm6+XFJUkci XkryqwnFongx8lFoaMFO7bC0CbSbUVeBTsyjMxjmyQj4ISItX4Acxv2PuIQFEKeFsTx2 UShSoEfb80JB9KfugnHPu+bEvnKFe6X8WDwvbF9jyfmV2b0M8x7DHhriyqGLesY5wJs4 LQIg== X-Gm-Message-State: AN3rC/6YUp9DWts1bI8RyZg3lBDvsWZKxd17sK5hD1VPX6xdLJRdT826 UL3P1tl6I981HTWR X-Received: by 10.25.181.131 with SMTP id g3mr2577342lfk.135.1493899393554; Thu, 04 May 2017 05:03:13 -0700 (PDT) Received: from genomnajs.wlan.se.axis.com ([85.235.16.11]) by smtp.gmail.com with ESMTPSA id s81sm408501lja.7.2017.05.04.05.03.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2017 05:03:12 -0700 (PDT) From: Linus Walleij To: Jacek Anaszewski , Pavel Machek , Richard Purdie Cc: linux-leds@vger.kernel.org, Linus Walleij Subject: [PATCH] leds: Delete obsolete Versatile driver Date: Thu, 4 May 2017 14:03:08 +0200 Message-Id: <20170504120308.6738-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org All users of the Versatile LED driver are deleted and replaced with the very generic leds-syscon. Delete the old driver. Signed-off-by: Linus Walleij --- drivers/leds/Kconfig | 8 --- drivers/leds/Makefile | 1 - drivers/leds/leds-versatile.c | 110 ------------------------------------------ 3 files changed, 119 deletions(-) delete mode 100644 drivers/leds/leds-versatile.c -- 2.9.3 Acked-by: Pavel Machek diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 6c2999872090..fbe3468eb911 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -651,14 +651,6 @@ config LEDS_SYSCON devices. This will only work with device tree enabled devices. -config LEDS_VERSATILE - tristate "LED support for the ARM Versatile and RealView" - depends on ARCH_REALVIEW || ARCH_VERSATILE - depends on LEDS_CLASS - help - This option enabled support for the LEDs on the ARM Versatile - and RealView boards. Say Y to enabled these. - config LEDS_PM8058 tristate "LED Support for the Qualcomm PM8058 PMIC" depends on MFD_PM8XXX diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index 45f133962ed8..e4a8d007c5a9 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -62,7 +62,6 @@ obj-$(CONFIG_LEDS_MAX8997) += leds-max8997.o obj-$(CONFIG_LEDS_LM355x) += leds-lm355x.o obj-$(CONFIG_LEDS_BLINKM) += leds-blinkm.o obj-$(CONFIG_LEDS_SYSCON) += leds-syscon.o -obj-$(CONFIG_LEDS_VERSATILE) += leds-versatile.o obj-$(CONFIG_LEDS_MENF21BMC) += leds-menf21bmc.o obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o obj-$(CONFIG_LEDS_POWERNV) += leds-powernv.o diff --git a/drivers/leds/leds-versatile.c b/drivers/leds/leds-versatile.c deleted file mode 100644 index 80553022d661..000000000000 --- a/drivers/leds/leds-versatile.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Driver for the 8 user LEDs found on the RealViews and Versatiles - * Based on DaVinci's DM365 board code - * - * License terms: GNU General Public License (GPL) version 2 - * Author: Linus Walleij - */ -#include -#include -#include -#include -#include -#include -#include - -struct versatile_led { - void __iomem *base; - struct led_classdev cdev; - u8 mask; -}; - -/* - * The triggers lines up below will only be used if the - * LED triggers are compiled in. - */ -static const struct { - const char *name; - const char *trigger; -} versatile_leds[] = { - { "versatile:0", "heartbeat", }, - { "versatile:1", "mmc0", }, - { "versatile:2", "cpu0" }, - { "versatile:3", "cpu1" }, - { "versatile:4", "cpu2" }, - { "versatile:5", "cpu3" }, - { "versatile:6", }, - { "versatile:7", }, -}; - -static void versatile_led_set(struct led_classdev *cdev, - enum led_brightness b) -{ - struct versatile_led *led = container_of(cdev, - struct versatile_led, cdev); - u32 reg = readl(led->base); - - if (b != LED_OFF) - reg |= led->mask; - else - reg &= ~led->mask; - writel(reg, led->base); -} - -static enum led_brightness versatile_led_get(struct led_classdev *cdev) -{ - struct versatile_led *led = container_of(cdev, - struct versatile_led, cdev); - u32 reg = readl(led->base); - - return (reg & led->mask) ? LED_FULL : LED_OFF; -} - -static int versatile_leds_probe(struct platform_device *dev) -{ - int i; - struct resource *res; - void __iomem *base; - - res = platform_get_resource(dev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&dev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - /* All off */ - writel(0, base); - for (i = 0; i < ARRAY_SIZE(versatile_leds); i++) { - struct versatile_led *led; - - led = kzalloc(sizeof(*led), GFP_KERNEL); - if (!led) - break; - - led->base = base; - led->cdev.name = versatile_leds[i].name; - led->cdev.brightness_set = versatile_led_set; - led->cdev.brightness_get = versatile_led_get; - led->cdev.default_trigger = versatile_leds[i].trigger; - led->mask = BIT(i); - - if (led_classdev_register(NULL, &led->cdev) < 0) { - kfree(led); - break; - } - } - - return 0; -} - -static struct platform_driver versatile_leds_driver = { - .driver = { - .name = "versatile-leds", - }, - .probe = versatile_leds_probe, -}; - -module_platform_driver(versatile_leds_driver); - -MODULE_AUTHOR("Linus Walleij "); -MODULE_DESCRIPTION("ARM Versatile LED driver"); -MODULE_LICENSE("GPL v2");