From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Simon Guinot <simon.guinot@sequanux.org>
Cc: Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Dan Carpenter <dan.carpenter@oracle.com>,
Jacek Anaszewski <j.anaszewski@samsung.com>,
Vincent Donnefort <vdonnefort@gmail.com>
Subject: Re: [PATCH v2 3/3] ARM: mvebu: remove static LED setup for netxbig boards
Date: Mon, 29 Jun 2015 14:45:44 +0200 [thread overview]
Message-ID: <55913DF8.4070905@free-electrons.com> (raw)
In-Reply-To: <1434628373-11834-4-git-send-email-simon.guinot@sequanux.org>
Hi Simon,
On 18/06/2015 13:52, Simon Guinot wrote:
> Since DT support is now available for the LEDs found on the LaCie
> netxbig boards (Kirkwood-based), then the old-fashion netxbig board
> setup file is no longer needed. This patch removes this file.
>
> Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Thanks,
Gregory
> ---
> arch/arm/mach-mvebu/Kconfig | 7 --
> arch/arm/mach-mvebu/Makefile | 1 -
> arch/arm/mach-mvebu/board.h | 21 -----
> arch/arm/mach-mvebu/kirkwood.c | 4 -
> arch/arm/mach-mvebu/netxbig.c | 191 -----------------------------------------
> 5 files changed, 224 deletions(-)
> delete mode 100644 arch/arm/mach-mvebu/board.h
> delete mode 100644 arch/arm/mach-mvebu/netxbig.c
>
> diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
> index c1e4567a5ab3..e58020bc80c0 100644
> --- a/arch/arm/mach-mvebu/Kconfig
> +++ b/arch/arm/mach-mvebu/Kconfig
> @@ -102,11 +102,4 @@ config MACH_KIRKWOOD
> Say 'Y' here if you want your kernel to support boards based
> on the Marvell Kirkwood device tree.
>
> -config MACH_NETXBIG
> - bool "LaCie 2Big and 5Big Network v2"
> - depends on MACH_KIRKWOOD
> - help
> - Say 'Y' here if you want your kernel to support the
> - LaCie 2Big and 5Big Network v2
> -
> endif
> diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> index b4f01497ce0b..ecf9e0c3b107 100644
> --- a/arch/arm/mach-mvebu/Makefile
> +++ b/arch/arm/mach-mvebu/Makefile
> @@ -13,4 +13,3 @@ endif
>
> obj-$(CONFIG_MACH_DOVE) += dove.o
> obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
> -obj-$(CONFIG_MACH_NETXBIG) += netxbig.o
> diff --git a/arch/arm/mach-mvebu/board.h b/arch/arm/mach-mvebu/board.h
> deleted file mode 100644
> index 98e32cc2ef3d..000000000000
> --- a/arch/arm/mach-mvebu/board.h
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -/*
> - * Board functions for Marvell System On Chip
> - *
> - * Copyright (C) 2014
> - *
> - * Andrew Lunn <andrew@lunn.ch>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __ARCH_MVEBU_BOARD_H
> -#define __ARCH_MVEBU_BOARD_H
> -
> -#ifdef CONFIG_MACH_NETXBIG
> -void netxbig_init(void);
> -#else
> -static inline void netxbig_init(void) {};
> -#endif
> -#endif
> diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
> index 6b5310828eb2..e81b33dc57d8 100644
> --- a/arch/arm/mach-mvebu/kirkwood.c
> +++ b/arch/arm/mach-mvebu/kirkwood.c
> @@ -25,7 +25,6 @@
> #include "kirkwood.h"
> #include "kirkwood-pm.h"
> #include "common.h"
> -#include "board.h"
>
> static struct resource kirkwood_cpufreq_resources[] = {
> [0] = {
> @@ -180,9 +179,6 @@ static void __init kirkwood_dt_init(void)
> kirkwood_pm_init();
> kirkwood_dt_eth_fixup();
>
> - if (of_machine_is_compatible("lacie,netxbig"))
> - netxbig_init();
> -
> of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
> }
>
> diff --git a/arch/arm/mach-mvebu/netxbig.c b/arch/arm/mach-mvebu/netxbig.c
> deleted file mode 100644
> index 94b11b6585a4..000000000000
> --- a/arch/arm/mach-mvebu/netxbig.c
> +++ /dev/null
> @@ -1,191 +0,0 @@
> -/*
> - * arch/arm/mach-mvbu/board-netxbig.c
> - *
> - * LaCie 2Big and 5Big Network v2 board setup
> - *
> - * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - */
> -
> -#include <linux/kernel.h>
> -#include <linux/of.h>
> -#include <linux/platform_device.h>
> -#include <linux/platform_data/leds-kirkwood-netxbig.h>
> -#include "common.h"
> -
> -/*****************************************************************************
> - * GPIO extension LEDs
> - ****************************************************************************/
> -
> -/*
> - * The LEDs are controlled by a CPLD and can be configured through a GPIO
> - * extension bus:
> - *
> - * - address register : bit [0-2] -> GPIO [47-49]
> - * - data register : bit [0-2] -> GPIO [44-46]
> - * - enable register : GPIO 29
> - */
> -
> -static int netxbig_v2_gpio_ext_addr[] = { 47, 48, 49 };
> -static int netxbig_v2_gpio_ext_data[] = { 44, 45, 46 };
> -
> -static struct netxbig_gpio_ext netxbig_v2_gpio_ext = {
> - .addr = netxbig_v2_gpio_ext_addr,
> - .num_addr = ARRAY_SIZE(netxbig_v2_gpio_ext_addr),
> - .data = netxbig_v2_gpio_ext_data,
> - .num_data = ARRAY_SIZE(netxbig_v2_gpio_ext_data),
> - .enable = 29,
> -};
> -
> -/*
> - * Address register selection:
> - *
> - * addr | register
> - * ----------------------------
> - * 0 | front LED
> - * 1 | front LED brightness
> - * 2 | SATA LED brightness
> - * 3 | SATA0 LED
> - * 4 | SATA1 LED
> - * 5 | SATA2 LED
> - * 6 | SATA3 LED
> - * 7 | SATA4 LED
> - *
> - * Data register configuration:
> - *
> - * data | LED brightness
> - * -------------------------------------------------
> - * 0 | min (off)
> - * - | -
> - * 7 | max
> - *
> - * data | front LED mode
> - * -------------------------------------------------
> - * 0 | fix off
> - * 1 | fix blue on
> - * 2 | fix red on
> - * 3 | blink blue on=1 sec and blue off=1 sec
> - * 4 | blink red on=1 sec and red off=1 sec
> - * 5 | blink blue on=2.5 sec and red on=0.5 sec
> - * 6 | blink blue on=1 sec and red on=1 sec
> - * 7 | blink blue on=0.5 sec and blue off=2.5 sec
> - *
> - * data | SATA LED mode
> - * -------------------------------------------------
> - * 0 | fix off
> - * 1 | SATA activity blink
> - * 2 | fix red on
> - * 3 | blink blue on=1 sec and blue off=1 sec
> - * 4 | blink red on=1 sec and red off=1 sec
> - * 5 | blink blue on=2.5 sec and red on=0.5 sec
> - * 6 | blink blue on=1 sec and red on=1 sec
> - * 7 | fix blue on
> - */
> -
> -static int netxbig_v2_red_mled[NETXBIG_LED_MODE_NUM] = {
> - [NETXBIG_LED_OFF] = 0,
> - [NETXBIG_LED_ON] = 2,
> - [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE,
> - [NETXBIG_LED_TIMER1] = 4,
> - [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE,
> -};
> -
> -static int netxbig_v2_blue_pwr_mled[NETXBIG_LED_MODE_NUM] = {
> - [NETXBIG_LED_OFF] = 0,
> - [NETXBIG_LED_ON] = 1,
> - [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE,
> - [NETXBIG_LED_TIMER1] = 3,
> - [NETXBIG_LED_TIMER2] = 7,
> -};
> -
> -static int netxbig_v2_blue_sata_mled[NETXBIG_LED_MODE_NUM] = {
> - [NETXBIG_LED_OFF] = 0,
> - [NETXBIG_LED_ON] = 7,
> - [NETXBIG_LED_SATA] = 1,
> - [NETXBIG_LED_TIMER1] = 3,
> - [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE,
> -};
> -
> -static struct netxbig_led_timer netxbig_v2_led_timer[] = {
> - [0] = {
> - .delay_on = 500,
> - .delay_off = 500,
> - .mode = NETXBIG_LED_TIMER1,
> - },
> - [1] = {
> - .delay_on = 500,
> - .delay_off = 1000,
> - .mode = NETXBIG_LED_TIMER2,
> - },
> -};
> -
> -#define NETXBIG_LED(_name, maddr, mval, baddr) \
> - { .name = _name, \
> - .mode_addr = maddr, \
> - .mode_val = mval, \
> - .bright_addr = baddr }
> -
> -static struct netxbig_led net2big_v2_leds_ctrl[] = {
> - NETXBIG_LED("net2big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1),
> - NETXBIG_LED("net2big-v2:red:power", 0, netxbig_v2_red_mled, 1),
> - NETXBIG_LED("net2big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net2big-v2:red:sata0", 3, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net2big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net2big-v2:red:sata1", 4, netxbig_v2_red_mled, 2),
> -};
> -
> -static struct netxbig_led_platform_data net2big_v2_leds_data = {
> - .gpio_ext = &netxbig_v2_gpio_ext,
> - .timer = netxbig_v2_led_timer,
> - .num_timer = ARRAY_SIZE(netxbig_v2_led_timer),
> - .leds = net2big_v2_leds_ctrl,
> - .num_leds = ARRAY_SIZE(net2big_v2_leds_ctrl),
> -};
> -
> -static struct netxbig_led net5big_v2_leds_ctrl[] = {
> - NETXBIG_LED("net5big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1),
> - NETXBIG_LED("net5big-v2:red:power", 0, netxbig_v2_red_mled, 1),
> - NETXBIG_LED("net5big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata0", 3, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata1", 4, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata2", 5, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata2", 5, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata3", 6, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata3", 6, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata4", 7, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata4", 7, netxbig_v2_red_mled, 2),
> -};
> -
> -static struct netxbig_led_platform_data net5big_v2_leds_data = {
> - .gpio_ext = &netxbig_v2_gpio_ext,
> - .timer = netxbig_v2_led_timer,
> - .num_timer = ARRAY_SIZE(netxbig_v2_led_timer),
> - .leds = net5big_v2_leds_ctrl,
> - .num_leds = ARRAY_SIZE(net5big_v2_leds_ctrl),
> -};
> -
> -static struct platform_device netxbig_v2_leds = {
> - .name = "leds-netxbig",
> - .id = -1,
> - .dev = {
> - .platform_data = &net2big_v2_leds_data,
> - },
> -};
> -
> -void __init netxbig_init(void)
> -{
> -
> - if (of_machine_is_compatible("lacie,net5big_v2"))
> - netxbig_v2_leds.dev.platform_data = &net5big_v2_leds_data;
> - platform_device_register(&netxbig_v2_leds);
> -}
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/3] ARM: mvebu: remove static LED setup for netxbig boards
Date: Mon, 29 Jun 2015 14:45:44 +0200 [thread overview]
Message-ID: <55913DF8.4070905@free-electrons.com> (raw)
In-Reply-To: <1434628373-11834-4-git-send-email-simon.guinot@sequanux.org>
Hi Simon,
On 18/06/2015 13:52, Simon Guinot wrote:
> Since DT support is now available for the LEDs found on the LaCie
> netxbig boards (Kirkwood-based), then the old-fashion netxbig board
> setup file is no longer needed. This patch removes this file.
>
> Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Thanks,
Gregory
> ---
> arch/arm/mach-mvebu/Kconfig | 7 --
> arch/arm/mach-mvebu/Makefile | 1 -
> arch/arm/mach-mvebu/board.h | 21 -----
> arch/arm/mach-mvebu/kirkwood.c | 4 -
> arch/arm/mach-mvebu/netxbig.c | 191 -----------------------------------------
> 5 files changed, 224 deletions(-)
> delete mode 100644 arch/arm/mach-mvebu/board.h
> delete mode 100644 arch/arm/mach-mvebu/netxbig.c
>
> diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
> index c1e4567a5ab3..e58020bc80c0 100644
> --- a/arch/arm/mach-mvebu/Kconfig
> +++ b/arch/arm/mach-mvebu/Kconfig
> @@ -102,11 +102,4 @@ config MACH_KIRKWOOD
> Say 'Y' here if you want your kernel to support boards based
> on the Marvell Kirkwood device tree.
>
> -config MACH_NETXBIG
> - bool "LaCie 2Big and 5Big Network v2"
> - depends on MACH_KIRKWOOD
> - help
> - Say 'Y' here if you want your kernel to support the
> - LaCie 2Big and 5Big Network v2
> -
> endif
> diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> index b4f01497ce0b..ecf9e0c3b107 100644
> --- a/arch/arm/mach-mvebu/Makefile
> +++ b/arch/arm/mach-mvebu/Makefile
> @@ -13,4 +13,3 @@ endif
>
> obj-$(CONFIG_MACH_DOVE) += dove.o
> obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
> -obj-$(CONFIG_MACH_NETXBIG) += netxbig.o
> diff --git a/arch/arm/mach-mvebu/board.h b/arch/arm/mach-mvebu/board.h
> deleted file mode 100644
> index 98e32cc2ef3d..000000000000
> --- a/arch/arm/mach-mvebu/board.h
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -/*
> - * Board functions for Marvell System On Chip
> - *
> - * Copyright (C) 2014
> - *
> - * Andrew Lunn <andrew@lunn.ch>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __ARCH_MVEBU_BOARD_H
> -#define __ARCH_MVEBU_BOARD_H
> -
> -#ifdef CONFIG_MACH_NETXBIG
> -void netxbig_init(void);
> -#else
> -static inline void netxbig_init(void) {};
> -#endif
> -#endif
> diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
> index 6b5310828eb2..e81b33dc57d8 100644
> --- a/arch/arm/mach-mvebu/kirkwood.c
> +++ b/arch/arm/mach-mvebu/kirkwood.c
> @@ -25,7 +25,6 @@
> #include "kirkwood.h"
> #include "kirkwood-pm.h"
> #include "common.h"
> -#include "board.h"
>
> static struct resource kirkwood_cpufreq_resources[] = {
> [0] = {
> @@ -180,9 +179,6 @@ static void __init kirkwood_dt_init(void)
> kirkwood_pm_init();
> kirkwood_dt_eth_fixup();
>
> - if (of_machine_is_compatible("lacie,netxbig"))
> - netxbig_init();
> -
> of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
> }
>
> diff --git a/arch/arm/mach-mvebu/netxbig.c b/arch/arm/mach-mvebu/netxbig.c
> deleted file mode 100644
> index 94b11b6585a4..000000000000
> --- a/arch/arm/mach-mvebu/netxbig.c
> +++ /dev/null
> @@ -1,191 +0,0 @@
> -/*
> - * arch/arm/mach-mvbu/board-netxbig.c
> - *
> - * LaCie 2Big and 5Big Network v2 board setup
> - *
> - * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - */
> -
> -#include <linux/kernel.h>
> -#include <linux/of.h>
> -#include <linux/platform_device.h>
> -#include <linux/platform_data/leds-kirkwood-netxbig.h>
> -#include "common.h"
> -
> -/*****************************************************************************
> - * GPIO extension LEDs
> - ****************************************************************************/
> -
> -/*
> - * The LEDs are controlled by a CPLD and can be configured through a GPIO
> - * extension bus:
> - *
> - * - address register : bit [0-2] -> GPIO [47-49]
> - * - data register : bit [0-2] -> GPIO [44-46]
> - * - enable register : GPIO 29
> - */
> -
> -static int netxbig_v2_gpio_ext_addr[] = { 47, 48, 49 };
> -static int netxbig_v2_gpio_ext_data[] = { 44, 45, 46 };
> -
> -static struct netxbig_gpio_ext netxbig_v2_gpio_ext = {
> - .addr = netxbig_v2_gpio_ext_addr,
> - .num_addr = ARRAY_SIZE(netxbig_v2_gpio_ext_addr),
> - .data = netxbig_v2_gpio_ext_data,
> - .num_data = ARRAY_SIZE(netxbig_v2_gpio_ext_data),
> - .enable = 29,
> -};
> -
> -/*
> - * Address register selection:
> - *
> - * addr | register
> - * ----------------------------
> - * 0 | front LED
> - * 1 | front LED brightness
> - * 2 | SATA LED brightness
> - * 3 | SATA0 LED
> - * 4 | SATA1 LED
> - * 5 | SATA2 LED
> - * 6 | SATA3 LED
> - * 7 | SATA4 LED
> - *
> - * Data register configuration:
> - *
> - * data | LED brightness
> - * -------------------------------------------------
> - * 0 | min (off)
> - * - | -
> - * 7 | max
> - *
> - * data | front LED mode
> - * -------------------------------------------------
> - * 0 | fix off
> - * 1 | fix blue on
> - * 2 | fix red on
> - * 3 | blink blue on=1 sec and blue off=1 sec
> - * 4 | blink red on=1 sec and red off=1 sec
> - * 5 | blink blue on=2.5 sec and red on=0.5 sec
> - * 6 | blink blue on=1 sec and red on=1 sec
> - * 7 | blink blue on=0.5 sec and blue off=2.5 sec
> - *
> - * data | SATA LED mode
> - * -------------------------------------------------
> - * 0 | fix off
> - * 1 | SATA activity blink
> - * 2 | fix red on
> - * 3 | blink blue on=1 sec and blue off=1 sec
> - * 4 | blink red on=1 sec and red off=1 sec
> - * 5 | blink blue on=2.5 sec and red on=0.5 sec
> - * 6 | blink blue on=1 sec and red on=1 sec
> - * 7 | fix blue on
> - */
> -
> -static int netxbig_v2_red_mled[NETXBIG_LED_MODE_NUM] = {
> - [NETXBIG_LED_OFF] = 0,
> - [NETXBIG_LED_ON] = 2,
> - [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE,
> - [NETXBIG_LED_TIMER1] = 4,
> - [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE,
> -};
> -
> -static int netxbig_v2_blue_pwr_mled[NETXBIG_LED_MODE_NUM] = {
> - [NETXBIG_LED_OFF] = 0,
> - [NETXBIG_LED_ON] = 1,
> - [NETXBIG_LED_SATA] = NETXBIG_LED_INVALID_MODE,
> - [NETXBIG_LED_TIMER1] = 3,
> - [NETXBIG_LED_TIMER2] = 7,
> -};
> -
> -static int netxbig_v2_blue_sata_mled[NETXBIG_LED_MODE_NUM] = {
> - [NETXBIG_LED_OFF] = 0,
> - [NETXBIG_LED_ON] = 7,
> - [NETXBIG_LED_SATA] = 1,
> - [NETXBIG_LED_TIMER1] = 3,
> - [NETXBIG_LED_TIMER2] = NETXBIG_LED_INVALID_MODE,
> -};
> -
> -static struct netxbig_led_timer netxbig_v2_led_timer[] = {
> - [0] = {
> - .delay_on = 500,
> - .delay_off = 500,
> - .mode = NETXBIG_LED_TIMER1,
> - },
> - [1] = {
> - .delay_on = 500,
> - .delay_off = 1000,
> - .mode = NETXBIG_LED_TIMER2,
> - },
> -};
> -
> -#define NETXBIG_LED(_name, maddr, mval, baddr) \
> - { .name = _name, \
> - .mode_addr = maddr, \
> - .mode_val = mval, \
> - .bright_addr = baddr }
> -
> -static struct netxbig_led net2big_v2_leds_ctrl[] = {
> - NETXBIG_LED("net2big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1),
> - NETXBIG_LED("net2big-v2:red:power", 0, netxbig_v2_red_mled, 1),
> - NETXBIG_LED("net2big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net2big-v2:red:sata0", 3, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net2big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net2big-v2:red:sata1", 4, netxbig_v2_red_mled, 2),
> -};
> -
> -static struct netxbig_led_platform_data net2big_v2_leds_data = {
> - .gpio_ext = &netxbig_v2_gpio_ext,
> - .timer = netxbig_v2_led_timer,
> - .num_timer = ARRAY_SIZE(netxbig_v2_led_timer),
> - .leds = net2big_v2_leds_ctrl,
> - .num_leds = ARRAY_SIZE(net2big_v2_leds_ctrl),
> -};
> -
> -static struct netxbig_led net5big_v2_leds_ctrl[] = {
> - NETXBIG_LED("net5big-v2:blue:power", 0, netxbig_v2_blue_pwr_mled, 1),
> - NETXBIG_LED("net5big-v2:red:power", 0, netxbig_v2_red_mled, 1),
> - NETXBIG_LED("net5big-v2:blue:sata0", 3, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata0", 3, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata1", 4, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata1", 4, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata2", 5, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata2", 5, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata3", 6, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata3", 6, netxbig_v2_red_mled, 2),
> - NETXBIG_LED("net5big-v2:blue:sata4", 7, netxbig_v2_blue_sata_mled, 2),
> - NETXBIG_LED("net5big-v2:red:sata4", 7, netxbig_v2_red_mled, 2),
> -};
> -
> -static struct netxbig_led_platform_data net5big_v2_leds_data = {
> - .gpio_ext = &netxbig_v2_gpio_ext,
> - .timer = netxbig_v2_led_timer,
> - .num_timer = ARRAY_SIZE(netxbig_v2_led_timer),
> - .leds = net5big_v2_leds_ctrl,
> - .num_leds = ARRAY_SIZE(net5big_v2_leds_ctrl),
> -};
> -
> -static struct platform_device netxbig_v2_leds = {
> - .name = "leds-netxbig",
> - .id = -1,
> - .dev = {
> - .platform_data = &net2big_v2_leds_data,
> - },
> -};
> -
> -void __init netxbig_init(void)
> -{
> -
> - if (of_machine_is_compatible("lacie,net5big_v2"))
> - netxbig_v2_leds.dev.platform_data = &net5big_v2_leds_data;
> - platform_device_register(&netxbig_v2_leds);
> -}
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2015-06-29 12:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 11:52 [PATCH v2 0/3] Add DT support for netxbig LEDs Simon Guinot
2015-06-18 11:52 ` Simon Guinot
2015-06-18 11:52 ` [PATCH v2 1/3] leds: netxbig: add device tree binding Simon Guinot
2015-06-18 11:52 ` Simon Guinot
2015-06-18 11:52 ` [PATCH v2 2/3] ARM: Kirkwood: add LED DT entries for netxbig boards Simon Guinot
2015-06-18 11:52 ` Simon Guinot
2015-06-29 12:45 ` Gregory CLEMENT
2015-06-29 12:45 ` Gregory CLEMENT
2015-06-18 11:52 ` [PATCH v2 3/3] ARM: mvebu: remove static LED setup " Simon Guinot
2015-06-18 11:52 ` Simon Guinot
2015-06-29 12:45 ` Gregory CLEMENT [this message]
2015-06-29 12:45 ` Gregory CLEMENT
2015-07-25 14:54 ` [PATCH v2 0/3] Add DT support for netxbig LEDs Gregory CLEMENT
2015-07-25 14:54 ` Gregory CLEMENT
2015-07-25 19:36 ` Jacek Anaszewski
2015-07-25 19:36 ` Jacek Anaszewski
2015-07-25 20:45 ` Jacek Anaszewski
2015-07-25 20:45 ` Jacek Anaszewski
2015-07-28 10:30 ` Gregory CLEMENT
2015-07-28 10:30 ` Gregory CLEMENT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55913DF8.4070905@free-electrons.com \
--to=gregory.clement@free-electrons.com \
--cc=andrew@lunn.ch \
--cc=cooloney@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=j.anaszewski@samsung.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=sebastian.hesselbarth@gmail.com \
--cc=simon.guinot@sequanux.org \
--cc=vdonnefort@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.