Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
softing_main.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/io.h>
#include "softing.h"

Go to the source code of this file.

Macros

#define TX_ECHO_SKB_MAX   (((TXMAX+1)/2)-1)
 
#define DEV_ATTR_RO(name, member)
 
#define DEV_ATTR_RO_STR(name, member)
 

Functions

int softing_netdev_rx (struct net_device *netdev, const struct can_frame *msg, ktime_t ktime)
 
int softing_enable_irq (struct softing *card, int enable)
 
 DEV_ATTR_RO (serial, id.serial)
 
 DEV_ATTR_RO_STR (firmware, pdat->app.fw)
 
 DEV_ATTR_RO (firmware_version, id.fw_version)
 
 DEV_ATTR_RO_STR (hardware, pdat->name)
 
 DEV_ATTR_RO (hardware_version, id.hw_version)
 
 DEV_ATTR_RO (license, id.license)
 
 DEV_ATTR_RO (frequency, id.freq)
 
 DEV_ATTR_RO (txpending, tx.pending)
 
 module_platform_driver (softing_driver)
 
 MODULE_ALIAS ("platform:softing")
 
 MODULE_DESCRIPTION ("Softing DPRAM CAN driver")
 
 MODULE_AUTHOR ("Kurt Van Dijck <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define DEV_ATTR_RO (   name,
  member 
)
Value:
static ssize_t show_##name(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct softing *card = platform_get_drvdata(to_platform_device(dev)); \
return sprintf(buf, "%u\n", card->member); \
} \
static DEVICE_ATTR(name, 0444, show_##name, NULL)

Definition at line 701 of file softing_main.c.

#define DEV_ATTR_RO_STR (   name,
  member 
)
Value:
static ssize_t show_##name(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct softing *card = platform_get_drvdata(to_platform_device(dev)); \
return sprintf(buf, "%s\n", card->member); \
} \
static DEVICE_ATTR(name, 0444, show_##name, NULL)

Definition at line 710 of file softing_main.c.

#define TX_ECHO_SKB_MAX   (((TXMAX+1)/2)-1)

Definition at line 27 of file softing_main.c.

Function Documentation

DEV_ATTR_RO ( serial  ,
id.  serial 
)
DEV_ATTR_RO ( firmware_version  ,
id.  fw_version 
)
DEV_ATTR_RO ( hardware_version  ,
id.  hw_version 
)
DEV_ATTR_RO ( license  ,
id.  license 
)
DEV_ATTR_RO ( frequency  ,
id.  freq 
)
DEV_ATTR_RO ( txpending  ,
tx.  pending 
)
DEV_ATTR_RO_STR ( firmware  ,
pdat->app.  fw 
)
DEV_ATTR_RO_STR ( hardware  ,
pdat->  name 
)
MODULE_ALIAS ( "platform:softing"  )
MODULE_AUTHOR ( "Kurt Van Dijck <[email protected]>"  )
MODULE_DESCRIPTION ( "Softing DPRAM CAN driver )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( softing_driver  )
int softing_enable_irq ( struct softing card,
int  enable 
)

Definition at line 432 of file softing_main.c.

int softing_netdev_rx ( struct net_device netdev,
const struct can_frame msg,
ktime_t  ktime 
)

Definition at line 144 of file softing_main.c.