mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
drivers: remove unimplemented open/close/ioctl interfaces
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
6041a2f0db
commit
09b3fb25ab
@@ -77,8 +77,6 @@ static int charger_online(FAR bool *online);
|
|||||||
static int charger_get_temptable(FAR struct battery_temp_table_s *table);
|
static int charger_get_temptable(FAR struct battery_temp_table_s *table);
|
||||||
static int charger_set_temptable(FAR struct battery_temp_table_s *table);
|
static int charger_set_temptable(FAR struct battery_temp_table_s *table);
|
||||||
|
|
||||||
static int charger_open(FAR struct file *filep);
|
|
||||||
static int charger_close(FAR struct file *filep);
|
|
||||||
static ssize_t charger_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t charger_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t charger_write(FAR struct file *filep,
|
static ssize_t charger_write(FAR struct file *filep,
|
||||||
@@ -92,8 +90,8 @@ static int charger_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_chargerops =
|
static const struct file_operations g_chargerops =
|
||||||
{
|
{
|
||||||
charger_open, /* open */
|
NULL, /* open */
|
||||||
charger_close, /* close */
|
NULL, /* close */
|
||||||
charger_read, /* read */
|
charger_read, /* read */
|
||||||
charger_write, /* write */
|
charger_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -419,32 +417,6 @@ static int charger_set_temptable(FAR struct battery_temp_table_s *table)
|
|||||||
return cxd56_pmic_settemptable(&buf);
|
return cxd56_pmic_settemptable(&buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: charger_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the battery device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int charger_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: charger_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the battery device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int charger_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: charger_read
|
* Name: charger_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -62,14 +62,12 @@ struct bat_gauge_dev_s
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int gauge_open(FAR struct file *filep);
|
|
||||||
static int gauge_close(FAR struct file *filep);
|
|
||||||
static ssize_t gauge_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t gauge_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t gauge_write(FAR struct file *filep,
|
static ssize_t gauge_write(FAR struct file *filep,
|
||||||
FAR const char *buffer, size_t buflen);
|
FAR const char *buffer, size_t buflen);
|
||||||
static int gauge_ioctl(FAR struct file *filep, int cmd,
|
static int gauge_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -77,8 +75,8 @@ static int gauge_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_gaugeops =
|
static const struct file_operations g_gaugeops =
|
||||||
{
|
{
|
||||||
gauge_open, /* open */
|
NULL, /* open */
|
||||||
gauge_close, /* close */
|
NULL, /* close */
|
||||||
gauge_read, /* read */
|
gauge_read, /* read */
|
||||||
gauge_write, /* write */
|
gauge_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -247,32 +245,6 @@ static int gauge_online(FAR bool *online)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: gauge_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the battery device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int gauge_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: gauge_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the battery device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int gauge_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: gauge_read
|
* Name: gauge_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -46,8 +46,6 @@
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int ge2d_open(FAR struct file *filep);
|
|
||||||
static int ge2d_close(FAR struct file *filep);
|
|
||||||
static ssize_t ge2d_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t ge2d_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t len);
|
size_t len);
|
||||||
static ssize_t ge2d_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t ge2d_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -63,12 +61,9 @@ static int ge2d_irqhandler(int irq, FAR void *context, FAR void *arg);
|
|||||||
|
|
||||||
static const struct file_operations g_ge2dfops =
|
static const struct file_operations g_ge2dfops =
|
||||||
{
|
{
|
||||||
.open = ge2d_open,
|
|
||||||
.close = ge2d_close,
|
|
||||||
.read = ge2d_read,
|
.read = ge2d_read,
|
||||||
.write = ge2d_write,
|
.write = ge2d_write,
|
||||||
.seek = NULL,
|
.ioctl = ge2d_ioctl
|
||||||
.ioctl = ge2d_ioctl,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static sem_t g_wait;
|
static sem_t g_wait;
|
||||||
@@ -96,24 +91,6 @@ static void ge2d_semgive(sem_t *id)
|
|||||||
nxsem_post(id);
|
nxsem_post(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: ge2d_open
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int ge2d_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: ge2d_close
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int ge2d_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: ge2d_read
|
* Name: ge2d_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -129,8 +106,7 @@ static ssize_t ge2d_read(FAR struct file *filep,
|
|||||||
* Name: ge2d_write
|
* Name: ge2d_write
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static ssize_t ge2d_write(FAR struct file *filep,
|
static ssize_t ge2d_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
FAR const char *buffer,
|
|
||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
uint32_t bits;
|
uint32_t bits;
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ struct cxd56_geofence_dev_s
|
|||||||
|
|
||||||
/* file operation functions */
|
/* file operation functions */
|
||||||
|
|
||||||
static int cxd56_geofence_open(FAR struct file *filep);
|
|
||||||
static int cxd56_geofence_close(FAR struct file *filep);
|
|
||||||
static ssize_t cxd56_geofence_read(FAR struct file *filep,
|
static ssize_t cxd56_geofence_read(FAR struct file *filep,
|
||||||
FAR char *buffer,
|
FAR char *buffer,
|
||||||
size_t len);
|
size_t len);
|
||||||
@@ -101,8 +99,8 @@ static int cxd56_geofence_set_mode(unsigned long arg);
|
|||||||
|
|
||||||
static const struct file_operations g_geofencefops =
|
static const struct file_operations g_geofencefops =
|
||||||
{
|
{
|
||||||
cxd56_geofence_open, /* open */
|
NULL, /* open */
|
||||||
cxd56_geofence_close, /* close */
|
NULL, /* close */
|
||||||
cxd56_geofence_read, /* read */
|
cxd56_geofence_read, /* read */
|
||||||
NULL, /* write */
|
NULL, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -478,48 +476,6 @@ static int cxd56_geofence_initialize(FAR struct cxd56_geofence_dev_s *dev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: cxd56_geofence_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver open method.
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* filep - File structure pointer
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* Zero (OK) on success; a negated errno value on failure.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int cxd56_geofence_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
int32_t ret = 0;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: cxd56_geofence_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver close method.
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* filep - File structure pointer
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* Zero (OK) on success; a negated errno value on failure.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int cxd56_geofence_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
int32_t ret = 0;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: cxd56_geofence_read
|
* Name: cxd56_geofence_read
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2438,8 +2438,6 @@ static void cxd56_gnss_cpufifoapi_signalhandler(uint32_t data,
|
|||||||
|
|
||||||
priv->apiret = CXD56_CPU1_GET_DATA((int)data);
|
priv->apiret = CXD56_CPU1_GET_DATA((int)data);
|
||||||
nxsem_post(&priv->apiwait);
|
nxsem_post(&priv->apiwait);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -141,8 +141,10 @@ static const struct file_operations g_hif_fops =
|
|||||||
hif_write, /* write */
|
hif_write, /* write */
|
||||||
hif_seek, /* seek */
|
hif_seek, /* seek */
|
||||||
hif_ioctl, /* ioctl */
|
hif_ioctl, /* ioctl */
|
||||||
hif_poll, /* poll */
|
hif_poll /* poll */
|
||||||
hif_unlink /* unlink */
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
|
, hif_unlink /* unlink */
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -343,10 +345,12 @@ static int hif_poll(FAR struct file *filep,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
static int hif_unlink(FAR struct inode *inode)
|
static int hif_unlink(FAR struct inode *inode)
|
||||||
{
|
{
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int hif_rxhandler(int cpuid, int protoid,
|
static int hif_rxhandler(int cpuid, int protoid,
|
||||||
uint32_t pdata, uint32_t data,
|
uint32_t pdata, uint32_t data,
|
||||||
|
|||||||
@@ -92,11 +92,7 @@ static int cxd56_sphirqhandler(int irq, FAR void *context, FAR void *arg);
|
|||||||
static const struct file_operations sph_fops =
|
static const struct file_operations sph_fops =
|
||||||
{
|
{
|
||||||
.open = sph_open,
|
.open = sph_open,
|
||||||
.close = NULL,
|
.ioctl = sph_ioctl
|
||||||
.read = NULL,
|
|
||||||
.write = NULL,
|
|
||||||
.seek = NULL,
|
|
||||||
.ioctl = sph_ioctl,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sph_dev_s g_sphdev[NR_HSEMS];
|
static struct sph_dev_s g_sphdev[NR_HSEMS];
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ static int g_errcode = 0;
|
|||||||
|
|
||||||
static const struct file_operations g_sysctlfops =
|
static const struct file_operations g_sysctlfops =
|
||||||
{
|
{
|
||||||
.ioctl = sysctl_ioctl,
|
.ioctl = sysctl_ioctl
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ static ssize_t uart0_read(FAR struct file *filep,
|
|||||||
FAR char *buffer, size_t len);
|
FAR char *buffer, size_t len);
|
||||||
static ssize_t uart0_write(FAR struct file *filep,
|
static ssize_t uart0_write(FAR struct file *filep,
|
||||||
FAR const char *buffer, size_t len);
|
FAR const char *buffer, size_t len);
|
||||||
static int uart0_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
|
|
||||||
static int uart0_semtake(sem_t *id);
|
static int uart0_semtake(sem_t *id);
|
||||||
static void uart0_semgive(sem_t *id);
|
static void uart0_semgive(sem_t *id);
|
||||||
|
|
||||||
@@ -98,9 +97,7 @@ static const struct file_operations g_uart0fops =
|
|||||||
.open = uart0_open,
|
.open = uart0_open,
|
||||||
.close = uart0_close,
|
.close = uart0_close,
|
||||||
.read = uart0_read,
|
.read = uart0_read,
|
||||||
.write = uart0_write,
|
.write = uart0_write
|
||||||
.seek = NULL,
|
|
||||||
.ioctl = uart0_ioctl,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static sem_t g_lock;
|
static sem_t g_lock;
|
||||||
@@ -251,15 +248,6 @@ static ssize_t uart0_write(FAR struct file *filep,
|
|||||||
return (ssize_t)ret;
|
return (ssize_t)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: uart0_ioctl
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int uart0_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|
||||||
{
|
|
||||||
return -ENOTTY;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: cxd56_uart0initialize
|
* Name: cxd56_uart0initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -52,8 +52,6 @@
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int phyplus_stub_open(FAR struct file *filep);
|
|
||||||
static int phyplus_stub_close(FAR struct file *filep);
|
|
||||||
static ssize_t phyplus_stub_read(
|
static ssize_t phyplus_stub_read(
|
||||||
FAR struct file *filep, FAR char *buffer, size_t buflen);
|
FAR struct file *filep, FAR char *buffer, size_t buflen);
|
||||||
static ssize_t phyplus_stub_write(
|
static ssize_t phyplus_stub_write(
|
||||||
@@ -70,15 +68,15 @@ static int phyplus_stub_ioctl(
|
|||||||
|
|
||||||
static const struct file_operations g_stub_drvrops =
|
static const struct file_operations g_stub_drvrops =
|
||||||
{
|
{
|
||||||
phyplus_stub_open, /* open */
|
NULL, /* open */
|
||||||
phyplus_stub_close, /* close */
|
NULL, /* close */
|
||||||
phyplus_stub_read, /* read */
|
phyplus_stub_read, /* read */
|
||||||
phyplus_stub_write, /* write */
|
phyplus_stub_write, /* write */
|
||||||
phyplus_stub_seek, /* seek */
|
phyplus_stub_seek, /* seek */
|
||||||
phyplus_stub_ioctl, /* ioctl */
|
phyplus_stub_ioctl, /* ioctl */
|
||||||
NULL /* poll */
|
NULL /* poll */
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
, NULL /* unlink */
|
, NULL /* unlink */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -566,33 +564,6 @@ static int phyplus_parse_params_and_action(char *buff)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: phyplus_stub_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver open method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int phyplus_stub_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
filep->f_pos = 0;
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: phyplus_stub_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver close method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int phyplus_stub_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: phyplus_gpio_read
|
* Name: phyplus_gpio_read
|
||||||
*
|
*
|
||||||
@@ -633,7 +604,7 @@ static ssize_t phyplus_stub_read(
|
|||||||
static char phyplus_cmd[CMD_LEN];
|
static char phyplus_cmd[CMD_LEN];
|
||||||
|
|
||||||
static ssize_t phyplus_stub_write(FAR struct file *filep,
|
static ssize_t phyplus_stub_write(FAR struct file *filep,
|
||||||
FAR const char *buffer, size_t buflen)
|
FAR const char *buffer, size_t buflen)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode;
|
FAR struct inode *inode;
|
||||||
|
|
||||||
@@ -686,8 +657,8 @@ static ssize_t phyplus_stub_write(FAR struct file *filep,
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static off_t phyplus_stub_seek(FAR struct file *filep,
|
static off_t phyplus_stub_seek(FAR struct file *filep, off_t offset,
|
||||||
off_t offset, int whence)
|
int whence)
|
||||||
{
|
{
|
||||||
/* Only SEEK_SET is supported, return ENOSYS for other valid options */
|
/* Only SEEK_SET is supported, return ENOSYS for other valid options */
|
||||||
|
|
||||||
@@ -717,8 +688,8 @@ static off_t phyplus_stub_seek(FAR struct file *filep,
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int phyplus_stub_ioctl(FAR struct file *filep,
|
static int phyplus_stub_ioctl(FAR struct file *filep, int cmd,
|
||||||
int cmd, unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode;
|
FAR struct inode *inode;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <nuttx/serial/serial.h>
|
#include <nuttx/serial/serial.h>
|
||||||
#include <nuttx/net/netdev.h>
|
#include <nuttx/net/netdev.h>
|
||||||
#include <../../../../net/netdev/netdev.h>
|
#include <nuttx/net/netdev/netdev.h>
|
||||||
#include "amebaz_hci_board.h"
|
#include "amebaz_hci_board.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -1675,7 +1675,7 @@ int sam_tsd_register(struct sam_adc_s *adc, int minor)
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &g_tsdops, 0666, priv);
|
ret = register_driver(devname, &g_tsdops, 0666, priv);
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ static const struct file_operations stm32_bbsram_fops =
|
|||||||
.ioctl = stm32_bbsram_ioctl,
|
.ioctl = stm32_bbsram_ioctl,
|
||||||
.poll = stm32_bbsram_poll,
|
.poll = stm32_bbsram_poll,
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
.unlink = stm32_bbsram_unlink,
|
.unlink = stm32_bbsram_unlink
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ static const struct file_operations stm32_bbsram_fops =
|
|||||||
.ioctl = stm32_bbsram_ioctl,
|
.ioctl = stm32_bbsram_ioctl,
|
||||||
.poll = stm32_bbsram_poll,
|
.poll = stm32_bbsram_poll,
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
.unlink = stm32_bbsram_unlink,
|
.unlink = stm32_bbsram_unlink
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ static const struct file_operations stm32_bbsram_fops =
|
|||||||
.ioctl = stm32_bbsram_ioctl,
|
.ioctl = stm32_bbsram_ioctl,
|
||||||
.poll = stm32_bbsram_poll,
|
.poll = stm32_bbsram_poll,
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
.unlink = stm32_bbsram_unlink,
|
.unlink = stm32_bbsram_unlink
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ static const struct file_operations rx65n_sbram_fops =
|
|||||||
.ioctl = rx65n_sbram_ioctl,
|
.ioctl = rx65n_sbram_ioctl,
|
||||||
.poll = rx65n_sbram_poll,
|
.poll = rx65n_sbram_poll,
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
.unlink = rx65n_sbram_unlink,
|
.unlink = rx65n_sbram_unlink
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ int sim_tsc_initialize(int minor)
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = touch_register(&priv->lower, devname, 1);
|
ret = touch_register(&priv->lower, devname, 1);
|
||||||
@@ -162,7 +162,7 @@ int sim_tsc_uninitialize(void)
|
|||||||
|
|
||||||
/* Un-register the device */
|
/* Un-register the device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, priv->minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, priv->minor);
|
||||||
iinfo("Un-registering %s\n", devname);
|
iinfo("Un-registering %s\n", devname);
|
||||||
|
|
||||||
touch_unregister(&priv->lower, devname);
|
touch_unregister(&priv->lower, devname);
|
||||||
|
|||||||
@@ -203,8 +203,6 @@ typedef enum
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int keypad_open(struct file *filep);
|
|
||||||
static int keypad_close(struct file *filep);
|
|
||||||
static ssize_t keypad_read(struct file *filep, FAR char *buf, size_t buflen);
|
static ssize_t keypad_read(struct file *filep, FAR char *buf, size_t buflen);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -253,15 +251,15 @@ static const unsigned char g_kdbus[128] =
|
|||||||
|
|
||||||
static const struct file_operations g_keypadops =
|
static const struct file_operations g_keypadops =
|
||||||
{
|
{
|
||||||
keypad_open, /* open */
|
NULL, /* open */
|
||||||
keypad_close, /* close */
|
NULL, /* close */
|
||||||
keypad_read, /* read */
|
keypad_read, /* read */
|
||||||
NULL, /* write */
|
NULL, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
NULL, /* ioctl */
|
NULL, /* ioctl */
|
||||||
NULL /* poll */
|
NULL /* poll */
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
, NULL /* unlink */
|
, NULL /* unlink */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -269,16 +267,6 @@ static const struct file_operations g_keypadops =
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int keypad_open(struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int keypad_close(struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t keypad_read(struct file *filep, FAR char *buf, size_t buflen)
|
static ssize_t keypad_read(struct file *filep, FAR char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
uint_fast8_t keycode = 0;
|
uint_fast8_t keycode = 0;
|
||||||
|
|||||||
@@ -109,11 +109,9 @@ static int vga_getpower(struct lcd_dev_s *dev);
|
|||||||
static int vga_setpower(struct lcd_dev_s *dev, int power);
|
static int vga_setpower(struct lcd_dev_s *dev, int power);
|
||||||
static int vga_getcontrast(struct lcd_dev_s *dev);
|
static int vga_getcontrast(struct lcd_dev_s *dev);
|
||||||
static int vga_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
|
static int vga_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
|
||||||
static int vga_open(struct file *filep);
|
|
||||||
static int vga_close(struct file *filep);
|
|
||||||
static ssize_t vga_read(struct file *filep, FAR char *buf, size_t buflen);
|
static ssize_t vga_read(struct file *filep, FAR char *buf, size_t buflen);
|
||||||
static ssize_t vga_write(struct file *filep,
|
static ssize_t vga_write(struct file *filep, FAR const char *buf,
|
||||||
FAR const char *buf, size_t buflen);
|
size_t buflen);
|
||||||
static off_t vga_seek(FAR struct file *filp, off_t offset, int whence);
|
static off_t vga_seek(FAR struct file *filp, off_t offset, int whence);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -233,15 +231,15 @@ static struct lcd_dev_s g_lcddev =
|
|||||||
|
|
||||||
static const struct file_operations g_vgaops =
|
static const struct file_operations g_vgaops =
|
||||||
{
|
{
|
||||||
vga_open, /* open */
|
NULL, /* open */
|
||||||
vga_close, /* close */
|
NULL, /* close */
|
||||||
vga_read, /* read */
|
vga_read, /* read */
|
||||||
vga_write, /* write */
|
vga_write, /* write */
|
||||||
vga_seek, /* seek */
|
vga_seek, /* seek */
|
||||||
NULL, /* ioctl */
|
NULL, /* ioctl */
|
||||||
NULL /* poll */
|
NULL /* poll */
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
, NULL /* unlink */
|
, NULL /* unlink */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -472,16 +470,6 @@ static int vga_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
|||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vga_open(struct file * filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int vga_close(struct file * filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t vga_read(struct file *filep, FAR char *buf, size_t buflen)
|
static ssize_t vga_read(struct file *filep, FAR char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
if (buf == NULL || buflen < 1)
|
if (buf == NULL || buflen < 1)
|
||||||
@@ -494,8 +482,8 @@ static ssize_t vga_read(struct file *filep, FAR char *buf, size_t buflen)
|
|||||||
return buflen;
|
return buflen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t vga_write(struct file *filep,
|
static ssize_t vga_write(struct file *filep, FAR const char *buf,
|
||||||
FAR const char *buf, size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
|
|||||||
@@ -103,8 +103,6 @@
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int himem_open(struct file *filep);
|
|
||||||
static int himem_close(struct file *filep);
|
|
||||||
static ssize_t himem_read(struct file *filep, char *buffer,
|
static ssize_t himem_read(struct file *filep, char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t himem_write(struct file *filep, const char *buffer,
|
static ssize_t himem_write(struct file *filep, const char *buffer,
|
||||||
@@ -151,8 +149,8 @@ irqstate_t spinlock_flags;
|
|||||||
|
|
||||||
static const struct file_operations g_himemfops =
|
static const struct file_operations g_himemfops =
|
||||||
{
|
{
|
||||||
himem_open, /* open */
|
NULL, /* open */
|
||||||
himem_close, /* close */
|
NULL, /* close */
|
||||||
himem_read, /* read */
|
himem_read, /* read */
|
||||||
himem_write, /* write */
|
himem_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -647,32 +645,6 @@ int esp_himem_unmap(esp_himem_rangehandle_t range, void *ptr,
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: himem_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the LM-75 device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int himem_open(struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: himem_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the LM-75 device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int himem_close(struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: himem_read
|
* Name: himem_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -699,7 +671,7 @@ static ssize_t himem_write(struct file *filep, const char *buffer,
|
|||||||
|
|
||||||
static int himem_ioctl(struct file *filep, int cmd, unsigned long arg)
|
static int himem_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
int ret = OK;
|
int ret = OK;
|
||||||
|
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -175,9 +175,11 @@ static const struct file_operations g_bmp280pressfops =
|
|||||||
bmp280_close_press, /* close */
|
bmp280_close_press, /* close */
|
||||||
bmp280_read_press, /* read */
|
bmp280_read_press, /* read */
|
||||||
bmp280_write, /* write */
|
bmp280_write, /* write */
|
||||||
0, /* seek */
|
NULL, /* seek */
|
||||||
bmp280_ioctl_press, /* ioctl */
|
bmp280_ioctl_press /* ioctl */
|
||||||
0 /* unlink */
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
|
, NULL /* unlink */
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct file_operations g_bmp280tempfops =
|
static const struct file_operations g_bmp280tempfops =
|
||||||
@@ -186,9 +188,11 @@ static const struct file_operations g_bmp280tempfops =
|
|||||||
bmp280_close_temp, /* close */
|
bmp280_close_temp, /* close */
|
||||||
bmp280_read_temp, /* read */
|
bmp280_read_temp, /* read */
|
||||||
bmp280_write, /* write */
|
bmp280_write, /* write */
|
||||||
0, /* seek */
|
NULL, /* seek */
|
||||||
bmp280_ioctl_temp, /* ioctl */
|
bmp280_ioctl_temp /* ioctl */
|
||||||
0 /* unlink */
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
|
, NULL /* unlink */
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/* SCU instructions for pick pressure sensing data. */
|
/* SCU instructions for pick pressure sensing data. */
|
||||||
|
|||||||
@@ -1517,7 +1517,7 @@ int stm32_tsc_setup(int minor)
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &tc_fops, 0666, priv);
|
ret = register_driver(devname, &tc_fops, 0666, priv);
|
||||||
|
|||||||
@@ -1381,7 +1381,7 @@ int pic32mx_tsc_setup(int minor)
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &tc_fops, 0666, priv);
|
ret = register_driver(devname, &tc_fops, 0666, priv);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
static int dac_open(FAR struct file *filep);
|
static int dac_open(FAR struct file *filep);
|
||||||
static int dac_close(FAR struct file *filep);
|
static int dac_close(FAR struct file *filep);
|
||||||
static ssize_t dac_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t dac_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static int dac_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
|
static int dac_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
+2
-30
@@ -65,8 +65,6 @@ struct efuse_upperhalf_s
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int efuse_open(FAR struct file *filep);
|
|
||||||
static int efuse_close(FAR struct file *filep);
|
|
||||||
static ssize_t efuse_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t efuse_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t efuse_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t efuse_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -80,8 +78,8 @@ static int efuse_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_efuseops =
|
static const struct file_operations g_efuseops =
|
||||||
{
|
{
|
||||||
efuse_open, /* open */
|
NULL, /* open */
|
||||||
efuse_close, /* close */
|
NULL, /* close */
|
||||||
efuse_read, /* read */
|
efuse_read, /* read */
|
||||||
efuse_write, /* write */
|
efuse_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -96,32 +94,6 @@ static const struct file_operations g_efuseops =
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: efuse_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the efuse timer device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int efuse_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: efuse_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called when the efuse timer device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int efuse_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: efuse_read
|
* Name: efuse_read
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -85,15 +85,15 @@ static void ads7843e_lock(FAR struct spi_dev_s *spi);
|
|||||||
static void ads7843e_unlock(FAR struct spi_dev_s *spi);
|
static void ads7843e_unlock(FAR struct spi_dev_s *spi);
|
||||||
|
|
||||||
static uint16_t ads7843e_sendcmd(FAR struct ads7843e_dev_s *priv,
|
static uint16_t ads7843e_sendcmd(FAR struct ads7843e_dev_s *priv,
|
||||||
uint8_t cmd);
|
uint8_t cmd);
|
||||||
|
|
||||||
/* Interrupts and data sampling */
|
/* Interrupts and data sampling */
|
||||||
|
|
||||||
static void ads7843e_notify(FAR struct ads7843e_dev_s *priv);
|
static void ads7843e_notify(FAR struct ads7843e_dev_s *priv);
|
||||||
static int ads7843e_sample(FAR struct ads7843e_dev_s *priv,
|
static int ads7843e_sample(FAR struct ads7843e_dev_s *priv,
|
||||||
FAR struct ads7843e_sample_s *sample);
|
FAR struct ads7843e_sample_s *sample);
|
||||||
static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv,
|
static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv,
|
||||||
FAR struct ads7843e_sample_s *sample);
|
FAR struct ads7843e_sample_s *sample);
|
||||||
static void ads7843e_worker(FAR void *arg);
|
static void ads7843e_worker(FAR void *arg);
|
||||||
static int ads7843e_interrupt(int irq, FAR void *context, FAR void *arg);
|
static int ads7843e_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||||
|
|
||||||
@@ -102,11 +102,11 @@ static int ads7843e_interrupt(int irq, FAR void *context, FAR void *arg);
|
|||||||
static int ads7843e_open(FAR struct file *filep);
|
static int ads7843e_open(FAR struct file *filep);
|
||||||
static int ads7843e_close(FAR struct file *filep);
|
static int ads7843e_close(FAR struct file *filep);
|
||||||
static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t len);
|
size_t len);
|
||||||
static int ads7843e_ioctl(FAR struct file *filep, int cmd,
|
static int ads7843e_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
static int ads7843e_poll(FAR struct file *filep, struct pollfd *fds,
|
static int ads7843e_poll(FAR struct file *filep, struct pollfd *fds,
|
||||||
bool setup);
|
bool setup);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -317,7 +317,7 @@ static void ads7843e_notify(FAR struct ads7843e_dev_s *priv)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int ads7843e_sample(FAR struct ads7843e_dev_s *priv,
|
static int ads7843e_sample(FAR struct ads7843e_dev_s *priv,
|
||||||
FAR struct ads7843e_sample_s *sample)
|
FAR struct ads7843e_sample_s *sample)
|
||||||
{
|
{
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
int ret = -EAGAIN;
|
int ret = -EAGAIN;
|
||||||
@@ -1018,7 +1018,7 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||||
bool setup)
|
bool setup)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode;
|
FAR struct inode *inode;
|
||||||
FAR struct ads7843e_dev_s *priv;
|
FAR struct ads7843e_dev_s *priv;
|
||||||
@@ -1203,7 +1203,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi,
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &ads7843e_fops, 0666, priv);
|
ret = register_driver(devname, &ads7843e_fops, 0666, priv);
|
||||||
|
|||||||
@@ -1175,7 +1175,7 @@ int ft5x06_register(FAR struct i2c_master_s *i2c,
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &ft5x06_fops, 0666, priv);
|
ret = register_driver(devname, &ft5x06_fops, 0666, priv);
|
||||||
|
|||||||
@@ -1236,7 +1236,7 @@ int max11802_register(FAR struct spi_dev_s *spi,
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &max11802_fops, 0666, priv);
|
ret = register_driver(devname, &max11802_fops, 0666, priv);
|
||||||
|
|||||||
+1
-1
@@ -1915,7 +1915,7 @@ int mxt_register(FAR struct i2c_master_s *i2c,
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &mxt_fops, 0666, priv);
|
ret = register_driver(devname, &mxt_fops, 0666, priv);
|
||||||
|
|||||||
@@ -97,16 +97,16 @@ static inline int nunchuck_takesem(sem_t *sem);
|
|||||||
static int nunchuck_open(FAR struct file *filep);
|
static int nunchuck_open(FAR struct file *filep);
|
||||||
static int nunchuck_close(FAR struct file *filep);
|
static int nunchuck_close(FAR struct file *filep);
|
||||||
static ssize_t nunchuck_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t nunchuck_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static int nunchuck_ioctl(FAR struct file *filep, int cmd,
|
static int nunchuck_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
|
|
||||||
/* I2C Helpers */
|
/* I2C Helpers */
|
||||||
|
|
||||||
static int nunchuck_i2c_read(FAR struct nunchuck_dev_s *priv,
|
static int nunchuck_i2c_read(FAR struct nunchuck_dev_s *priv,
|
||||||
FAR uint8_t *regval, int len);
|
FAR uint8_t *regval, int len);
|
||||||
static int nunchuck_i2c_write(FAR struct nunchuck_dev_s *priv,
|
static int nunchuck_i2c_write(FAR struct nunchuck_dev_s *priv,
|
||||||
uint8_t const *data, int len);
|
uint8_t const *data, int len);
|
||||||
static int nunchuck_sample(FAR struct nunchuck_dev_s *priv,
|
static int nunchuck_sample(FAR struct nunchuck_dev_s *priv,
|
||||||
FAR struct nunchuck_sample_s *buffer);
|
FAR struct nunchuck_sample_s *buffer);
|
||||||
|
|
||||||
|
|||||||
@@ -1060,7 +1060,7 @@ int spq10kbd_register(FAR struct i2c_master_s *i2c,
|
|||||||
|
|
||||||
priv->config->enable(priv->config, true);
|
priv->config->enable(priv->config, true);
|
||||||
|
|
||||||
snprintf(kbddevname, DEV_NAMELEN, DEV_FORMAT, kbdminor);
|
snprintf(kbddevname, sizeof(kbddevname), DEV_FORMAT, kbdminor);
|
||||||
iinfo("Registering %s\n", kbddevname);
|
iinfo("Registering %s\n", kbddevname);
|
||||||
ret = register_driver(kbddevname, &g_hidkbd_fops, 0666, priv);
|
ret = register_driver(kbddevname, &g_hidkbd_fops, 0666, priv);
|
||||||
|
|
||||||
|
|||||||
@@ -91,20 +91,20 @@
|
|||||||
|
|
||||||
static void stmpe811_notify(FAR struct stmpe811_dev_s *priv);
|
static void stmpe811_notify(FAR struct stmpe811_dev_s *priv);
|
||||||
static int stmpe811_sample(FAR struct stmpe811_dev_s *priv,
|
static int stmpe811_sample(FAR struct stmpe811_dev_s *priv,
|
||||||
FAR struct stmpe811_sample_s *sample);
|
FAR struct stmpe811_sample_s *sample);
|
||||||
static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv,
|
static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv,
|
||||||
FAR struct stmpe811_sample_s *sample);
|
FAR struct stmpe811_sample_s *sample);
|
||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int stmpe811_open(FAR struct file *filep);
|
static int stmpe811_open(FAR struct file *filep);
|
||||||
static int stmpe811_close(FAR struct file *filep);
|
static int stmpe811_close(FAR struct file *filep);
|
||||||
static ssize_t stmpe811_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t stmpe811_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t len);
|
size_t len);
|
||||||
static int stmpe811_ioctl(FAR struct file *filep, int cmd,
|
static int stmpe811_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
static int stmpe811_poll(FAR struct file *filep, struct pollfd *fds,
|
static int stmpe811_poll(FAR struct file *filep, struct pollfd *fds,
|
||||||
bool setup);
|
bool setup);
|
||||||
|
|
||||||
/* Initialization logic */
|
/* Initialization logic */
|
||||||
|
|
||||||
@@ -886,7 +886,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor)
|
|||||||
|
|
||||||
/* Register the character driver */
|
/* Register the character driver */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
ret = register_driver(devname, &g_stmpe811fops, 0666, priv);
|
ret = register_driver(devname, &g_stmpe811fops, 0666, priv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ static int touch_close(FAR struct file *filep)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static ssize_t touch_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t touch_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode = filep->f_inode;
|
FAR struct inode *inode = filep->f_inode;
|
||||||
FAR struct touch_upperhalf_s *upper = inode->i_private;
|
FAR struct touch_upperhalf_s *upper = inode->i_private;
|
||||||
@@ -222,8 +222,8 @@ static ssize_t touch_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
* Name: touch_read
|
* Name: touch_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t touch_read(FAR struct file *filep, FAR char *buffer,
|
||||||
touch_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
FAR struct touch_openpriv_s *openpriv = filep->f_priv;
|
FAR struct touch_openpriv_s *openpriv = filep->f_priv;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -1267,7 +1267,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
|||||||
|
|
||||||
/* Register the device as an input device */
|
/* Register the device as an input device */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
iinfo("Registering %s\n", devname);
|
iinfo("Registering %s\n", devname);
|
||||||
|
|
||||||
ret = register_driver(devname, &tsc2007_fops, 0666, priv);
|
ret = register_driver(devname, &tsc2007_fops, 0666, priv);
|
||||||
|
|||||||
@@ -44,8 +44,6 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int gpio_handler(FAR struct gpio_dev_s *dev, uint8_t pin);
|
static int gpio_handler(FAR struct gpio_dev_s *dev, uint8_t pin);
|
||||||
static int gpio_open(FAR struct file *filep);
|
|
||||||
static int gpio_close(FAR struct file *filep);
|
|
||||||
static ssize_t gpio_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t gpio_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t gpio_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t gpio_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -60,8 +58,8 @@ static int gpio_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_gpio_drvrops =
|
static const struct file_operations g_gpio_drvrops =
|
||||||
{
|
{
|
||||||
gpio_open, /* open */
|
NULL, /* open */
|
||||||
gpio_close, /* close */
|
NULL, /* close */
|
||||||
gpio_read, /* read */
|
gpio_read, /* read */
|
||||||
gpio_write, /* write */
|
gpio_write, /* write */
|
||||||
gpio_seek, /* seek */
|
gpio_seek, /* seek */
|
||||||
@@ -106,33 +104,6 @@ static int gpio_handler(FAR struct gpio_dev_s *dev, uint8_t pin)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: gpio_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver open method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int gpio_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
filep->f_pos = 0;
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: gpio_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver close method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int gpio_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: gpio_read
|
* Name: gpio_read
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -137,8 +137,6 @@ static void ht16k33_clear_display(FAR struct ht16k33_dev_s *priv);
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int ht16k33_open(FAR struct file *filep);
|
|
||||||
static int ht16k33_close(FAR struct file *filep);
|
|
||||||
static ssize_t ht16k33_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t ht16k33_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t ht16k33_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t ht16k33_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -146,7 +144,7 @@ static ssize_t ht16k33_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
static off_t ht16k33_seek(FAR struct file *filep, off_t offset,
|
static off_t ht16k33_seek(FAR struct file *filep, off_t offset,
|
||||||
int whence);
|
int whence);
|
||||||
static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -154,8 +152,8 @@ static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_ht16k33fops =
|
static const struct file_operations g_ht16k33fops =
|
||||||
{
|
{
|
||||||
ht16k33_open, /* open */
|
NULL, /* open */
|
||||||
ht16k33_close, /* close */
|
NULL, /* close */
|
||||||
ht16k33_read, /* read */
|
ht16k33_read, /* read */
|
||||||
ht16k33_write, /* write */
|
ht16k33_write, /* write */
|
||||||
ht16k33_seek, /* seek */
|
ht16k33_seek, /* seek */
|
||||||
@@ -774,39 +772,13 @@ static void lcd_init(FAR struct ht16k33_dev_s *priv)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void lcd_curpos_to_fpos(FAR struct ht16k33_dev_s *priv,
|
static void lcd_curpos_to_fpos(FAR struct ht16k33_dev_s *priv,
|
||||||
uint8_t row, uint8_t col, FAR off_t *fpos)
|
uint8_t row, uint8_t col, FAR off_t *fpos)
|
||||||
{
|
{
|
||||||
/* the logical file position is the linear position plus any synthetic LF */
|
/* the logical file position is the linear position plus any synthetic LF */
|
||||||
|
|
||||||
*fpos = (row * HT16K33_MAX_COL) + col + row;
|
*fpos = (row * HT16K33_MAX_COL) + col + row;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: ht16k33_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the HT16K33 device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int ht16k33_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: ht16k33_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the LM-75 device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int ht16k33_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: ht16k33_read
|
* Name: ht16k33_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -822,7 +794,7 @@ static ssize_t ht16k33_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static ssize_t ht16k33_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t ht16k33_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode = filep->f_inode;
|
FAR struct inode *inode = filep->f_inode;
|
||||||
FAR struct ht16k33_dev_s *priv = inode->i_private;
|
FAR struct ht16k33_dev_s *priv = inode->i_private;
|
||||||
@@ -1031,7 +1003,7 @@ static off_t ht16k33_seek(FAR struct file *filep, off_t offset, int whence)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
@@ -1155,7 +1127,7 @@ int ht16k33_register(int devno, FAR struct i2c_master_s *i2c)
|
|||||||
|
|
||||||
/* Create the character device name */
|
/* Create the character device name */
|
||||||
|
|
||||||
snprintf(devname, DEVNAME_FMTLEN, DEVNAME_FMT, devno);
|
snprintf(devname, sizeof(devname), DEVNAME_FMT, devno);
|
||||||
|
|
||||||
/* Register the driver */
|
/* Register the driver */
|
||||||
|
|
||||||
|
|||||||
+2
-26
@@ -59,8 +59,6 @@ struct lcddev_dev_s
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int lcddev_open(FAR struct file *filep);
|
|
||||||
static int lcddev_close(FAR struct file *filep);
|
|
||||||
static int lcddev_ioctl(FAR struct file *filep, int cmd,
|
static int lcddev_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
|
|
||||||
@@ -70,8 +68,8 @@ static int lcddev_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations lcddev_fops =
|
static const struct file_operations lcddev_fops =
|
||||||
{
|
{
|
||||||
lcddev_open, /* open */
|
NULL, /* open */
|
||||||
lcddev_close, /* close */
|
NULL, /* close */
|
||||||
NULL, /* read */
|
NULL, /* read */
|
||||||
NULL, /* write */
|
NULL, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -86,28 +84,6 @@ static const struct file_operations lcddev_fops =
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: lcddev_open
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int lcddev_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
/* Nothing to do */
|
|
||||||
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: lcddev_close
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int lcddev_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
/* Nothing to do */
|
|
||||||
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lcddev_ioctl
|
* Name: lcddev_ioctl
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ static off_t pcf8574_lcd_seek(FAR struct file *filep, off_t offset,
|
|||||||
int whence);
|
int whence);
|
||||||
static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
static int pcf8574lcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
static int pcf8574_lcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||||
bool setup);
|
bool setup);
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
static int pcf8574_lcd_unlink(FAR struct inode *inode);
|
static int pcf8574_lcd_unlink(FAR struct inode *inode);
|
||||||
#endif
|
#endif
|
||||||
@@ -123,7 +123,7 @@ static const struct file_operations g_pcf8574_lcd_fops =
|
|||||||
pcf8574_lcd_write, /* write */
|
pcf8574_lcd_write, /* write */
|
||||||
pcf8574_lcd_seek, /* seek */
|
pcf8574_lcd_seek, /* seek */
|
||||||
pcf8574_lcd_ioctl, /* ioctl */
|
pcf8574_lcd_ioctl, /* ioctl */
|
||||||
pcf8574lcd_poll /* poll */
|
pcf8574_lcd_poll /* poll */
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
, pcf8574_lcd_unlink /* unlink */
|
, pcf8574_lcd_unlink /* unlink */
|
||||||
#endif
|
#endif
|
||||||
@@ -1548,11 +1548,11 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pcf8574lcd_poll
|
* Name: pcf8574_lcd_poll
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int pcf8574lcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
static int pcf8574_lcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||||
bool setup)
|
bool setup)
|
||||||
{
|
{
|
||||||
if (setup)
|
if (setup)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-30
@@ -94,8 +94,6 @@ static void lcd_scroll_up(FAR struct st7032_dev_s *priv);
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int st7032_open(FAR struct file *filep);
|
|
||||||
static int st7032_close(FAR struct file *filep);
|
|
||||||
static ssize_t st7032_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t st7032_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t st7032_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t st7032_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -110,8 +108,8 @@ static int st7032_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_st7032fops =
|
static const struct file_operations g_st7032fops =
|
||||||
{
|
{
|
||||||
st7032_open, /* open */
|
NULL, /* open */
|
||||||
st7032_close, /* close */
|
NULL, /* close */
|
||||||
st7032_read, /* read */
|
st7032_read, /* read */
|
||||||
st7032_write, /* write */
|
st7032_write, /* write */
|
||||||
st7032_seek, /* seek */
|
st7032_seek, /* seek */
|
||||||
@@ -703,32 +701,6 @@ static void lcd_curpos_to_fpos(FAR struct st7032_dev_s *priv,
|
|||||||
*fpos = (row * ST7032_MAX_COL) + col + row;
|
*fpos = (row * ST7032_MAX_COL) + col + row;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: st7032_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the ST7032 device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int st7032_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: st7032_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the LM-75 device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int st7032_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: st7032_read
|
* Name: st7032_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
+3
-31
@@ -60,8 +60,6 @@ static inline void apa102_write32(FAR struct apa102_dev_s *priv,
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int apa102_open(FAR struct file *filep);
|
|
||||||
static int apa102_close(FAR struct file *filep);
|
|
||||||
static ssize_t apa102_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t apa102_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t apa102_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t apa102_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -73,8 +71,8 @@ static ssize_t apa102_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
|
|
||||||
static const struct file_operations g_apa102fops =
|
static const struct file_operations g_apa102fops =
|
||||||
{
|
{
|
||||||
apa102_open, /* open */
|
NULL, /* open */
|
||||||
apa102_close, /* close */
|
NULL, /* close */
|
||||||
apa102_read, /* read */
|
apa102_read, /* read */
|
||||||
apa102_write, /* write */
|
apa102_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -138,32 +136,6 @@ static inline void apa102_write32(FAR struct apa102_dev_s *priv,
|
|||||||
SPI_LOCK(priv->spi, false);
|
SPI_LOCK(priv->spi, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: apa102_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the APA102 device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int apa102_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: apa102_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the APA102 device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int apa102_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: apa102_read
|
* Name: apa102_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -179,7 +151,7 @@ static ssize_t apa102_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static ssize_t apa102_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t apa102_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode = filep->f_inode;
|
FAR struct inode *inode = filep->f_inode;
|
||||||
FAR struct apa102_dev_s *priv = inode->i_private;
|
FAR struct apa102_dev_s *priv = inode->i_private;
|
||||||
|
|||||||
+4
-32
@@ -70,12 +70,10 @@ static inline void max7219_write16(FAR struct max7219_dev_s *priv,
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int max7219_open(FAR struct file *filep);
|
|
||||||
static int max7219_close(FAR struct file *filep);
|
|
||||||
static ssize_t max7219_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t max7219_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t max7219_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t max7219_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -83,8 +81,8 @@ static ssize_t max7219_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
|
|
||||||
static const struct file_operations g_max7219fops =
|
static const struct file_operations g_max7219fops =
|
||||||
{
|
{
|
||||||
max7219_open, /* open */
|
NULL, /* open */
|
||||||
max7219_close, /* close */
|
NULL, /* close */
|
||||||
max7219_read, /* read */
|
max7219_read, /* read */
|
||||||
max7219_write, /* write */
|
max7219_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -153,32 +151,6 @@ static inline void max7219_write16(FAR struct max7219_dev_s *priv,
|
|||||||
SPI_LOCK(priv->spi, false);
|
SPI_LOCK(priv->spi, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: max7219_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the MAX7219 device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int max7219_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: max7219_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the LM-75 device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int max7219_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: max7219_read
|
* Name: max7219_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -194,7 +166,7 @@ static ssize_t max7219_read(FAR struct file *filep,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static ssize_t max7219_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t max7219_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode = filep->f_inode;
|
FAR struct inode *inode = filep->f_inode;
|
||||||
FAR struct max7219_dev_s *priv = inode->i_private;
|
FAR struct max7219_dev_s *priv = inode->i_private;
|
||||||
|
|||||||
+2
-30
@@ -111,8 +111,6 @@ static void ws2812_pack(FAR uint8_t *buf, uint32_t rgb);
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int ws2812_open(FAR struct file *filep);
|
|
||||||
static int ws2812_close(FAR struct file *filep);
|
|
||||||
static ssize_t ws2812_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t ws2812_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t ws2812_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t ws2812_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -125,8 +123,8 @@ static off_t ws2812_seek(FAR struct file *filep, off_t offset, int whence);
|
|||||||
|
|
||||||
static const struct file_operations g_ws2812fops =
|
static const struct file_operations g_ws2812fops =
|
||||||
{
|
{
|
||||||
ws2812_open, /* open */
|
NULL, /* open */
|
||||||
ws2812_close, /* close */
|
NULL, /* close */
|
||||||
ws2812_read, /* read */
|
ws2812_read, /* read */
|
||||||
ws2812_write, /* write */
|
ws2812_write, /* write */
|
||||||
ws2812_seek, /* seek */
|
ws2812_seek, /* seek */
|
||||||
@@ -206,32 +204,6 @@ static void ws2812_pack(FAR uint8_t *buf, uint32_t rgb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: ws2812_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the WS2812 device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int ws2812_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: ws2812_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the WS2812 device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int ws2812_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: ws2812_read
|
* Name: ws2812_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
+2
-30
@@ -60,8 +60,6 @@ struct cordic_upperhalf_s
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int cordic_open(FAR struct file *filep);
|
|
||||||
static int cordic_close(FAR struct file *filep);
|
|
||||||
static ssize_t cordic_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t cordic_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t cordic_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t cordic_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -75,8 +73,8 @@ static int cordic_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_cordicops =
|
static const struct file_operations g_cordicops =
|
||||||
{
|
{
|
||||||
cordic_open, /* open */
|
NULL, /* open */
|
||||||
cordic_close, /* close */
|
NULL, /* close */
|
||||||
cordic_read, /* read */
|
cordic_read, /* read */
|
||||||
cordic_write, /* write */
|
cordic_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -91,32 +89,6 @@ static const struct file_operations g_cordicops =
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: cordic_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the cordic timer device is opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int cordic_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: cordic_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called when the cordic timer device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int cordic_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: cordic_read
|
* Name: cordic_read
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -110,8 +110,6 @@ static ssize_t lwlconsole_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t lwlconsole_write(FAR struct file *filep,
|
static ssize_t lwlconsole_write(FAR struct file *filep,
|
||||||
FAR const char *buffer, size_t buflen);
|
FAR const char *buffer, size_t buflen);
|
||||||
static int lwlconsole_ioctl(FAR struct file *filep, int cmd,
|
|
||||||
unsigned long arg);
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -131,15 +129,15 @@ static struct lwl_entry_s g_d =
|
|||||||
|
|
||||||
static const struct file_operations g_consoleops =
|
static const struct file_operations g_consoleops =
|
||||||
{
|
{
|
||||||
NULL, /* open */
|
NULL, /* open */
|
||||||
NULL, /* close */
|
NULL, /* close */
|
||||||
lwlconsole_read, /* read */
|
lwlconsole_read, /* read */
|
||||||
lwlconsole_write, /* write */
|
lwlconsole_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
lwlconsole_ioctl, /* ioctl */
|
NULL, /* ioctl */
|
||||||
NULL /* poll */
|
NULL /* poll */
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
, NULL /* unlink */
|
, NULL /* unlink */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -227,16 +225,6 @@ static bool read8bits(uint8_t port, FAR uint8_t *store)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: lwlconsole_ioctl
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int lwlconsole_ioctl(FAR struct file *filep, int cmd,
|
|
||||||
unsigned long arg)
|
|
||||||
{
|
|
||||||
return -ENOTTY;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lwlconsole_read
|
* Name: lwlconsole_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -42,8 +42,6 @@
|
|||||||
|
|
||||||
/* Character driver methods. */
|
/* Character driver methods. */
|
||||||
|
|
||||||
static int altmdm_open(FAR struct file *filep);
|
|
||||||
static int altmdm_close(FAR struct file *filep);
|
|
||||||
static ssize_t altmdm_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t altmdm_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t len);
|
size_t len);
|
||||||
static ssize_t altmdm_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t altmdm_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -58,15 +56,15 @@ static int altmdm_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
|
|||||||
|
|
||||||
static const struct file_operations g_altmdmfops =
|
static const struct file_operations g_altmdmfops =
|
||||||
{
|
{
|
||||||
altmdm_open, /* open */
|
NULL, /* open */
|
||||||
altmdm_close, /* close */
|
NULL, /* close */
|
||||||
altmdm_read, /* read */
|
altmdm_read, /* read */
|
||||||
altmdm_write, /* write */
|
altmdm_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
altmdm_ioctl, /* ioctl */
|
altmdm_ioctl, /* ioctl */
|
||||||
NULL /* poll */
|
NULL /* poll */
|
||||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||||
, NULL /* unlink */
|
, NULL /* unlink */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -147,32 +145,6 @@ static int altmdm_uninitialize(FAR struct altmdm_dev_s *priv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: altmdm_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver open method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int altmdm_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: altmdm_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver close method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int altmdm_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: altmdm_read
|
* Name: altmdm_read
|
||||||
*
|
*
|
||||||
|
|||||||
+1
-12
@@ -212,7 +212,6 @@ static void tun_dev_uninit(FAR struct tun_device_s *priv);
|
|||||||
|
|
||||||
/* File interface */
|
/* File interface */
|
||||||
|
|
||||||
static int tun_open(FAR struct file *filep);
|
|
||||||
static int tun_close(FAR struct file *filep);
|
static int tun_close(FAR struct file *filep);
|
||||||
static ssize_t tun_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t tun_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
@@ -231,7 +230,7 @@ static struct tun_device_s g_tun_devices[CONFIG_TUN_NINTERFACES];
|
|||||||
|
|
||||||
static const struct file_operations g_tun_file_ops =
|
static const struct file_operations g_tun_file_ops =
|
||||||
{
|
{
|
||||||
tun_open, /* open */
|
NULL, /* open */
|
||||||
tun_close, /* close */
|
tun_close, /* close */
|
||||||
tun_read, /* read */
|
tun_read, /* read */
|
||||||
tun_write, /* write */
|
tun_write, /* write */
|
||||||
@@ -1151,16 +1150,6 @@ static void tun_dev_uninit(FAR struct tun_device_s *priv)
|
|||||||
nxsem_destroy(&priv->write_wait_sem);
|
nxsem_destroy(&priv->write_wait_sem);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: tun_open
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int tun_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
filep->f_priv = 0;
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: tun_close
|
* Name: tun_close
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -44,10 +44,10 @@
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int powerled_open(FAR struct file *filep);
|
static int powerled_open(FAR struct file *filep);
|
||||||
static int powerled_close(FAR struct file *filep);
|
static int powerled_close(FAR struct file *filep);
|
||||||
static int powerled_ioctl(FAR struct file *filep, int cmd,
|
static int powerled_ioctl(FAR struct file *filep, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -64,8 +64,6 @@ struct dat31r5sp_dev_s
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int dat31r5sp_open(FAR struct file *filep);
|
|
||||||
static int dat31r5sp_close(FAR struct file *filep);
|
|
||||||
static ssize_t dat31r5sp_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t dat31r5sp_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t dat31r5sp_write(FAR struct file *filep,
|
static ssize_t dat31r5sp_write(FAR struct file *filep,
|
||||||
@@ -79,8 +77,8 @@ static int dat31r5sp_ioctl(FAR struct file *filep, int cmd,
|
|||||||
|
|
||||||
static const struct file_operations g_dat31r5sp_fops =
|
static const struct file_operations g_dat31r5sp_fops =
|
||||||
{
|
{
|
||||||
dat31r5sp_open, /* open */
|
NULL, /* open */
|
||||||
dat31r5sp_close, /* close */
|
NULL, /* close */
|
||||||
dat31r5sp_read, /* read */
|
dat31r5sp_read, /* read */
|
||||||
dat31r5sp_write, /* write */
|
dat31r5sp_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -142,34 +140,6 @@ static void dat31r5sp_set_attenuation(FAR struct dat31r5sp_dev_s *priv,
|
|||||||
SPI_LOCK(priv->spi, false);
|
SPI_LOCK(priv->spi, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: dat31r5sp_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the DAT-31R5-SP+ device is
|
|
||||||
* opened.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int dat31r5sp_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: dat31r5sp_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This function is called whenever the DAT-31R5-SP+ device is
|
|
||||||
* closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int dat31r5sp_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: dat31r5sp_write
|
* Name: dat31r5sp_write
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ static int adt7320_readtemp(FAR struct adt7320_dev_s *priv, FAR b16_t *temp);
|
|||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int adt7320_open(FAR struct file *filep);
|
static int adt7320_open(FAR struct file *filep);
|
||||||
static int adt7320_close(FAR struct file *filep);
|
|
||||||
static ssize_t adt7320_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t adt7320_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t buflen);
|
size_t buflen);
|
||||||
static ssize_t adt7320_write(FAR struct file *filep, FAR const char *buffer,
|
static ssize_t adt7320_write(FAR struct file *filep, FAR const char *buffer,
|
||||||
@@ -102,7 +101,7 @@ static int adt7320_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
|
|||||||
static const struct file_operations g_adt7320fops =
|
static const struct file_operations g_adt7320fops =
|
||||||
{
|
{
|
||||||
adt7320_open, /* open */
|
adt7320_open, /* open */
|
||||||
adt7320_close, /* close */
|
NULL, /* close */
|
||||||
adt7320_read, /* read */
|
adt7320_read, /* read */
|
||||||
adt7320_write, /* write */
|
adt7320_write, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -336,19 +335,6 @@ static int adt7320_open(FAR struct file *filep)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: adt7320_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* This routine is called when the ADT7320 device is closed.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int adt7320_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: adt7320_read
|
* Name: adt7320_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -49,8 +49,6 @@
|
|||||||
|
|
||||||
/* Character driver methods */
|
/* Character driver methods */
|
||||||
|
|
||||||
static int adxl345_open(FAR struct file *filep);
|
|
||||||
static int adxl345_close(FAR struct file *filep);
|
|
||||||
static ssize_t adxl345_read(FAR struct file *filep, FAR char *buffer,
|
static ssize_t adxl345_read(FAR struct file *filep, FAR char *buffer,
|
||||||
size_t len);
|
size_t len);
|
||||||
|
|
||||||
@@ -62,8 +60,8 @@ static ssize_t adxl345_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
|
|
||||||
static const struct file_operations g_adxl345fops =
|
static const struct file_operations g_adxl345fops =
|
||||||
{
|
{
|
||||||
adxl345_open, /* open */
|
NULL, /* open */
|
||||||
adxl345_close, /* close */
|
NULL, /* close */
|
||||||
adxl345_read, /* read */
|
adxl345_read, /* read */
|
||||||
NULL, /* write */
|
NULL, /* write */
|
||||||
NULL, /* seek */
|
NULL, /* seek */
|
||||||
@@ -74,32 +72,6 @@ static const struct file_operations g_adxl345fops =
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: adxl345_open
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver open method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int adxl345_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: adxl345_close
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Standard character driver close method.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static int adxl345_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: adxl345_read
|
* Name: adxl345_read
|
||||||
*
|
*
|
||||||
@@ -210,7 +182,7 @@ int adxl345_register(ADXL345_HANDLE handle, int minor)
|
|||||||
|
|
||||||
/* Register the character driver */
|
/* Register the character driver */
|
||||||
|
|
||||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||||
ret = register_driver(devname, &g_adxl345fops, 0444, priv);
|
ret = register_driver(devname, &g_adxl345fops, 0444, priv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user