#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 "smscoreapi.h"
#include "sms-cards.h"
#include "smsir.h"
#include "smsendian.h"
Go to the source code of this file.
|
| module_param_named (debug, sms_dbg, int, 0644) |
|
| MODULE_PARM_DESC (debug,"set debug level (info=1, adv=2 (or-able))") |
|
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 (smscore_set_board_id) |
|
int | smscore_get_board_id (struct smscore_device_t *core) |
|
| EXPORT_SYMBOL_GPL (smscore_get_board_id) |
|
| module_param (default_mode, int, 0644) |
|
| MODULE_PARM_DESC (default_mode,"default firmware id (device mode)") |
|
int | smscore_registry_getmode (char *devpath) |
|
| EXPORT_SYMBOL_GPL (smscore_registry_getmode) |
|
void | smscore_registry_setmode (char *devpath, int mode) |
|
int | smscore_register_hotplug (hotplug_t hotplug) |
|
| EXPORT_SYMBOL_GPL (smscore_register_hotplug) |
|
void | smscore_unregister_hotplug (hotplug_t hotplug) |
|
| EXPORT_SYMBOL_GPL (smscore_unregister_hotplug) |
|
int | smscore_register_device (struct smsdevice_params_t *params, struct smscore_device_t **coredev) |
|
| EXPORT_SYMBOL_GPL (smscore_register_device) |
|
int | smscore_start_device (struct smscore_device_t *coredev) |
|
| EXPORT_SYMBOL_GPL (smscore_start_device) |
|
void | smscore_unregister_device (struct smscore_device_t *coredev) |
|
| EXPORT_SYMBOL_GPL (smscore_unregister_device) |
|
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 (smscore_get_device_mode) |
|
void | smscore_onresponse (struct smscore_device_t *coredev, struct smscore_buffer_t *cb) |
|
| EXPORT_SYMBOL_GPL (smscore_onresponse) |
|
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 (smscore_getbuffer) |
|
void | smscore_putbuffer (struct smscore_device_t *coredev, struct smscore_buffer_t *cb) |
|
| EXPORT_SYMBOL_GPL (smscore_putbuffer) |
|
int | smscore_register_client (struct smscore_device_t *coredev, struct smsclient_params_t *params, struct smscore_client_t **client) |
|
| EXPORT_SYMBOL_GPL (smscore_register_client) |
|
void | smscore_unregister_client (struct smscore_client_t *client) |
|
| EXPORT_SYMBOL_GPL (smscore_unregister_client) |
|
int | smsclient_sendrequest (struct smscore_client_t *client, void *buffer, size_t size) |
|
| EXPORT_SYMBOL_GPL (smsclient_sendrequest) |
|
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) |
|
int | smscore_gpio_configure (struct smscore_device_t *coredev, u8 PinNum, struct smscore_gpio_config *pGpioConfig) |
|
int | smscore_gpio_set_level (struct smscore_device_t *coredev, u8 PinNum, u8 NewLevel) |
|
int | smscore_gpio_get_level (struct smscore_device_t *coredev, u8 PinNum, u8 *level) |
|
| module_init (smscore_module_init) |
|
| module_exit (smscore_module_exit) |
|
| MODULE_DESCRIPTION ("Siano MDTV Core module") |
|
| MODULE_AUTHOR ("Siano Mobile Silicon, Inc. ([email protected])") |
|
| MODULE_LICENSE ("GPL") |
|
return pointer to next free buffer descriptor from core pool
- Parameters
-
coredev | pointer to a coredev object returned by smscore_register_device |
- Returns
- pointer to descriptor on success, NULL on error.
Definition at line 1095 of file smscoreapi.c.
MODULE_AUTHOR |
( |
"Siano Mobile |
Silicon, |
|
|
Inc.(uris @siano-ms.com)" |
|
|
) |
| |
MODULE_DESCRIPTION |
( |
"Siano MDTV Core module" |
| ) |
|
module_exit |
( |
smscore_module_exit |
| ) |
|
module_init |
( |
smscore_module_init |
| ) |
|
module_param |
( |
default_mode |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param_named |
( |
debug |
, |
|
|
sms_dbg |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
verifies that source id is not taken by another client, calls device handler to send requests to the device
- Parameters
-
client | pointer to smsclient object returned by smscore_register_client |
buffer | pointer to a request buffer |
size | size (in bytes) of request buffer |
- Returns
- 0 on success, <0 on error.
Definition at line 1256 of file smscoreapi.c.
calls device handler to get current mode of operation
- Parameters
-
coredev | pointer to a coredev object returned by smscore_register_device |
- Returns
- current mode
Definition at line 920 of file smscoreapi.c.
find client by response id/type, call clients onresponse handler return buffer to pool on error
- Parameters
-
coredev | pointer to a coredev object returned by smscore_register_device |
cb | pointer to response buffer descriptor |
Definition at line 972 of file smscoreapi.c.
return buffer descriptor to a pool
- Parameters
-
coredev | pointer to a coredev object returned by smscore_register_device |
cb | pointer buffer descriptor |
Definition at line 1127 of file smscoreapi.c.
creates smsclient object, check that id is taken by another client
- Parameters
-
coredev | pointer to a coredev object from clients hotplug |
initial_id | all messages with this id would be sent to this client |
data_type | all messages of this type would be sent to this client |
onresponse_handler | client handler that is called to process incoming messages |
onremove_handler | client handler that is called when device is removed |
context | client-specific context |
client | pointer to a value that receives created smsclient object |
- Returns
- 0 on success, <0 on error.
Definition at line 1179 of file smscoreapi.c.
creates coredev object for a device, prepares buffers, creates buffer mappings, notifies registered hotplugs about new device.
- Parameters
-
params | device pointer to struct with device specific parameters and handlers |
coredev | pointer to a value that receives created coredev object |
- Returns
- 0 on success, <0 on error.
Definition at line 321 of file smscoreapi.c.
register a client callback that called when device plugged in/unplugged NOTE: if devices exist callback is called immediately for each device
- Parameters
-
- Returns
- 0 on success, <0 on error.
Definition at line 201 of file smscoreapi.c.
int smscore_registry_getmode |
( |
char * |
devpath | ) |
|
void smscore_registry_setmode |
( |
char * |
devpath, |
|
|
int |
mode |
|
) |
| |
calls device handler to change mode of operation NOTE: stellar/usb may disconnect when changing mode
- Parameters
-
coredev | pointer to a coredev object returned by smscore_register_device |
mode | requested mode of operation |
- Returns
- 0 on success, <0 on error.
Definition at line 807 of file smscoreapi.c.
sets initial device mode and notifies client hotplugs that device is ready
- Parameters
-
coredev | pointer to a coredev object returned by smscore_register_device |
- Returns
- 0 on success, <0 on error.
Definition at line 486 of file smscoreapi.c.
frees smsclient object and all subclients associated with it
- Parameters
-
client | pointer to smsclient object returned by smscore_register_client |
Definition at line 1221 of file smscoreapi.c.
notifies all clients registered with the device, notifies hotplugs, frees all buffers and coredev object
- Parameters
-
coredev | pointer to a coredev object returned by smscore_register_device |
- Returns
- 0 on success, <0 on error.
Definition at line 679 of file smscoreapi.c.
unregister a client callback that called when device plugged in/unplugged
- Parameters
-
Definition at line 242 of file smscoreapi.c.