#include "smscoreapi.h"
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/firmware.h>
#include <linux/wait.h>
#include <asm/byteorder.h>
#include "sms-cards.h"
#include "smsir.h"
struct smscore_device_notifyee_t { … };
struct smscore_idlist_t { … };
struct smscore_client_t { … };
static char *siano_msgs[] = …;
char *smscore_translate_msg(enum msg_types msgtype)
{ … }
EXPORT_SYMBOL_GPL(…);
void smscore_set_board_id(struct smscore_device_t *core, int id)
{ … }
int smscore_led_state(struct smscore_device_t *core, int led)
{ … }
EXPORT_SYMBOL_GPL(…);
int smscore_get_board_id(struct smscore_device_t *core)
{ … }
EXPORT_SYMBOL_GPL(…);
struct smscore_registry_entry_t { … };
static struct list_head g_smscore_notifyees;
static struct list_head g_smscore_devices;
static DEFINE_MUTEX(g_smscore_deviceslock);
static struct list_head g_smscore_registry;
static DEFINE_MUTEX(g_smscore_registrylock);
static int default_mode = …;
module_param(default_mode, int, 0644);
MODULE_PARM_DESC(…) …;
static struct smscore_registry_entry_t *smscore_find_registry(char *devpath)
{ … }
int smscore_registry_getmode(char *devpath)
{ … }
EXPORT_SYMBOL_GPL(…);
static enum sms_device_type_st smscore_registry_gettype(char *devpath)
{ … }
static void smscore_registry_setmode(char *devpath, int mode)
{ … }
static void smscore_registry_settype(char *devpath,
enum sms_device_type_st type)
{ … }
static void list_add_locked(struct list_head *new, struct list_head *head,
spinlock_t *lock)
{ … }
int smscore_register_hotplug(hotplug_t hotplug)
{ … }
EXPORT_SYMBOL_GPL(…);
void smscore_unregister_hotplug(hotplug_t hotplug)
{ … }
EXPORT_SYMBOL_GPL(…);
static void smscore_notify_clients(struct smscore_device_t *coredev)
{ … }
static int smscore_notify_callbacks(struct smscore_device_t *coredev,
struct device *device, int arrival)
{ … }
static struct
smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
dma_addr_t common_buffer_phys)
{ … }
int smscore_register_device(struct smsdevice_params_t *params,
struct smscore_device_t **coredev,
gfp_t gfp_buf_flags,
void *mdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev,
void *buffer, size_t size, struct completion *completion) { … }
static int smscore_init_ir(struct smscore_device_t *coredev)
{ … }
static int smscore_configure_board(struct smscore_device_t *coredev)
{ … }
int smscore_start_device(struct smscore_device_t *coredev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
void *buffer, size_t size)
{ … }
static char *smscore_fw_lkup[][DEVICE_MODE_MAX] = …;
static char *smscore_get_fw_filename(struct smscore_device_t *coredev,
int mode)
{ … }
static int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
int mode)
{ … }
void smscore_unregister_device(struct smscore_device_t *coredev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int smscore_detect_mode(struct smscore_device_t *coredev)
{ … }
static int smscore_init_device(struct smscore_device_t *coredev, int mode)
{ … }
int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
{ … }
int smscore_get_device_mode(struct smscore_device_t *coredev)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct
smscore_client_t *smscore_find_client(struct smscore_device_t *coredev,
int data_type, int id)
{ … }
void smscore_onresponse(struct smscore_device_t *coredev,
struct smscore_buffer_t *cb) { … }
EXPORT_SYMBOL_GPL(…);
static struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev)
{ … }
struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)
{ … }
EXPORT_SYMBOL_GPL(…);
void smscore_putbuffer(struct smscore_device_t *coredev,
struct smscore_buffer_t *cb) { … }
EXPORT_SYMBOL_GPL(…);
static int smscore_validate_client(struct smscore_device_t *coredev,
struct smscore_client_t *client,
int data_type, int id)
{ … }
int smscore_register_client(struct smscore_device_t *coredev,
struct smsclient_params_t *params,
struct smscore_client_t **client)
{ … }
EXPORT_SYMBOL_GPL(…);
void smscore_unregister_client(struct smscore_client_t *client)
{ … }
EXPORT_SYMBOL_GPL(…);
int smsclient_sendrequest(struct smscore_client_t *client,
void *buffer, size_t size)
{ … }
EXPORT_SYMBOL_GPL(…);
int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
struct smscore_config_gpio *pinconfig)
{ … }
int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level)
{ … }
static int get_gpio_pin_params(u32 pin_num, u32 *p_translatedpin_num,
u32 *p_group_num, u32 *p_group_cfg) { … }
int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num,
struct smscore_config_gpio *p_gpio_config) { … }
int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num,
u8 new_level) { … }
int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num,
u8 *level) { … }
static int __init smscore_module_init(void)
{ … }
static void __exit smscore_module_exit(void)
{ … }
module_init(…) …;
module_exit(smscore_module_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);