Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61550022 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next



Marc Kleine-Budde says:

====================
this is a pull-request for net-next/master. There is are 9 patches by
Fabio Baltieri and Kurt Van Dijck which add LED infrastructure and
support for CAN devices. Bernd Krumboeck adds a driver for the USB CAN
adapter from 8 devices. Oliver Hartkopp improves the CAN gateway
functionality. There are 4 patches by me, which clean up the CAN's
Kconfig.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 0e36cbb3 e6afa00a
Loading
Loading
Loading
Loading
+23 −14
Original line number Diff line number Diff line
menu "CAN Device Drivers"
	depends on CAN

config CAN_VCAN
	tristate "Virtual Local CAN Interface (vcan)"
	depends on CAN
	---help---
	  Similar to the network loopback devices, vcan offers a
	  virtual local CAN interface.
@@ -13,7 +11,6 @@ config CAN_VCAN

config CAN_SLCAN
	tristate "Serial / USB serial CAN Adaptors (slcan)"
	depends on CAN
	---help---
	  CAN driver for several 'low cost' CAN interfaces that are attached
	  via serial lines or via USB-to-serial adapters using the LAWICEL
@@ -33,16 +30,16 @@ config CAN_SLCAN

config CAN_DEV
	tristate "Platform CAN drivers with Netlink support"
	depends on CAN
	default y
	---help---
	  Enables the common framework for platform CAN drivers with Netlink
	  support. This is the standard library for CAN drivers.
	  If unsure, say Y.

if CAN_DEV

config CAN_CALC_BITTIMING
	bool "CAN bit-timing calculation"
	depends on CAN_DEV
	default y
	---help---
	  If enabled, CAN bit-timing parameters will be calculated for the
@@ -54,15 +51,26 @@ config CAN_CALC_BITTIMING
	  arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw".
	  If unsure, say Y.

config CAN_LEDS
	bool "Enable LED triggers for Netlink based drivers"
	depends on LEDS_CLASS
	select LEDS_TRIGGERS
	---help---
	  This option adds two LED triggers for packet receive and transmit
	  events on each supported CAN device.

	  Say Y here if you are working on a system with led-class supported
	  LEDs and you want to use them as canbus activity indicators.

config CAN_AT91
	tristate "Atmel AT91 onchip CAN controller"
	depends on CAN_DEV && (ARCH_AT91SAM9263 || ARCH_AT91SAM9X5)
	depends on ARCH_AT91SAM9263 || ARCH_AT91SAM9X5
	---help---
	  This is a driver for the SoC CAN controller in Atmel's AT91SAM9263
	  and AT91SAM9X5 processors.

config CAN_TI_HECC
	depends on CAN_DEV && ARCH_OMAP3
	depends on ARCH_OMAP3
	tristate "TI High End CAN Controller"
	---help---
	  Driver for TI HECC (High End CAN Controller) module found on many
@@ -70,12 +78,12 @@ config CAN_TI_HECC

config CAN_MCP251X
	tristate "Microchip MCP251x SPI CAN controllers"
	depends on CAN_DEV && SPI && HAS_DMA
	depends on SPI && HAS_DMA
	---help---
	  Driver for the Microchip MCP251x SPI CAN controllers.

config CAN_BFIN
	depends on CAN_DEV && (BF534 || BF536 || BF537 || BF538 || BF539 || BF54x)
	depends on BF534 || BF536 || BF537 || BF538 || BF539 || BF54x
	tristate "Analog Devices Blackfin on-chip CAN"
	---help---
	  Driver for the Analog Devices Blackfin on-chip CAN controllers
@@ -85,7 +93,7 @@ config CAN_BFIN

config CAN_JANZ_ICAN3
	tristate "Janz VMOD-ICAN3 Intelligent CAN controller"
	depends on CAN_DEV && MFD_JANZ_CMODIO
	depends on MFD_JANZ_CMODIO
	---help---
	  Driver for Janz VMOD-ICAN3 Intelligent CAN controller module, which
	  connects to a MODULbus carrier board.
@@ -98,13 +106,13 @@ config HAVE_CAN_FLEXCAN

config CAN_FLEXCAN
	tristate "Support for Freescale FLEXCAN based chips"
	depends on CAN_DEV && HAVE_CAN_FLEXCAN
	depends on HAVE_CAN_FLEXCAN
	---help---
	  Say Y here if you want to support for Freescale FlexCAN.

config PCH_CAN
	tristate "Intel EG20T PCH CAN controller"
	depends on CAN_DEV && PCI
	depends on PCI
	---help---
	  This driver is for PCH CAN of Topcliff (Intel EG20T PCH) which
	  is an IOH for x86 embedded processor (Intel Atom E6xx series).
@@ -112,7 +120,7 @@ config PCH_CAN

config CAN_GRCAN
	tristate "Aeroflex Gaisler GRCAN and GRHCAN CAN devices"
	depends on CAN_DEV && OF
	depends on OF
	---help---
	  Say Y here if you want to use Aeroflex Gaisler GRCAN or GRHCAN.
	  Note that the driver supports little endian, even though little
@@ -131,9 +139,10 @@ source "drivers/net/can/usb/Kconfig"

source "drivers/net/can/softing/Kconfig"

endif

config CAN_DEBUG_DEVICES
	bool "CAN devices debugging messages"
	depends on CAN
	---help---
	  Say Y here if you want the CAN device drivers to produce a bunch of
	  debug messages to the system log.  Select this if you are having
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ obj-$(CONFIG_CAN_SLCAN) += slcan.o
obj-$(CONFIG_CAN_DEV)		+= can-dev.o
can-dev-y			:= dev.o

can-dev-$(CONFIG_CAN_LEDS)	+= led.o

obj-y				+= usb/
obj-y				+= softing/

+10 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@

#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/led.h>

#define AT91_MB_MASK(i)		((1 << (i)) - 1)

@@ -641,6 +642,8 @@ static void at91_read_msg(struct net_device *dev, unsigned int mb)

	stats->rx_packets++;
	stats->rx_bytes += cf->can_dlc;

	can_led_event(dev, CAN_LED_EVENT_RX);
}

/**
@@ -875,6 +878,7 @@ static void at91_irq_tx(struct net_device *dev, u32 reg_sr)
			/* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */
			can_get_echo_skb(dev, mb - get_mb_tx_first(priv));
			dev->stats.tx_packets++;
			can_led_event(dev, CAN_LED_EVENT_TX);
		}
	}

@@ -1128,6 +1132,8 @@ static int at91_open(struct net_device *dev)
		goto out_close;
	}

	can_led_event(dev, CAN_LED_EVENT_OPEN);

	/* start chip and queuing */
	at91_chip_start(dev);
	napi_enable(&priv->napi);
@@ -1159,6 +1165,8 @@ static int at91_close(struct net_device *dev)

	close_candev(dev);

	can_led_event(dev, CAN_LED_EVENT_STOP);

	return 0;
}

@@ -1321,6 +1329,8 @@ static int at91_can_probe(struct platform_device *pdev)
		goto exit_free;
	}

	devm_can_led_init(dev);

	dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%d)\n",
		 priv->reg_base, dev->irq);

+1 −1
Original line number Diff line number Diff line
menuconfig CAN_C_CAN
	tristate "Bosch C_CAN/D_CAN devices"
	depends on CAN_DEV && HAS_IOMEM
	depends on HAS_IOMEM

if CAN_C_CAN

+10 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/led.h>

#include "c_can.h"

@@ -477,6 +478,8 @@ static int c_can_read_msg_object(struct net_device *dev, int iface, int ctrl)
	stats->rx_packets++;
	stats->rx_bytes += frame->can_dlc;

	can_led_event(dev, CAN_LED_EVENT_RX);

	return 0;
}

@@ -751,6 +754,7 @@ static void c_can_do_tx(struct net_device *dev)
					C_CAN_IFACE(MSGCTRL_REG, 0))
					& IF_MCONT_DLC_MASK;
			stats->tx_packets++;
			can_led_event(dev, CAN_LED_EVENT_TX);
			c_can_inval_msg_object(dev, 0, msg_obj_no);
		} else {
			break;
@@ -1115,6 +1119,8 @@ static int c_can_open(struct net_device *dev)

	napi_enable(&priv->napi);

	can_led_event(dev, CAN_LED_EVENT_OPEN);

	/* start the c_can controller */
	c_can_start(dev);

@@ -1143,6 +1149,8 @@ static int c_can_close(struct net_device *dev)
	c_can_reset_ram(priv, false);
	c_can_pm_runtime_put_sync(priv);

	can_led_event(dev, CAN_LED_EVENT_STOP);

	return 0;
}

@@ -1268,6 +1276,8 @@ int register_c_can_dev(struct net_device *dev)
	err = register_candev(dev);
	if (err)
		c_can_pm_runtime_disable(priv);
	else
		devm_can_led_init(dev);

	return err;
}
Loading