arch/arm: Remove FAR and CODE from chip folder(1)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-04-17 14:01:48 +08:00
committed by Petro Karashchenko
parent fead1964cb
commit 03c31d332f
330 changed files with 6149 additions and 6159 deletions
+8 -8
View File
@@ -555,7 +555,7 @@ CXD56_AUDIO_ECODE cxd56_audio_poweroff_dnc(void);
*/
CXD56_AUDIO_ECODE cxd56_audio_en_dnc(cxd56_audio_dnc_id_t id,
FAR cxd56_audio_dnc_bin_t *bin);
cxd56_audio_dnc_bin_t *bin);
/* Disable DNC
*
@@ -573,7 +573,7 @@ CXD56_AUDIO_ECODE cxd56_audio_dis_dnc(cxd56_audio_dnc_id_t id);
* CXD56_AUDIO_ECODE return code
*/
CXD56_AUDIO_ECODE cxd56_audio_en_deq(FAR cxd56_audio_deq_coef_t *coef);
CXD56_AUDIO_ECODE cxd56_audio_en_deq(cxd56_audio_deq_coef_t *coef);
/* Disable DEQ
*
@@ -708,7 +708,7 @@ CXD56_AUDIO_ECODE cxd56_audio_stop_beep(void);
* CXD56_AUDIO_ECODE return code
*/
CXD56_AUDIO_ECODE cxd56_audio_set_micgain(FAR cxd56_audio_mic_gain_t *gain);
CXD56_AUDIO_ECODE cxd56_audio_set_micgain(cxd56_audio_mic_gain_t *gain);
/* Set DEQ table
*
@@ -719,7 +719,7 @@ CXD56_AUDIO_ECODE cxd56_audio_set_micgain(FAR cxd56_audio_mic_gain_t *gain);
*/
CXD56_AUDIO_ECODE cxd56_audio_set_deq(bool en,
FAR cxd56_audio_deq_coef_t *deq);
cxd56_audio_deq_coef_t *deq);
/* Get dma handle
*
@@ -730,7 +730,7 @@ CXD56_AUDIO_ECODE cxd56_audio_set_deq(bool en,
*/
CXD56_AUDIO_ECODE cxd56_audio_get_dmahandle(cxd56_audio_dma_path_t path,
FAR cxd56_audio_dma_t *handle);
cxd56_audio_dma_t *handle);
/* Free dma handle
*
@@ -739,7 +739,7 @@ CXD56_AUDIO_ECODE cxd56_audio_get_dmahandle(cxd56_audio_dma_path_t path,
* CXD56_AUDIO_ECODE return code
*/
CXD56_AUDIO_ECODE cxd56_audio_free_dmahandle(FAR cxd56_audio_dma_t handle);
CXD56_AUDIO_ECODE cxd56_audio_free_dmahandle(cxd56_audio_dma_t handle);
/* Set internal data path
*
@@ -763,7 +763,7 @@ CXD56_AUDIO_ECODE cxd56_audio_set_datapath(cxd56_audio_signal_t sig,
CXD56_AUDIO_ECODE cxd56_audio_init_dma(cxd56_audio_dma_t handle,
cxd56_audio_samp_fmt_t fmt,
FAR uint8_t *ch_num);
uint8_t *ch_num);
/* Initialize dma transfer function
*
@@ -774,7 +774,7 @@ CXD56_AUDIO_ECODE cxd56_audio_init_dma(cxd56_audio_dma_t handle,
*/
CXD56_AUDIO_ECODE cxd56_audio_set_dmacb(cxd56_audio_dma_t handle,
FAR cxd56_audio_dma_cb_t cb);
cxd56_audio_dma_cb_t cb);
/* Enable dma interrupt
*
+1 -1
View File
@@ -96,7 +96,7 @@ struct bat_monitor_rec_s
struct bat_monitor_log_s
{
FAR struct bat_monitor_rec_s *rec;
struct bat_monitor_rec_s *rec;
int index;
int size;
};
+2 -2
View File
@@ -40,8 +40,8 @@ extern "C"
* Public Function Prototypes
****************************************************************************/
int cxd56_ge2dinitialize(FAR const char *devname);
void cxd56_ge2duninitialize(FAR const char *devname);
int cxd56_ge2dinitialize(const char *devname);
void cxd56_ge2duninitialize(const char *devname);
#undef EXTERN
#if defined(__cplusplus)
+23 -23
View File
@@ -699,11 +699,11 @@ struct cxd56_gnss_ope_mode_param_s
struct cxd56_gnss_orbital_param_s
{
uint32_t type; /* One of #CXD56_GNSS_DATA_GPS,
* #CXD56_GNSS_DATA_GLONASS or
* #CXD56_GNSS_DATA_QZSSL1CA.
*/
FAR uint32_t *data; /* Address pointing to almanac or ephemeris data buffer */
uint32_t type; /* One of #CXD56_GNSS_DATA_GPS,
* #CXD56_GNSS_DATA_GLONASS or
* #CXD56_GNSS_DATA_QZSSL1CA.
*/
uint32_t *data; /* Address pointing to almanac or ephemeris data buffer */
};
/* date and time */
@@ -736,9 +736,9 @@ struct cxd56_gnss_orthogonal_position_s
struct cxd56_gnss_cep_data_s
{
FAR uint32_t *data;
uint32_t size;
uint32_t counter;
uint32_t *data;
uint32_t size;
uint32_t counter;
};
/* CEP age info */
@@ -753,24 +753,24 @@ struct cxd56_gnss_cep_age_s
struct cxd56_gnss_agps_acquist_s
{
FAR uint8_t *data; /* Address pointing to aquist data buffer */
uint16_t size; /* Aquist data size */
uint8_t *data; /* Address pointing to aquist data buffer */
uint16_t size; /* Aquist data size */
};
/* tow assist data and size for AGPS */
struct cxd56_gnss_agps_tow_assist_s
{
FAR uint8_t *data; /* Address pointing to tow assist data buffer */
uint16_t size; /* assist data size */
uint8_t *data; /* Address pointing to tow assist data buffer */
uint16_t size; /* assist data size */
};
/* utc model data and size for AGPS */
struct cxd56_gnss_agps_utc_model_s
{
FAR uint8_t *data; /* Address pointing to utc model data buffer */
uint16_t size; /* utc model data size */
uint8_t *data; /* Address pointing to utc model data buffer */
uint16_t size; /* utc model data size */
};
/* Time from frame start[sec]. */
@@ -833,21 +833,21 @@ struct cxd56_gnss_test_result_s
struct cxd56_gnss_signal_setting_s
{
int fd; /* The descriptor for signal handler */
uint8_t enable; /* 1 when set this setting, 0 is clear */
uint8_t gnsssig; /* GNSS signal as CXD56_GNSS_SIG_GNSS, _AGPS, etc. */
int signo; /* system signal number to notify read completion */
FAR void *data; /* user data */
int fd; /* The descriptor for signal handler */
uint8_t enable; /* 1 when set this setting, 0 is clear */
uint8_t gnsssig; /* GNSS signal as CXD56_GNSS_SIG_GNSS, _AGPS, etc. */
int signo; /* system signal number to notify read completion */
void *data; /* user data */
};
/* Information for use after being signaled to read data asynchronously */
struct cxd56_gnss_signal_info_s
{
int fd; /* The file descriptor to use in signal handler */
uint8_t gnsssig; /* GNSS signal as CXD56_GNSS_SIG_GNSS, _AGPS, etc. */
int signo; /* system signal number to notify read completion */
FAR void *data; /* user data */
int fd; /* The file descriptor to use in signal handler */
uint8_t gnsssig; /* GNSS signal as CXD56_GNSS_SIG_GNSS, _AGPS, etc. */
int signo; /* system signal number to notify read completion */
void *data; /* user data */
};
/* PVTLOG setting Parameter.
+2 -2
View File
@@ -101,7 +101,7 @@ extern "C"
*
****************************************************************************/
int hostif_i2cinitialize(FAR struct hostif_i2cconf_s *config);
int hostif_i2cinitialize(struct hostif_i2cconf_s *config);
/****************************************************************************
* Name: hostif_spiinitialize
@@ -117,7 +117,7 @@ int hostif_i2cinitialize(FAR struct hostif_i2cconf_s *config);
*
****************************************************************************/
int hostif_spiinitialize(FAR struct hostif_spiconf_s *config);
int hostif_spiinitialize(struct hostif_spiconf_s *config);
/****************************************************************************
* Name: hostif_uninitialize
+9 -9
View File
@@ -327,7 +327,7 @@ struct scuev_notify_s
uint32_t ctrl; /* Event control */
FAR struct scuev_arg_s *arg; /* Arguments for event raised */
struct scuev_arg_s *arg; /* Arguments for event raised */
};
/* Offset/gain adjustment parameter */
@@ -364,7 +364,7 @@ struct scufifo_wm_s
/* Pointer to memory to be timestamp stored */
FAR struct scutimestamp_s *ts;
struct scutimestamp_s *ts;
/* Watermark value. SCU notifies when
* stored samples over watermark in FIFO.
@@ -389,14 +389,14 @@ struct seq_s; /* The sequencer object */
* return: struct seq_s pointer is success. NULL is failure.
*/
FAR struct seq_s *seq_open(int type, int bustype);
struct seq_s *seq_open(int type, int bustype);
/* Close sequencer device
*
* param [in] seq : Sequencer instance
*/
void seq_close(FAR struct seq_s *seq);
void seq_close(struct seq_s *seq);
/* Read sequencer FIFO data
*
@@ -408,7 +408,7 @@ void seq_close(FAR struct seq_s *seq);
* return : OK(0) is success. negative value is failure.
*/
int seq_read(FAR struct seq_s *seq, int fifoid, char *buffer, int length);
int seq_read(struct seq_s *seq, int fifoid, char *buffer, int length);
/* Sequencer specific ioctl
*
@@ -424,7 +424,7 @@ int seq_read(FAR struct seq_s *seq, int fifoid, char *buffer, int length);
* return: OK(0) is success. negative value is failure.
*/
int seq_ioctl(FAR struct seq_s *seq, int fifoid, int cmd, unsigned long arg);
int seq_ioctl(struct seq_s *seq, int fifoid, int cmd, unsigned long arg);
/* Set cyclic sequencer instruction
*
@@ -435,7 +435,7 @@ int seq_ioctl(FAR struct seq_s *seq, int fifoid, int cmd, unsigned long arg);
* return OK(0) is success. negative value is failure.
*/
int seq_setinstruction(FAR struct seq_s *seq, const uint16_t *inst,
int seq_setinstruction(struct seq_s *seq, const uint16_t *inst,
uint16_t nr_insts);
/* Set sample data format
@@ -449,7 +449,7 @@ int seq_setinstruction(FAR struct seq_s *seq, const uint16_t *inst,
* return OK(0) is success. negative value is failure.
*/
void seq_setsample(FAR struct seq_s *seq, uint8_t sample, uint8_t offset,
void seq_setsample(struct seq_s *seq, uint8_t sample, uint8_t offset,
uint8_t elemsize, bool swapbyte);
/* Set slave ID or address
@@ -458,7 +458,7 @@ void seq_setsample(FAR struct seq_s *seq, uint8_t sample, uint8_t offset,
* param [in] slave_addr : In SPI, slave select ID. In I2C, bus address.
*/
void seq_setaddress(FAR struct seq_s *seq, uint32_t slave_addr);
void seq_setaddress(struct seq_s *seq, uint32_t slave_addr);
/* SPI data transfer via sequencer.
*
+2 -2
View File
@@ -47,8 +47,8 @@
struct timer_sethandler_s
{
FAR void *arg; /* An argument */
CODE tccb_t handler; /* The timer interrupt handler */
void *arg; /* An argument */
tccb_t handler; /* The timer interrupt handler */
};
#endif /* __ARCH_ARM_INCLUDE_CXD56XX_TIMER_H */
+2 -2
View File
@@ -40,8 +40,8 @@ extern "C"
* Public Function Prototypes
****************************************************************************/
int cxd56_uart0initialize(FAR const char *devname);
void cxd56_uart0uninitialize(FAR const char *devname);
int cxd56_uart0initialize(const char *devname);
void cxd56_uart0uninitialize(const char *devname);
#undef EXTERN
#if defined(__cplusplus)
+35 -35
View File
@@ -126,20 +126,20 @@ static void can_putreg(struct up_dev_s *priv, int offset, uint32_t value);
/* CAN methods */
static void can_reset(FAR struct can_dev_s *dev);
static int can_setup(FAR struct can_dev_s *dev);
static void can_shutdown(FAR struct can_dev_s *dev);
static void can_rxint(FAR struct can_dev_s *dev, bool enable);
static void can_txint(FAR struct can_dev_s *dev, bool enable);
static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg);
static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id);
static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg);
static bool candev_txready(FAR struct can_dev_s *dev);
static bool candev_txempty(FAR struct can_dev_s *dev);
static void can_reset(struct can_dev_s *dev);
static int can_setup(struct can_dev_s *dev);
static void can_shutdown(struct can_dev_s *dev);
static void can_rxint(struct can_dev_s *dev, bool enable);
static void can_txint(struct can_dev_s *dev, bool enable);
static int can_ioctl(struct can_dev_s *dev, int cmd, unsigned long arg);
static int can_remoterequest(struct can_dev_s *dev, uint16_t id);
static int can_send(struct can_dev_s *dev, struct can_msg_s *msg);
static bool candev_txready(struct can_dev_s *dev);
static bool candev_txempty(struct can_dev_s *dev);
/* CAN interrupts */
static int can_interrupt(int irq, FAR void *context, FAR void *arg);
static int can_interrupt(int irq, void *context, void *arg);
/* Message Processing */
@@ -357,9 +357,9 @@ static void can_putreg(struct up_dev_s *priv, int offset, uint32_t value)
*
****************************************************************************/
static void can_reset(FAR struct can_dev_s *dev)
static void can_reset(struct can_dev_s *dev)
{
FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->cd_priv;
struct up_dev_s *priv = (struct up_dev_s *)dev->cd_priv;
caninfo("CAN%d reset\n", priv->port);
@@ -387,9 +387,9 @@ static void can_reset(FAR struct can_dev_s *dev)
*
****************************************************************************/
static int can_setup(FAR struct can_dev_s *dev)
static int can_setup(struct can_dev_s *dev)
{
FAR struct up_dev_s *priv = (FAR struct up_dev_s *) dev->cd_priv;
struct up_dev_s *priv = (struct up_dev_s *)dev->cd_priv;
uint32_t regval;
uint8_t i;
int ret = ERROR;
@@ -415,7 +415,7 @@ static int can_setup(FAR struct can_dev_s *dev)
{
}
ret = irq_attach(priv->irq, can_interrupt, (FAR void *)dev);
ret = irq_attach(priv->irq, can_interrupt, (void *)dev);
if (ret == OK)
{
up_enable_irq(priv->irq);
@@ -445,9 +445,9 @@ static int can_setup(FAR struct can_dev_s *dev)
*
****************************************************************************/
static void can_shutdown(FAR struct can_dev_s *dev)
static void can_shutdown(struct can_dev_s *dev)
{
FAR struct up_dev_s *priv = (FAR struct up_dev_s *) dev->cd_priv;
struct up_dev_s *priv = (struct up_dev_s *)dev->cd_priv;
uint32_t regval;
caninfo("CAN%d\n", priv->port);
@@ -488,9 +488,9 @@ static void can_shutdown(FAR struct can_dev_s *dev)
*
****************************************************************************/
static void can_rxint(FAR struct can_dev_s *dev, bool enable)
static void can_rxint(struct can_dev_s *dev, bool enable)
{
FAR struct up_dev_s *priv = (FAR struct up_dev_s *) dev->cd_priv;
struct up_dev_s *priv = (struct up_dev_s *)dev->cd_priv;
if (enable == true)
{
@@ -520,7 +520,7 @@ static void can_rxint(FAR struct can_dev_s *dev, bool enable)
*
****************************************************************************/
static void can_txint(FAR struct can_dev_s *dev, bool enable)
static void can_txint(struct can_dev_s *dev, bool enable)
{
/* The TX interrupt is automatically enabled in can_send within a
* message object.
@@ -541,7 +541,7 @@ static void can_txint(FAR struct can_dev_s *dev, bool enable)
*
****************************************************************************/
static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg)
static int can_ioctl(struct can_dev_s *dev, int cmd, unsigned long arg)
{
caninfo("Fix me:Not Implemented\n");
return 0;
@@ -561,7 +561,7 @@ static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg)
*
****************************************************************************/
static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id)
static int can_remoterequest(struct can_dev_s *dev, uint16_t id)
{
caninfo("Fix me:Not Implemented\n");
return 0;
@@ -590,9 +590,9 @@ static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id)
*
****************************************************************************/
static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
static int can_send(struct can_dev_s *dev, struct can_msg_s *msg)
{
FAR struct up_dev_s *priv = (FAR struct up_dev_s *) dev->cd_priv;
struct up_dev_s *priv = (struct up_dev_s *)dev->cd_priv;
uint32_t regval;
uint32_t num;
uint32_t id;
@@ -686,9 +686,9 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
*
****************************************************************************/
static bool candev_txready(FAR struct can_dev_s *dev)
static bool candev_txready(struct can_dev_s *dev)
{
FAR struct up_dev_s *priv = (FAR struct up_dev_s *) dev->cd_priv;
struct up_dev_s *priv = (struct up_dev_s *)dev->cd_priv;
if (can_getreg(priv, AM335X_DCAN_TXRQ34_OFFSET) != 0xffffffff)
{
@@ -721,9 +721,9 @@ static bool candev_txready(FAR struct can_dev_s *dev)
*
****************************************************************************/
static bool candev_txempty(FAR struct can_dev_s *dev)
static bool candev_txempty(struct can_dev_s *dev)
{
FAR struct up_dev_s *priv = (FAR struct up_dev_s *) dev->cd_priv;
struct up_dev_s *priv = (struct up_dev_s *)dev->cd_priv;
return (!((can_getreg(priv, AM335X_DCAN_TXRQ_X_OFFSET)) & 0xffff));
}
@@ -744,10 +744,10 @@ static bool candev_txempty(FAR struct can_dev_s *dev)
*
****************************************************************************/
static int can_interrupt(int irq, FAR void *context, FAR void *arg)
static int can_interrupt(int irq, void *context, void *arg)
{
struct can_dev_s *dev = (FAR struct can_dev_s *)arg;
FAR struct up_dev_s *priv;
struct can_dev_s *dev = (struct can_dev_s *)arg;
struct up_dev_s *priv;
uint32_t regval = 0;
DEBUGASSERT(dev != NULL && dev->cd_priv != NULL);
@@ -1070,9 +1070,9 @@ static int can_bittiming(struct up_dev_s *priv)
*
****************************************************************************/
FAR struct can_dev_s *am335x_can_initialize(int port)
struct can_dev_s *am335x_can_initialize(int port)
{
FAR struct can_dev_s *candev;
struct can_dev_s *candev;
irqstate_t flags;
syslog(LOG_DEBUG, "CAN%d\n", port);
@@ -1116,7 +1116,7 @@ FAR struct can_dev_s *am335x_can_initialize(int port)
return candev;
}
void am335x_can_uninitialize(FAR struct can_dev_s *dev)
void am335x_can_uninitialize(struct can_dev_s *dev)
{
irqstate_t flags;
+2 -2
View File
@@ -49,7 +49,7 @@
*
****************************************************************************/
FAR struct can_dev_s *am335x_can_initialize(int port);
struct can_dev_s *am335x_can_initialize(int port);
/****************************************************************************
* Name: am335x_can_uninitialize
@@ -66,6 +66,6 @@ FAR struct can_dev_s *am335x_can_initialize(int port);
*
****************************************************************************/
void am335x_can_uninitialize(FAR struct can_dev_s *dev);
void am335x_can_uninitialize(struct can_dev_s *dev);
#endif /* __ARCH_ARM_SRC_AM335X_AM335X_CAN_H */
+10 -10
View File
@@ -83,7 +83,7 @@
****************************************************************************/
static uint32_t
am335x_videomode_vrefresh(FAR const struct videomode_s *videomode)
am335x_videomode_vrefresh(const struct videomode_s *videomode)
{
uint32_t refresh;
@@ -114,7 +114,7 @@ static uint32_t
****************************************************************************/
static bool
am335x_videomode_valid(FAR const struct videomode_s *videomode)
am335x_videomode_valid(const struct videomode_s *videomode)
{
size_t fbstride;
size_t fbsize;
@@ -218,9 +218,9 @@ static bool
****************************************************************************/
static const struct videomode_s *
am335x_lcd_pickmode(FAR struct edid_info_s *ei)
am335x_lcd_pickmode(struct edid_info_s *ei)
{
FAR const struct videomode_s *videomode;
const struct videomode_s *videomode;
int n;
/* Get standard VGA as default */
@@ -281,8 +281,8 @@ static const struct videomode_s *
*
****************************************************************************/
void am335x_lcd_videomode(FAR const struct videomode_s *videomode,
FAR struct am335x_panel_info_s *panel)
void am335x_lcd_videomode(const struct videomode_s *videomode,
struct am335x_panel_info_s *panel)
{
lcdinfo("Detected videomode: %dx%d @ %" PRId32 "KHz\n",
videomode->hdisplay, videomode->vdisplay,
@@ -354,11 +354,11 @@ void am335x_lcd_videomode(FAR const struct videomode_s *videomode,
*
****************************************************************************/
void am335x_lcd_edid(FAR const uint8_t *edid, size_t edid_len,
FAR struct am335x_panel_info_s *panel,
FAR const struct videomode_s **selected)
void am335x_lcd_edid(const uint8_t *edid, size_t edid_len,
struct am335x_panel_info_s *panel,
const struct videomode_s **selected)
{
FAR const struct videomode_s *videomode = NULL;
const struct videomode_s *videomode = NULL;
struct edid_info_s ei;
/* Do we have EDID data? */
+4 -4
View File
@@ -180,7 +180,7 @@ static int am335x_gpio_interrupt(uint32_t base, int irq0, void *context)
}
#ifdef CONFIG_AM335X_GPIO0_IRQ
static int am335x_gpio0_interrupt(int irq, FAR void *context, FAR void *arg)
static int am335x_gpio0_interrupt(int irq, void *context, void *arg)
{
return am335x_gpio_interrupt(AM335X_GPIO0_VADDR,
AM335X_IRQ_GPIO0P0, context);
@@ -188,7 +188,7 @@ static int am335x_gpio0_interrupt(int irq, FAR void *context, FAR void *arg)
#endif
#ifdef CONFIG_AM335X_GPIO1_IRQ
static int am335x_gpio1_interrupt(int irq, FAR void *context, FAR void *arg)
static int am335x_gpio1_interrupt(int irq, void *context, void *arg)
{
return am335x_gpio_interrupt(AM335X_GPIO1_VADDR,
AM335X_IRQ_GPIO1P0, context);
@@ -196,7 +196,7 @@ static int am335x_gpio1_interrupt(int irq, FAR void *context, FAR void *arg)
#endif
#ifdef CONFIG_AM335X_GPIO2_IRQ
static int am335x_gpio2_interrupt(int irq, FAR void *context, FAR void *arg)
static int am335x_gpio2_interrupt(int irq, void *context, void *arg)
{
return am335x_gpio_interrupt(AM335X_GPIO2_VADDR,
AM335X_IRQ_GPIO2P0, context);
@@ -204,7 +204,7 @@ static int am335x_gpio2_interrupt(int irq, FAR void *context, FAR void *arg)
#endif
#ifdef CONFIG_AM335X_GPIO3_IRQ
static int am335x_gpio3_interrupt(int irq, FAR void *context, FAR void *arg)
static int am335x_gpio3_interrupt(int irq, void *context, void *arg)
{
return am335x_gpio_interrupt(AM335X_GPIO3_VADDR,
AM335X_IRQ_GPIO3P0, context);
+56 -56
View File
@@ -212,59 +212,59 @@ struct am335x_i2c_priv_s
* Private Function Prototypes
****************************************************************************/
static inline uint32_t am335x_i2c_getreg(FAR struct am335x_i2c_priv_s *priv,
static inline uint32_t am335x_i2c_getreg(struct am335x_i2c_priv_s *priv,
uint16_t offset);
static inline void am335x_i2c_putreg(FAR struct am335x_i2c_priv_s *priv,
static inline void am335x_i2c_putreg(struct am335x_i2c_priv_s *priv,
uint16_t offset, uint32_t value);
static inline void am335x_i2c_modifyreg(FAR struct am335x_i2c_priv_s *priv,
static inline void am335x_i2c_modifyreg(struct am335x_i2c_priv_s *priv,
uint16_t offset, uint32_t clearbits,
uint32_t setbits);
static inline int am335x_i2c_sem_wait(FAR struct am335x_i2c_priv_s *priv);
static inline int am335x_i2c_sem_wait(struct am335x_i2c_priv_s *priv);
static int
am335x_i2c_sem_wait_noncancelable(FAR struct am335x_i2c_priv_s *priv);
am335x_i2c_sem_wait_noncancelable(struct am335x_i2c_priv_s *priv);
#ifdef CONFIG_AM335X_I2C_DYNTIMEO
static useconds_t am335x_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs);
static useconds_t am335x_i2c_tousecs(int msgc, struct i2c_msg_s *msgs);
#endif /* CONFIG_AM335X_I2C_DYNTIMEO */
static inline int
am335x_i2c_sem_waitdone(FAR struct am335x_i2c_priv_s *priv);
am335x_i2c_sem_waitdone(struct am335x_i2c_priv_s *priv);
static inline bool
am335x_i2c_sem_waitstop(FAR struct am335x_i2c_priv_s *priv);
static inline void am335x_i2c_sem_post(FAR struct am335x_i2c_priv_s *priv);
static inline void am335x_i2c_sem_init(FAR struct am335x_i2c_priv_s *priv);
am335x_i2c_sem_waitstop(struct am335x_i2c_priv_s *priv);
static inline void am335x_i2c_sem_post(struct am335x_i2c_priv_s *priv);
static inline void am335x_i2c_sem_init(struct am335x_i2c_priv_s *priv);
static inline void
am335x_i2c_sem_destroy(FAR struct am335x_i2c_priv_s *priv);
am335x_i2c_sem_destroy(struct am335x_i2c_priv_s *priv);
#ifdef CONFIG_I2C_TRACE
static void am335x_i2c_tracereset(FAR struct am335x_i2c_priv_s *priv);
static void am335x_i2c_tracenew(FAR struct am335x_i2c_priv_s *priv,
static void am335x_i2c_tracereset(struct am335x_i2c_priv_s *priv);
static void am335x_i2c_tracenew(struct am335x_i2c_priv_s *priv,
uint32_t status);
static void am335x_i2c_traceevent(FAR struct am335x_i2c_priv_s *priv,
static void am335x_i2c_traceevent(struct am335x_i2c_priv_s *priv,
enum am335x_trace_e event, uint32_t parm);
static void am335x_i2c_tracedump(FAR struct am335x_i2c_priv_s *priv);
static void am335x_i2c_tracedump(struct am335x_i2c_priv_s *priv);
#endif /* CONFIG_I2C_TRACE */
static void am335x_i2c_setclock(FAR struct am335x_i2c_priv_s *priv,
static void am335x_i2c_setclock(struct am335x_i2c_priv_s *priv,
uint32_t frequency);
static inline void am335x_i2c_sendstart(FAR struct am335x_i2c_priv_s *priv,
static inline void am335x_i2c_sendstart(struct am335x_i2c_priv_s *priv,
uint16_t address);
static inline void am335x_i2c_sendstop(FAR struct am335x_i2c_priv_s *priv);
static inline void am335x_i2c_sendstop(struct am335x_i2c_priv_s *priv);
static inline uint32_t
am335x_i2c_getstatus(FAR struct am335x_i2c_priv_s *priv);
am335x_i2c_getstatus(struct am335x_i2c_priv_s *priv);
static int am335x_i2c_isr_process(struct am335x_i2c_priv_s * priv);
#ifndef CONFIG_I2C_POLLED
static int am335x_i2c_isr(int irq, void *context, FAR void *arg);
static int am335x_i2c_isr(int irq, void *context, void *arg);
#endif /* !CONFIG_I2C_POLLED */
static int am335x_i2c_init(FAR struct am335x_i2c_priv_s *priv);
static int am335x_i2c_deinit(FAR struct am335x_i2c_priv_s *priv);
static int am335x_i2c_transfer(FAR struct i2c_master_s *dev,
FAR struct i2c_msg_s *msgs, int count);
static int am335x_i2c_init(struct am335x_i2c_priv_s *priv);
static int am335x_i2c_deinit(struct am335x_i2c_priv_s *priv);
static int am335x_i2c_transfer(struct i2c_master_s *dev,
struct i2c_msg_s *msgs, int count);
#ifdef CONFIG_I2C_RESET
static int am335x_i2c_reset(FAR struct i2c_master_s *dev);
static int am335x_i2c_reset(struct i2c_master_s *dev);
#endif
/****************************************************************************
@@ -404,7 +404,7 @@ static struct am335x_i2c_priv_s am335x_i2c2_priv =
*
****************************************************************************/
static inline uint32_t am335x_i2c_getreg(FAR struct am335x_i2c_priv_s *priv,
static inline uint32_t am335x_i2c_getreg(struct am335x_i2c_priv_s *priv,
uint16_t offset)
{
return getreg32(priv->config->base + offset);
@@ -418,7 +418,7 @@ static inline uint32_t am335x_i2c_getreg(FAR struct am335x_i2c_priv_s *priv,
*
****************************************************************************/
static inline void am335x_i2c_putreg(FAR struct am335x_i2c_priv_s *priv,
static inline void am335x_i2c_putreg(struct am335x_i2c_priv_s *priv,
uint16_t offset, uint32_t value)
{
putreg32(value, priv->config->base + offset);
@@ -432,7 +432,7 @@ static inline void am335x_i2c_putreg(FAR struct am335x_i2c_priv_s *priv,
*
****************************************************************************/
static inline void am335x_i2c_modifyreg(FAR struct am335x_i2c_priv_s *priv,
static inline void am335x_i2c_modifyreg(struct am335x_i2c_priv_s *priv,
uint16_t offset, uint32_t clearbits,
uint32_t setbits)
{
@@ -448,7 +448,7 @@ static inline void am335x_i2c_modifyreg(FAR struct am335x_i2c_priv_s *priv,
*
****************************************************************************/
static inline int am335x_i2c_sem_wait(FAR struct am335x_i2c_priv_s *priv)
static inline int am335x_i2c_sem_wait(struct am335x_i2c_priv_s *priv)
{
return nxsem_wait(&priv->sem_excl);
}
@@ -462,7 +462,7 @@ static inline int am335x_i2c_sem_wait(FAR struct am335x_i2c_priv_s *priv)
****************************************************************************/
static int
am335x_i2c_sem_wait_noncancelable(FAR struct am335x_i2c_priv_s *priv)
am335x_i2c_sem_wait_noncancelable(struct am335x_i2c_priv_s *priv)
{
return nxsem_wait_uninterruptible(&priv->sem_excl);
}
@@ -477,7 +477,7 @@ static int
****************************************************************************/
#ifdef CONFIG_AM335X_I2C_DYNTIMEO
static useconds_t am335x_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs)
static useconds_t am335x_i2c_tousecs(int msgc, struct i2c_msg_s *msgs)
{
size_t bytecount = 0;
int i;
@@ -506,7 +506,7 @@ static useconds_t am335x_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs)
****************************************************************************/
#ifndef CONFIG_I2C_POLLED
static inline int am335x_i2c_sem_waitdone(FAR struct am335x_i2c_priv_s *priv)
static inline int am335x_i2c_sem_waitdone(struct am335x_i2c_priv_s *priv)
{
struct timespec abstime;
irqstate_t flags;
@@ -611,7 +611,7 @@ static inline int am335x_i2c_sem_waitdone(FAR struct am335x_i2c_priv_s *priv)
return ret;
}
#else
static inline int am335x_i2c_sem_waitdone(FAR struct am335x_i2c_priv_s *priv)
static inline int am335x_i2c_sem_waitdone(struct am335x_i2c_priv_s *priv)
{
clock_t timeout;
clock_t start;
@@ -666,7 +666,7 @@ static inline int am335x_i2c_sem_waitdone(FAR struct am335x_i2c_priv_s *priv)
****************************************************************************/
static inline bool
am335x_i2c_sem_waitstop(FAR struct am335x_i2c_priv_s *priv)
am335x_i2c_sem_waitstop(struct am335x_i2c_priv_s *priv)
{
clock_t start;
clock_t elapsed;
@@ -736,7 +736,7 @@ static inline void am335x_i2c_sem_post(struct am335x_i2c_priv_s *priv)
*
****************************************************************************/
static inline void am335x_i2c_sem_init(FAR struct am335x_i2c_priv_s *priv)
static inline void am335x_i2c_sem_init(struct am335x_i2c_priv_s *priv)
{
nxsem_init(&priv->sem_excl, 0, 1);
@@ -758,7 +758,7 @@ static inline void am335x_i2c_sem_init(FAR struct am335x_i2c_priv_s *priv)
*
****************************************************************************/
static inline void am335x_i2c_sem_destroy(FAR struct am335x_i2c_priv_s *priv)
static inline void am335x_i2c_sem_destroy(struct am335x_i2c_priv_s *priv)
{
nxsem_destroy(&priv->sem_excl);
#ifndef CONFIG_I2C_POLLED
@@ -775,7 +775,7 @@ static inline void am335x_i2c_sem_destroy(FAR struct am335x_i2c_priv_s *priv)
****************************************************************************/
#ifdef CONFIG_I2C_TRACE
static void am335x_i2c_traceclear(FAR struct am335x_i2c_priv_s *priv)
static void am335x_i2c_traceclear(struct am335x_i2c_priv_s *priv)
{
struct am335x_trace_s *trace = &priv->trace[priv->tndx];
@@ -786,7 +786,7 @@ static void am335x_i2c_traceclear(FAR struct am335x_i2c_priv_s *priv)
trace->time = 0; /* Time of first status or event */
}
static void am335x_i2c_tracereset(FAR struct am335x_i2c_priv_s *priv)
static void am335x_i2c_tracereset(struct am335x_i2c_priv_s *priv)
{
/* Reset the trace info for a new data collection */
@@ -795,7 +795,7 @@ static void am335x_i2c_tracereset(FAR struct am335x_i2c_priv_s *priv)
am335x_i2c_traceclear(priv);
}
static void am335x_i2c_tracenew(FAR struct am335x_i2c_priv_s *priv,
static void am335x_i2c_tracenew(struct am335x_i2c_priv_s *priv,
uint32_t status)
{
struct am335x_trace_s *trace = &priv->trace[priv->tndx];
@@ -835,7 +835,7 @@ static void am335x_i2c_tracenew(FAR struct am335x_i2c_priv_s *priv,
}
}
static void am335x_i2c_traceevent(FAR struct am335x_i2c_priv_s *priv,
static void am335x_i2c_traceevent(struct am335x_i2c_priv_s *priv,
enum am335x_trace_e event, uint32_t parm)
{
struct am335x_trace_s *trace;
@@ -862,7 +862,7 @@ static void am335x_i2c_traceevent(FAR struct am335x_i2c_priv_s *priv,
}
}
static void am335x_i2c_tracedump(FAR struct am335x_i2c_priv_s *priv)
static void am335x_i2c_tracedump(struct am335x_i2c_priv_s *priv)
{
struct am335x_trace_s *trace;
int i;
@@ -891,7 +891,7 @@ static void am335x_i2c_tracedump(FAR struct am335x_i2c_priv_s *priv)
*
****************************************************************************/
static void am335x_i2c_setclock(FAR struct am335x_i2c_priv_s *priv,
static void am335x_i2c_setclock(struct am335x_i2c_priv_s *priv,
uint32_t frequency)
{
uint32_t src_freq = AM335X_I2C_SCLK;
@@ -992,7 +992,7 @@ static void am335x_i2c_setclock(FAR struct am335x_i2c_priv_s *priv,
*
****************************************************************************/
static inline void am335x_i2c_sendstart(FAR struct am335x_i2c_priv_s *priv,
static inline void am335x_i2c_sendstart(struct am335x_i2c_priv_s *priv,
uint16_t address)
{
uint32_t regval;
@@ -1033,7 +1033,7 @@ static inline void am335x_i2c_sendstart(FAR struct am335x_i2c_priv_s *priv,
*
****************************************************************************/
static inline void am335x_i2c_sendstop(FAR struct am335x_i2c_priv_s *priv)
static inline void am335x_i2c_sendstop(struct am335x_i2c_priv_s *priv)
{
am335x_i2c_modifyreg(priv, AM335X_I2C_CON_OFFSET, 0, I2C_CON_STP);
}
@@ -1047,7 +1047,7 @@ static inline void am335x_i2c_sendstop(FAR struct am335x_i2c_priv_s *priv)
****************************************************************************/
static inline uint32_t
am335x_i2c_getstatus(FAR struct am335x_i2c_priv_s *priv)
am335x_i2c_getstatus(struct am335x_i2c_priv_s *priv)
{
#ifndef CONFIG_I2C_POLLED
return am335x_i2c_getreg(priv, AM335X_I2C_IRQ_STAT_OFFSET);
@@ -1288,7 +1288,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
****************************************************************************/
#ifndef CONFIG_I2C_POLLED
static int am335x_i2c_isr(int irq, void *context, FAR void *arg)
static int am335x_i2c_isr(int irq, void *context, void *arg)
{
struct am335x_i2c_priv_s *priv = (struct am335x_i2c_priv_s *)arg;
@@ -1305,7 +1305,7 @@ static int am335x_i2c_isr(int irq, void *context, FAR void *arg)
*
****************************************************************************/
static int am335x_i2c_init(FAR struct am335x_i2c_priv_s *priv)
static int am335x_i2c_init(struct am335x_i2c_priv_s *priv)
{
/* Power-up and configure GPIOs */
@@ -1364,7 +1364,7 @@ static int am335x_i2c_init(FAR struct am335x_i2c_priv_s *priv)
*
****************************************************************************/
static int am335x_i2c_deinit(FAR struct am335x_i2c_priv_s *priv)
static int am335x_i2c_deinit(struct am335x_i2c_priv_s *priv)
{
/* Disable I2C module */
@@ -1396,10 +1396,10 @@ static int am335x_i2c_deinit(FAR struct am335x_i2c_priv_s *priv)
*
****************************************************************************/
static int am335x_i2c_transfer(FAR struct i2c_master_s *dev,
FAR struct i2c_msg_s *msgs, int count)
static int am335x_i2c_transfer(struct i2c_master_s *dev,
struct i2c_msg_s *msgs, int count)
{
FAR struct am335x_i2c_priv_s *priv = (struct am335x_i2c_priv_s *)dev;
struct am335x_i2c_priv_s *priv = (struct am335x_i2c_priv_s *)dev;
int ret;
DEBUGASSERT(count > 0);
@@ -1541,9 +1541,9 @@ static int am335x_i2c_transfer(FAR struct i2c_master_s *dev,
****************************************************************************/
#ifdef CONFIG_I2C_RESET
static int am335x_i2c_reset(FAR struct i2c_master_s *dev)
static int am335x_i2c_reset(struct i2c_master_s *dev)
{
FAR struct am335x_i2c_priv_s *priv = (FAR struct am335x_i2c_priv_s *)dev;
struct am335x_i2c_priv_s *priv = (struct am335x_i2c_priv_s *)dev;
unsigned int clock_count;
unsigned int stretch_count;
gpio_pinset_t scl_gpio;
@@ -1671,7 +1671,7 @@ out:
*
****************************************************************************/
FAR struct i2c_master_s *am335x_i2cbus_initialize(int port)
struct i2c_master_s *am335x_i2cbus_initialize(int port)
{
struct am335x_i2c_priv_s * priv = NULL;
irqstate_t flags;
@@ -1724,9 +1724,9 @@ FAR struct i2c_master_s *am335x_i2cbus_initialize(int port)
*
****************************************************************************/
int am335x_i2cbus_uninitialize(FAR struct i2c_master_s *dev)
int am335x_i2cbus_uninitialize(struct i2c_master_s *dev)
{
FAR struct am335x_i2c_priv_s *priv = (struct am335x_i2c_priv_s *)dev;
struct am335x_i2c_priv_s *priv = (struct am335x_i2c_priv_s *)dev;
irqstate_t flags;
DEBUGASSERT(dev);
+2 -2
View File
@@ -49,7 +49,7 @@
*
****************************************************************************/
FAR struct i2c_master_s *am335x_i2cbus_initialize(int port);
struct i2c_master_s *am335x_i2cbus_initialize(int port);
/****************************************************************************
* Name: am335x_i2cbus_uninitialize
@@ -66,6 +66,6 @@ FAR struct i2c_master_s *am335x_i2cbus_initialize(int port);
*
****************************************************************************/
int am335x_i2cbus_uninitialize(FAR struct i2c_master_s *dev);
int am335x_i2cbus_uninitialize(struct i2c_master_s *dev);
#endif /* __ARCH_ARM_SRC_AM335X_AM335X_I2C_H */
+31 -31
View File
@@ -81,20 +81,20 @@
* configuration of each color plane.
*/
static int am335x_getvideoinfo(FAR struct fb_vtable_s *vtable,
FAR struct fb_videoinfo_s *vinfo);
static int am335x_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno,
FAR struct fb_planeinfo_s *pinfo);
static int am335x_getvideoinfo(struct fb_vtable_s *vtable,
struct fb_videoinfo_s *vinfo);
static int am335x_getplaneinfo(struct fb_vtable_s *vtable, int planeno,
struct fb_planeinfo_s *pinfo);
/* The following is provided only if the video hardware supports RGB color
* mapping
*/
#ifdef CONFIG_FB_CMAP
static int am335x_getcmap(FAR struct fb_vtable_s *vtable,
FAR struct fb_cmap_s *cmap);
static int am335x_putcmap(FAR struct fb_vtable_s *vtable,
FAR const struct fb_cmap_s *cmap);
static int am335x_getcmap(struct fb_vtable_s *vtable,
struct fb_cmap_s *cmap);
static int am335x_putcmap(struct fb_vtable_s *vtable,
const struct fb_cmap_s *cmap);
#endif
/* The following is provided only if the video hardware supports a hardware
@@ -102,18 +102,18 @@ static int am335x_putcmap(FAR struct fb_vtable_s *vtable,
*/
#ifdef CONFIG_FB_HWCURSOR
static int am335x_getcursor(FAR struct fb_vtable_s *vtable,
FAR struct fb_cursorattrib_s *attrib);
static int am335x_setcursor(FAR struct fb_vtable_s *vtable,
FAR struct fb_setcursor_s *settings);
static int am335x_getcursor(struct fb_vtable_s *vtable,
struct fb_cursorattrib_s *attrib);
static int am335x_setcursor(struct fb_vtable_s *vtable,
struct fb_setcursor_s *settings);
#endif
/* Miscellaneous internal functions */
static int am335x_lcd_interrupt(int irq, void *context, void *arg);
static int am335x_lcd_interrupt(int irq, void *context, void *arg);
static uint32_t am335x_lcd_divisor(uint32_t reference, uint32_t frequency);
static int am335x_set_refclk(uint32_t frequency);
static int am335x_get_refclk(uint32_t *frequency);
static int am335x_set_refclk(uint32_t frequency);
static int am335x_get_refclk(uint32_t *frequency);
/****************************************************************************
* Private Data
@@ -166,8 +166,8 @@ static struct am335x_lcd_dev_s g_lcddev;
* Name: am335x_getvideoinfo
****************************************************************************/
static int am335x_getvideoinfo(FAR struct fb_vtable_s *vtable,
FAR struct fb_videoinfo_s *vinfo)
static int am335x_getvideoinfo(struct fb_vtable_s *vtable,
struct fb_videoinfo_s *vinfo)
{
struct am335x_lcd_dev_s *priv = &g_lcddev;
@@ -192,8 +192,8 @@ static int am335x_getvideoinfo(FAR struct fb_vtable_s *vtable,
* Name: am335x_getplaneinfo
****************************************************************************/
static int am335x_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno,
FAR struct fb_planeinfo_s *pinfo)
static int am335x_getplaneinfo(struct fb_vtable_s *vtable, int planeno,
struct fb_planeinfo_s *pinfo)
{
struct am335x_lcd_dev_s *priv = &g_lcddev;
@@ -202,9 +202,9 @@ static int am335x_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno,
if (vtable != NULL && planeno == 0 && pinfo != NULL)
{
#ifdef CONFIG_BUILD_KERNEL
pinfo->fbmem = (FAR void *)CONFIG_AM335X_LCDC_FB_PBASE;
pinfo->fbmem = (void *)CONFIG_AM335X_LCDC_FB_PBASE;
#else
pinfo->fbmem = (FAR void *)CONFIG_AM335X_LCDC_FB_VBASE;
pinfo->fbmem = (void *)CONFIG_AM335X_LCDC_FB_VBASE;
#endif
pinfo->fblen = priv->fbsize;
pinfo->stride = priv->stride;
@@ -222,8 +222,8 @@ static int am335x_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno,
****************************************************************************/
#ifdef CONFIG_FB_CMAP
static int am335x_getcmap(FAR struct fb_vtable_s *vtable,
FAR struct fb_cmap_s *cmap)
static int am335x_getcmap(struct fb_vtable_s *vtable,
struct fb_cmap_s *cmap)
{
return -ENOSYS;
}
@@ -234,8 +234,8 @@ static int am335x_getcmap(FAR struct fb_vtable_s *vtable,
****************************************************************************/
#ifdef CONFIG_FB_CMAP
static int am335x_putcmap(FAR struct fb_vtable_s *vtable,
FAR const struct fb_cmap_s *cmap)
static int am335x_putcmap(struct fb_vtable_s *vtable,
const struct fb_cmap_s *cmap)
{
return -ENOSYS;
}
@@ -246,8 +246,8 @@ static int am335x_putcmap(FAR struct fb_vtable_s *vtable,
****************************************************************************/
#ifdef CONFIG_FB_HWCURSOR
static int am335x_getcursor(FAR struct fb_vtable_s *vtable,
FAR struct fb_cursorattrib_s *attrib)
static int am335x_getcursor(struct fb_vtable_s *vtable,
struct fb_cursorattrib_s *attrib)
{
lcdinfo("vtable=%p attrib=%p\n", vtable, attrib);
return -ENOSYS;
@@ -259,8 +259,8 @@ static int am335x_getcursor(FAR struct fb_vtable_s *vtable,
****************************************************************************/
#ifdef CONFIG_FB_HWCURSOR
static int am335x_setcursor(FAR struct fb_vtable_s *vtable,
FAR struct fb_setcursor_s *settings)
static int am335x_setcursor(struct fb_vtable_s *vtable,
struct fb_setcursor_s *settings)
{
lcdinfo("vtable=%p settings=%p\n", vtable, settings);
return -ENOSYS;
@@ -507,7 +507,7 @@ static int am335x_get_refclk(uint32_t *frequency)
*
****************************************************************************/
int am335x_lcd_initialize(FAR const struct am335x_panel_info_s *panel)
int am335x_lcd_initialize(const struct am335x_panel_info_s *panel)
{
struct am335x_lcd_dev_s *priv = &g_lcddev;
uint32_t regval;
@@ -832,7 +832,7 @@ int am335x_lcd_initialize(FAR const struct am335x_panel_info_s *panel)
*
****************************************************************************/
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
{
lcdinfo("vplane: %d\n", vplane);
if (vplane == 0)
+6 -6
View File
@@ -220,7 +220,7 @@ struct am335x_panel_info_s
*
****************************************************************************/
int am335x_lcd_initialize(FAR const struct am335x_panel_info_s *panel);
int am335x_lcd_initialize(const struct am335x_panel_info_s *panel);
/****************************************************************************
* Name: am335x_lcdclear
@@ -255,8 +255,8 @@ void am335x_lcdclear(nxgl_mxpixel_t color);
struct videomode_s; /* Forward reference */
void am335x_lcd_videomode(FAR const struct videomode_s *videomode,
FAR struct am335x_panel_info_s *panel);
void am335x_lcd_videomode(const struct videomode_s *videomode,
struct am335x_panel_info_s *panel);
/****************************************************************************
* Name: am335x_lcd_edid
@@ -281,9 +281,9 @@ void am335x_lcd_videomode(FAR const struct videomode_s *videomode,
*
****************************************************************************/
void am335x_lcd_edid(FAR const uint8_t *edid, size_t edid_len,
FAR struct am335x_panel_info_s *panel,
FAR const struct videomode_s **selected);
void am335x_lcd_edid(const uint8_t *edid, size_t edid_len,
struct am335x_panel_info_s *panel,
const struct videomode_s **selected);
/****************************************************************************
* Name: am335x_backlight
+24 -24
View File
@@ -280,7 +280,7 @@
/* This is a helper pointer for accessing the contents of Ethernet header */
#define BUF ((FAR struct eth_hdr_s *)priv->c_dev.d_buf)
#define BUF ((struct eth_hdr_s *)priv->c_dev.d_buf)
/****************************************************************************
* Private Types
@@ -389,15 +389,15 @@ static void c5471_txstatus(struct c5471_driver_s *priv);
#endif
static void c5471_txdone(struct c5471_driver_s *priv);
static void c5471_interrupt_work(FAR void *arg);
static int c5471_interrupt(int irq, FAR void *context, FAR void *arg);
static void c5471_interrupt_work(void *arg);
static int c5471_interrupt(int irq, void *context, void *arg);
/* Watchdog timer expirations */
static void c5471_txtimeout_work(FAR void *arg);
static void c5471_txtimeout_work(void *arg);
static void c5471_txtimeout_expiry(wdparm_t arg);
static void c5471_poll_work(FAR void *arg);
static void c5471_poll_work(void *arg);
static void c5471_poll_expiry(wdparm_t arg);
/* NuttX callback functions */
@@ -405,12 +405,12 @@ static void c5471_poll_expiry(wdparm_t arg);
static int c5471_ifup(struct net_driver_s *dev);
static int c5471_ifdown(struct net_driver_s *dev);
static void c5471_txavail_work(FAR void *arg);
static void c5471_txavail_work(void *arg);
static int c5471_txavail(struct net_driver_s *dev);
#ifdef CONFIG_NET_MCASTGROUP
static int c5471_addmac(struct net_driver_s *dev, FAR const uint8_t *mac);
static int c5471_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
static int c5471_addmac(struct net_driver_s *dev, const uint8_t *mac);
static int c5471_rmmac(struct net_driver_s *dev, const uint8_t *mac);
#endif
/* Initialization functions */
@@ -1580,9 +1580,9 @@ static void c5471_txdone(struct c5471_driver_s *priv)
*
****************************************************************************/
static void c5471_interrupt_work(FAR void *arg)
static void c5471_interrupt_work(void *arg)
{
FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)arg;
struct c5471_driver_s *priv = (struct c5471_driver_s *)arg;
/* Process pending Ethernet interrupts */
@@ -1663,7 +1663,7 @@ static void c5471_interrupt_work(FAR void *arg)
*
****************************************************************************/
static int c5471_interrupt(int irq, FAR void *context, FAR void *arg)
static int c5471_interrupt(int irq, void *context, void *arg)
{
#if CONFIG_C5471_NET_NINTERFACES == 1
register struct c5471_driver_s *priv = &g_c5471[0];
@@ -1712,9 +1712,9 @@ static int c5471_interrupt(int irq, FAR void *context, FAR void *arg)
*
****************************************************************************/
static void c5471_txtimeout_work(FAR void *arg)
static void c5471_txtimeout_work(void *arg)
{
FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)arg;
struct c5471_driver_s *priv = (struct c5471_driver_s *)arg;
/* Increment statistics */
@@ -1788,9 +1788,9 @@ static void c5471_txtimeout_expiry(wdparm_t arg)
*
****************************************************************************/
static void c5471_poll_work(FAR void *arg)
static void c5471_poll_work(void *arg)
{
FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)arg;
struct c5471_driver_s *priv = (struct c5471_driver_s *)arg;
/* Check if the ESM has let go of the RX descriptor giving us access rights
* to submit another Ethernet frame.
@@ -1976,9 +1976,9 @@ static int c5471_ifdown(struct net_driver_s *dev)
*
****************************************************************************/
static void c5471_txavail_work(FAR void *arg)
static void c5471_txavail_work(void *arg)
{
FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)arg;
struct c5471_driver_s *priv = (struct c5471_driver_s *)arg;
ninfo("Polling\n");
@@ -2021,7 +2021,7 @@ static void c5471_txavail_work(FAR void *arg)
*
****************************************************************************/
static int c5471_txavail(FAR struct net_driver_s *dev)
static int c5471_txavail(struct net_driver_s *dev)
{
struct c5471_driver_s *priv = (struct c5471_driver_s *)dev->d_private;
@@ -2059,10 +2059,10 @@ static int c5471_txavail(FAR struct net_driver_s *dev)
****************************************************************************/
#ifdef CONFIG_NET_MCASTGROUP
static int c5471_addmac(struct net_driver_s *dev, FAR const uint8_t *mac)
static int c5471_addmac(struct net_driver_s *dev, const uint8_t *mac)
{
FAR struct c5471_driver_s *priv =
(FAR struct c5471_driver_s *)dev->d_private;
struct c5471_driver_s *priv =
(struct c5471_driver_s *)dev->d_private;
/* Add the MAC address to the hardware multicast routing table */
@@ -2090,10 +2090,10 @@ static int c5471_addmac(struct net_driver_s *dev, FAR const uint8_t *mac)
****************************************************************************/
#ifdef CONFIG_NET_MCASTGROUP
static int c5471_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac)
static int c5471_rmmac(struct net_driver_s *dev, const uint8_t *mac)
{
FAR struct c5471_driver_s *priv =
(FAR struct c5471_driver_s *)dev->d_private;
struct c5471_driver_s *priv =
(struct c5471_driver_s *)dev->d_private;
/* Add the MAC address to the hardware multicast routing table */
+1 -1
View File
@@ -66,7 +66,7 @@
*
****************************************************************************/
static int c5471_timerisr(int irq, uint32_t *regs, FAR void *arg)
static int c5471_timerisr(int irq, uint32_t *regs, void *arg)
{
/* Process timer interrupt */
+4 -4
View File
@@ -80,14 +80,14 @@
static inline unsigned int wdt_prescaletoptv(unsigned int prescale);
static int wdt_setusec(uint32_t usec);
static int wdt_interrupt(int irq, void *context, FAR void *arg);
static int wdt_interrupt(int irq, void *context, void *arg);
static int wdt_open(struct file *filep);
static int wdt_close(struct file *filep);
static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen);
static ssize_t wdt_write(struct file *filep, const char *buffer,
size_t buflen);
static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
static int wdt_ioctl(struct file *filep, int cmd, unsigned long arg);
/****************************************************************************
* Private Data
@@ -220,7 +220,7 @@ static int wdt_setusec(uint32_t usec)
* Name: wdt_interrupt
****************************************************************************/
static int wdt_interrupt(int irq, void *context, FAR void *arg)
static int wdt_interrupt(int irq, void *context, void *arg)
{
wdinfo("expired\n");
@@ -281,7 +281,7 @@ static ssize_t wdt_write(struct file *filep, const char *buffer,
* Name: wdt_ioctl
****************************************************************************/
static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
static int wdt_ioctl(struct file *filep, int cmd, unsigned long arg)
{
wdinfo("ioctl Call: cmd=0x%x arg=0x%lx", cmd, arg);
+20 -20
View File
@@ -165,7 +165,7 @@ typedef enum adc_ch
struct cxd56adc_dev_s
{
adc_ch_t ch; /* adc channel number */
FAR struct seq_s *seq; /* sequencer */
struct seq_s *seq; /* sequencer */
uint8_t freq; /* coefficient of adc sampling frequency */
uint16_t fsize; /* SCU FIFO size */
uint16_t ofst; /* offset */
@@ -184,11 +184,11 @@ struct cxd56adc_dev_s
/* Character driver methods */
static int cxd56_adc_open(FAR struct file *filep);
static int cxd56_adc_close(FAR struct file *filep);
static ssize_t cxd56_adc_read(FAR struct file *filep, FAR char *buffer,
static int cxd56_adc_open(struct file *filep);
static int cxd56_adc_close(struct file *filep);
static ssize_t cxd56_adc_read(struct file *filep, char *buffer,
size_t len);
static int cxd56_adc_ioctl(FAR struct file *filep, int cmd,
static int cxd56_adc_ioctl(struct file *filep, int cmd,
unsigned long arg);
/****************************************************************************
@@ -324,7 +324,7 @@ static bool adc_active[CH_MAX] =
*
****************************************************************************/
static int set_ofstgain(FAR struct cxd56adc_dev_s *priv)
static int set_ofstgain(struct cxd56adc_dev_s *priv)
{
int ret = OK;
uint32_t addr;
@@ -370,7 +370,7 @@ static int set_ofstgain(FAR struct cxd56adc_dev_s *priv)
*
****************************************************************************/
static int adc_start(adc_ch_t ch, uint8_t freq, FAR struct seq_s *seq,
static int adc_start(adc_ch_t ch, uint8_t freq, struct seq_s *seq,
int fsize, int fifomode,
struct scufifo_wm_s *wm,
struct math_filter_s *filter,
@@ -619,7 +619,7 @@ static int adc_start(adc_ch_t ch, uint8_t freq, FAR struct seq_s *seq,
*
****************************************************************************/
static int adc_stop(adc_ch_t ch, FAR struct seq_s *seq)
static int adc_stop(adc_ch_t ch, struct seq_s *seq)
{
uint32_t *addr;
uint32_t val;
@@ -706,10 +706,10 @@ static bool adc_validcheck(int cmd)
*
****************************************************************************/
static int cxd56_adc_open(FAR struct file *filep)
static int cxd56_adc_open(struct file *filep)
{
FAR struct inode *inode = filep->f_inode;
FAR struct cxd56adc_dev_s *priv = inode->i_private;
struct inode *inode = filep->f_inode;
struct cxd56adc_dev_s *priv = inode->i_private;
int ret = OK;
int type;
@@ -770,10 +770,10 @@ static int cxd56_adc_open(FAR struct file *filep)
*
****************************************************************************/
static int cxd56_adc_close(FAR struct file *filep)
static int cxd56_adc_close(struct file *filep)
{
FAR struct inode *inode = filep->f_inode;
FAR struct cxd56adc_dev_s *priv = inode->i_private;
struct inode *inode = filep->f_inode;
struct cxd56adc_dev_s *priv = inode->i_private;
DEBUGASSERT(priv != NULL);
DEBUGASSERT(priv->seq != NULL);
@@ -828,11 +828,11 @@ static int cxd56_adc_close(FAR struct file *filep)
*
****************************************************************************/
static ssize_t cxd56_adc_read(FAR struct file *filep, FAR char *buffer,
static ssize_t cxd56_adc_read(struct file *filep, char *buffer,
size_t len)
{
FAR struct inode *inode = filep->f_inode;
FAR struct cxd56adc_dev_s *priv = inode->i_private;
struct inode *inode = filep->f_inode;
struct cxd56adc_dev_s *priv = inode->i_private;
int ret = OK;
DEBUGASSERT(priv != NULL);
@@ -853,11 +853,11 @@ static ssize_t cxd56_adc_read(FAR struct file *filep, FAR char *buffer,
*
****************************************************************************/
static int cxd56_adc_ioctl(FAR struct file *filep, int cmd,
static int cxd56_adc_ioctl(struct file *filep, int cmd,
unsigned long arg)
{
FAR struct inode *inode = filep->f_inode;
FAR struct cxd56adc_dev_s *priv = inode->i_private;
struct inode *inode = filep->f_inode;
struct cxd56adc_dev_s *priv = inode->i_private;
int ret = OK;
DEBUGASSERT(priv != NULL);
DEBUGASSERT(priv->seq != NULL);
+3 -3
View File
@@ -82,7 +82,7 @@ extern char __stack[];
****************************************************************************/
#ifdef CONFIG_HEAP_COLORATION
static inline void up_heap_color(FAR void *start, size_t size)
static inline void up_heap_color(void *start, size_t size)
{
memset(start, HEAP_COLOR, size);
}
@@ -109,12 +109,12 @@ static inline void up_heap_color(FAR void *start, size_t size)
*
****************************************************************************/
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
void up_allocate_heap(void **heap_start, size_t *heap_size)
{
/* Start with the first SRAM region */
board_autoled_on(LED_HEAPALLOCATE);
*heap_start = (FAR void *)g_idle_topstack;
*heap_start = (void *)g_idle_topstack;
*heap_size = (uint32_t)&__stack - g_idle_topstack;
/* Colorize the heap for debug */
+47 -47
View File
@@ -71,17 +71,17 @@ struct charger_dev_s
* Private Function Prototypes
****************************************************************************/
static int charger_get_status(FAR enum battery_status_e *status);
static int charger_get_health(FAR enum battery_health_e *health);
static int charger_online(FAR bool *online);
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_get_status(enum battery_status_e *status);
static int charger_get_health(enum battery_health_e *health);
static int charger_online(bool *online);
static int charger_get_temptable(struct battery_temp_table_s *table);
static int charger_set_temptable(struct battery_temp_table_s *table);
static ssize_t charger_read(FAR struct file *filep, FAR char *buffer,
static ssize_t charger_read(struct file *filep, char *buffer,
size_t buflen);
static ssize_t charger_write(FAR struct file *filep,
FAR const char *buffer, size_t buflen);
static int charger_ioctl(FAR struct file *filep, int cmd,
static ssize_t charger_write(struct file *filep,
const char *buffer, size_t buflen);
static int charger_ioctl(struct file *filep, int cmd,
unsigned long arg);
/****************************************************************************
@@ -198,7 +198,7 @@ static int charger_therm2temp(int val)
* Name: charger_get_status
****************************************************************************/
static int charger_get_status(FAR enum battery_status_e *status)
static int charger_get_status(enum battery_status_e *status)
{
uint8_t state;
int ret;
@@ -257,9 +257,9 @@ static int charger_get_status(FAR enum battery_status_e *status)
* Name: charger_get_health
****************************************************************************/
static int charger_get_health(FAR enum battery_health_e *health)
static int charger_get_health(enum battery_health_e *health)
{
FAR struct pmic_gauge_s gauge;
struct pmic_gauge_s gauge;
uint8_t state;
int temp;
int ret;
@@ -307,7 +307,7 @@ static int charger_get_health(FAR enum battery_health_e *health)
* Name: charger_online
****************************************************************************/
static int charger_online(FAR bool *online)
static int charger_online(bool *online)
{
if (online == NULL)
{
@@ -322,9 +322,9 @@ static int charger_online(FAR bool *online)
* Name: charger_get_current
****************************************************************************/
static int charger_get_current(FAR int *current)
static int charger_get_current(int *current)
{
FAR struct pmic_gauge_s gauge;
struct pmic_gauge_s gauge;
int ret;
ASSERT(current);
@@ -354,9 +354,9 @@ static int charger_get_current(FAR int *current)
* Name: charger_get_voltage
****************************************************************************/
static int charger_get_voltage(FAR int *voltage)
static int charger_get_voltage(int *voltage)
{
FAR struct pmic_gauge_s gauge;
struct pmic_gauge_s gauge;
int ret;
ASSERT(voltage);
@@ -382,7 +382,7 @@ static int charger_get_voltage(FAR int *voltage)
* Name: charger_get_temptable
****************************************************************************/
static int charger_get_temptable(FAR struct battery_temp_table_s *table)
static int charger_get_temptable(struct battery_temp_table_s *table)
{
struct pmic_temp_table_s buf;
int ret;
@@ -405,7 +405,7 @@ static int charger_get_temptable(FAR struct battery_temp_table_s *table)
* Name: charger_set_temptable
****************************************************************************/
static int charger_set_temptable(FAR struct battery_temp_table_s *table)
static int charger_set_temptable(struct battery_temp_table_s *table)
{
struct pmic_temp_table_s buf;
@@ -421,7 +421,7 @@ static int charger_set_temptable(FAR struct battery_temp_table_s *table)
* Name: charger_read
****************************************************************************/
static ssize_t charger_read(FAR struct file *filep, FAR char *buffer,
static ssize_t charger_read(struct file *filep, char *buffer,
size_t buflen)
{
/* Return nothing read */
@@ -433,8 +433,8 @@ static ssize_t charger_read(FAR struct file *filep, FAR char *buffer,
* Name: charger_write
****************************************************************************/
static ssize_t charger_write(FAR struct file *filep,
FAR const char *buffer, size_t buflen)
static ssize_t charger_write(struct file *filep,
const char *buffer, size_t buflen)
{
/* Return nothing written */
@@ -445,10 +445,10 @@ static ssize_t charger_write(FAR struct file *filep,
* Name: charger_ioctl
****************************************************************************/
static int charger_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
static int charger_ioctl(struct file *filep, int cmd, unsigned long arg)
{
FAR struct inode *inode = filep->f_inode;
FAR struct charger_dev_s *priv = inode->i_private;
struct inode *inode = filep->f_inode;
struct charger_dev_s *priv = inode->i_private;
int ret = -ENOTTY;
nxsem_wait_uninterruptible(&priv->batsem);
@@ -457,30 +457,30 @@ static int charger_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
case BATIOC_STATE:
{
FAR enum battery_status_e *status =
(FAR enum battery_status_e *)(uintptr_t)arg;
enum battery_status_e *status =
(enum battery_status_e *)(uintptr_t)arg;
ret = charger_get_status(status);
}
break;
case BATIOC_HEALTH:
{
FAR enum battery_health_e *health =
(FAR enum battery_health_e *)(uintptr_t)arg;
enum battery_health_e *health =
(enum battery_health_e *)(uintptr_t)arg;
ret = charger_get_health(health);
}
break;
case BATIOC_ONLINE:
{
FAR bool *online = (FAR bool *)(uintptr_t)arg;
bool *online = (bool *)(uintptr_t)arg;
ret = charger_online(online);
}
break;
case BATIOC_VOLTAGE:
{
FAR int *voltage = (FAR int *)(uintptr_t)arg;
int *voltage = (int *)(uintptr_t)arg;
ret = cxd56_pmic_setchargevol(*voltage);
}
break;
@@ -495,72 +495,72 @@ static int charger_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
case BATIOC_INPUT_CURRENT:
{
FAR int *current = (FAR int *)(uintptr_t)arg;
int *current = (int *)(uintptr_t)arg;
ret = cxd56_pmic_setchargecurrent(*current);
}
break;
case BATIOC_GET_CHGVOLTAGE:
{
FAR int *voltage = (FAR int *)(uintptr_t)arg;
int *voltage = (int *)(uintptr_t)arg;
ret = cxd56_pmic_getchargevol(voltage);
}
break;
case BATIOC_GET_CHGCURRENT:
{
FAR int *current = (FAR int *)(uintptr_t)arg;
int *current = (int *)(uintptr_t)arg;
ret = cxd56_pmic_getchargecurrent(current);
}
break;
case BATIOC_GET_RECHARGEVOL:
{
FAR int *voltage = (FAR int *)(uintptr_t)arg;
int *voltage = (int *)(uintptr_t)arg;
ret = cxd56_pmic_getrechargevol(voltage);
}
break;
case BATIOC_SET_RECHARGEVOL:
{
FAR int *voltage = (FAR int *)(uintptr_t)arg;
int *voltage = (int *)(uintptr_t)arg;
ret = cxd56_pmic_setrechargevol(*voltage);
}
break;
case BATIOC_GET_COMPCURRENT:
{
FAR int *current = (FAR int *)(uintptr_t)arg;
int *current = (int *)(uintptr_t)arg;
ret = cxd56_pmic_getchargecompcurrent(current);
}
break;
case BATIOC_GET_TEMPTABLE:
{
FAR struct battery_temp_table_s *table =
(FAR struct battery_temp_table_s *)(uintptr_t)arg;
struct battery_temp_table_s *table =
(struct battery_temp_table_s *)(uintptr_t)arg;
ret = charger_get_temptable(table);
}
break;
case BATIOC_SET_TEMPTABLE:
{
FAR struct battery_temp_table_s *table =
(FAR struct battery_temp_table_s *)(uintptr_t)arg;
struct battery_temp_table_s *table =
(struct battery_temp_table_s *)(uintptr_t)arg;
ret = charger_set_temptable(table);
}
break;
case BATIOC_SET_COMPCURRENT:
{
FAR int *current = (FAR int *)(uintptr_t)arg;
int *current = (int *)(uintptr_t)arg;
ret = cxd56_pmic_setchargecompcurrent(*current);
}
break;
case BATIOC_GET_CURRENT:
{
FAR int *curr = (FAR int *)(uintptr_t)arg;
int *curr = (int *)(uintptr_t)arg;
if (curr)
{
@@ -575,7 +575,7 @@ static int charger_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
case BATIOC_GET_VOLTAGE:
{
FAR int *vol = (FAR int *)(uintptr_t)arg;
int *vol = (int *)(uintptr_t)arg;
if (vol)
{
@@ -616,9 +616,9 @@ static int charger_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
*
****************************************************************************/
int cxd56_charger_initialize(FAR const char *devpath)
int cxd56_charger_initialize(const char *devpath)
{
FAR struct charger_dev_s *priv = &g_chargerdev;
struct charger_dev_s *priv = &g_chargerdev;
int ret;
/* Initialize the CXD5247 device structure */
@@ -651,7 +651,7 @@ int cxd56_charger_initialize(FAR const char *devpath)
*
****************************************************************************/
int cxd56_charger_uninitialize(FAR const char *devpath)
int cxd56_charger_uninitialize(const char *devpath)
{
unregister_driver(devpath);
return OK;
+2 -2
View File
@@ -23,7 +23,7 @@
/* initialize function */
int cxd56_charger_initialize(FAR const char *devpath);
int cxd56_charger_uninitialize(FAR const char *devpath);
int cxd56_charger_initialize(const char *devpath);
int cxd56_charger_uninitialize(const char *devpath);
#endif /* __ARCH_ARM_SRC_CXD56XX_CXD56_CHARGER_H */
+10 -10
View File
@@ -198,7 +198,7 @@ static int cisif_set_jpg_sarea(uint8_t *addr, uint32_t size);
static int cisif_set_intlev_sarea(uint8_t *addr,
uint32_t total_size,
uint32_t yuv_size);
static int cisif_intc_handler(int irq, FAR void *context, FAR void *arg);
static int cisif_intc_handler(int irq, void *context, void *arg);
/* video image data operations */
@@ -206,12 +206,12 @@ static int cxd56_cisif_init(void);
static int cxd56_cisif_uninit(void);
static int cxd56_cisif_validate_frame_setting
(uint8_t nr_datafmt,
FAR imgdata_format_t *datafmt,
FAR imgdata_interval_t *interval);
imgdata_format_t *datafmt,
imgdata_interval_t *interval);
static int cxd56_cisif_start_capture
(uint8_t nr_datafmt,
FAR imgdata_format_t *datafmt,
FAR imgdata_interval_t *interval,
imgdata_format_t *datafmt,
imgdata_interval_t *interval,
imgdata_capture_t callback);
static int cxd56_cisif_stop_capture(void);
static int cxd56_cisif_validate_buf(uint8_t *addr, uint32_t size);
@@ -514,7 +514,7 @@ static void cisif_jpg_err_int(uint8_t code)
* cisif_intc_handler
****************************************************************************/
static int cisif_intc_handler(int irq, FAR void *context, FAR void *arg)
static int cisif_intc_handler(int irq, void *context, void *arg)
{
uint32_t value;
uint32_t enable;
@@ -835,8 +835,8 @@ static int cxd56_cisif_uninit(void)
static int cxd56_cisif_start_capture
(uint8_t nr_fmt,
FAR imgdata_format_t *fmt,
FAR imgdata_interval_t *interval,
imgdata_format_t *fmt,
imgdata_interval_t *interval,
imgdata_capture_t callback)
{
cisif_param_t param =
@@ -1007,8 +1007,8 @@ static int cxd56_cisif_set_buf(uint8_t *addr, uint32_t size)
static int cxd56_cisif_validate_frame_setting
(uint8_t nr_datafmt,
FAR imgdata_format_t *datafmt,
FAR imgdata_interval_t *interval)
imgdata_format_t *datafmt,
imgdata_interval_t *interval)
{
int ret = OK;
+6 -6
View File
@@ -127,11 +127,11 @@ struct power_domain
static void cxd56_img_clock_enable(void);
static void cxd56_img_clock_disable(void);
static void cxd56_scu_clock_ctrl(uint32_t block, uint32_t intr, int on);
static void cxd56_scu_peri_clock_enable(FAR const struct scu_peripheral *p)
static void cxd56_scu_peri_clock_enable(const struct scu_peripheral *p)
unused_code;
static void cxd56_scu_peri_clock_disable(FAR const struct scu_peripheral *p)
static void cxd56_scu_peri_clock_disable(const struct scu_peripheral *p)
unused_code;
static void cxd56_scu_peri_clock_gating(FAR const struct scu_peripheral *p,
static void cxd56_scu_peri_clock_gating(const struct scu_peripheral *p,
int enable) unused_code;
/****************************************************************************
@@ -1965,7 +1965,7 @@ void cxd56_scuseq_clock_disable(void)
disable_pwd(PDID_SCU);
}
static void cxd56_scu_peri_clock_enable(FAR const struct scu_peripheral *p)
static void cxd56_scu_peri_clock_enable(const struct scu_peripheral *p)
{
uint32_t val;
uint32_t rst;
@@ -1994,7 +1994,7 @@ static void cxd56_scu_peri_clock_enable(FAR const struct scu_peripheral *p)
cxd56_scu_clock_ctrl(cken, crgintmask, 1);
}
static void cxd56_scu_peri_clock_disable(FAR const struct scu_peripheral *p)
static void cxd56_scu_peri_clock_disable(const struct scu_peripheral *p)
{
uint32_t val;
uint32_t rst;
@@ -2019,7 +2019,7 @@ static void cxd56_scu_peri_clock_disable(FAR const struct scu_peripheral *p)
}
static void cxd56_scu_peri_clock_gating(
FAR const struct scu_peripheral *p, int enable)
const struct scu_peripheral *p, int enable)
{
uint32_t cken = 1u << p->cken;
+4 -4
View File
@@ -55,7 +55,7 @@ struct cxd56_sigtype_s
{
int use;
cxd56_cpu1sighandler_t handler;
FAR void * data;
void *data;
};
struct cxd56cpu1_info_s
@@ -82,7 +82,7 @@ static struct cxd56cpu1_info_s g_cpu1_info =
* Private Functions
****************************************************************************/
static int cxd56cpu1_worker(int argc, FAR char *argv[])
static int cxd56cpu1_worker(int argc, char *argv[])
{
struct cxd56cpu1_info_s *priv = &g_cpu1_info;
iccmsg_t msg;
@@ -156,7 +156,7 @@ void cxd56_cpu1sigunregisterhandler(uint8_t sigtype)
priv->sigtype[sigtype].handler = NULL;
}
int cxd56_cpu1siginit(uint8_t sigtype, FAR void *data)
int cxd56_cpu1siginit(uint8_t sigtype, void *data)
{
struct cxd56cpu1_info_s *priv = &g_cpu1_info;
int pid;
@@ -200,7 +200,7 @@ int cxd56_cpu1siginit(uint8_t sigtype, FAR void *data)
pid = kthread_create("gnss_receiver",
CONFIG_CXD56CPU1_WORKER_THREAD_PRIORITY,
CONFIG_CXD56CPU1_WORKER_STACKSIZE, cxd56cpu1_worker,
(FAR char * const *) NULL);
NULL);
if (pid < 0)
{
+2 -2
View File
@@ -55,9 +55,9 @@
#error "CXD56_CPU1_DEV must be smaller than 0xf"
#endif
typedef void (*cxd56_cpu1sighandler_t)(uint32_t data, FAR void *userdata);
typedef void (*cxd56_cpu1sighandler_t)(uint32_t data, void *userdata);
extern int cxd56_cpu1siginit(uint8_t cpu1dev, FAR void *data);
extern int cxd56_cpu1siginit(uint8_t cpu1dev, void *data);
extern int cxd56_cpu1siguninit(uint8_t cpu1dev);
extern void cxd56_cpu1sigregisterhandler(uint8_t cpu1dev,
cxd56_cpu1sighandler_t handler);
+10 -10
View File
@@ -53,7 +53,7 @@
struct cfpushdata_s
{
FAR sq_entry_t entry;
sq_entry_t entry;
uint32_t data[2];
};
@@ -61,8 +61,8 @@ struct cfpushdata_s
* Private Function Prototypes
****************************************************************************/
static int cpufifo_txhandler(int irq, FAR void *context, FAR void *arg);
static int cpufifo_rxhandler(int irq, FAR void *context, FAR void *arg);
static int cpufifo_txhandler(int irq, void *context, void *arg);
static int cpufifo_rxhandler(int irq, void *context, void *arg);
static int cpufifo_trypush(uint32_t data[2]);
static int cpufifo_reserve(uint32_t data[2]);
@@ -81,11 +81,11 @@ static cpufifo_handler_t g_cfrxhandler;
* Private Functions
****************************************************************************/
static int cpufifo_txhandler(int irq, FAR void *context, FAR void *arg)
static int cpufifo_txhandler(int irq, void *context, void *arg)
{
FAR struct cfpushdata_s *pd;
struct cfpushdata_s *pd;
pd = (FAR struct cfpushdata_s *)sq_remfirst(&g_pushqueue);
pd = (struct cfpushdata_s *)sq_remfirst(&g_pushqueue);
if (pd)
{
/* Ignore error because always FIFO is not full at here */
@@ -102,7 +102,7 @@ static int cpufifo_txhandler(int irq, FAR void *context, FAR void *arg)
return OK;
}
static int cpufifo_rxhandler(int irq, FAR void *context, FAR void *arg)
static int cpufifo_rxhandler(int irq, void *context, void *arg)
{
uint32_t word[2] =
{
@@ -144,9 +144,9 @@ static int cpufifo_trypush(uint32_t data[2])
static int cpufifo_reserve(uint32_t data[2])
{
FAR struct cfpushdata_s *pd;
struct cfpushdata_s *pd;
pd = (FAR struct cfpushdata_s *)sq_remfirst(&g_emptyqueue);
pd = (struct cfpushdata_s *)sq_remfirst(&g_emptyqueue);
/* This error indicates that need more sending buffer, it can be
* configured by CONFIG_CXD56_CPUFIFO_ENTRIES.
@@ -252,7 +252,7 @@ int cxd56_cfinitialize(void)
for (i = 0; i < NR_PUSHBUFENTRIES; i++)
{
sq_addlast((FAR sq_entry_t *)&g_pushbuffer[i], &g_emptyqueue);
sq_addlast((sq_entry_t *)&g_pushbuffer[i], &g_emptyqueue);
}
/* Clear user defined receive handler. */
+1 -1
View File
@@ -80,7 +80,7 @@
*
****************************************************************************/
int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size)
int up_cpu_idlestack(int cpu, struct tcb_s *tcb, size_t stack_size)
{
#if CONFIG_SMP_NCPUS > 1
up_create_stack(tcb, stack_size, TCB_FLAG_TTYPE_KERNEL);
+2 -2
View File
@@ -201,7 +201,7 @@ int up_cpu_paused(int cpu)
return OK;
}
FAR struct tcb_s *tcb = this_task();
struct tcb_s *tcb = this_task();
/* Update scheduler parameters */
@@ -264,7 +264,7 @@ int up_cpu_paused(int cpu)
*
****************************************************************************/
int arm_pause_handler(int irq, void *c, FAR void *arg)
int arm_pause_handler(int irq, void *c, void *arg)
{
int cpu = up_cpu_index();
int ret = OK;
+1 -1
View File
@@ -72,7 +72,7 @@
volatile static spinlock_t g_appdsp_boot;
extern int arm_pause_handler(int irq, void *c, FAR void *arg);
extern int arm_pause_handler(int irq, void *c, void *arg);
/****************************************************************************
* Private Functions
+11 -11
View File
@@ -235,11 +235,11 @@ typedef struct
static int open_channels = 0;
static int intr_handler_admac0(int irq, FAR void *context, FAR void *arg);
static int intr_handler_admac1(int irq, FAR void *context, FAR void *arg);
static int intr_handler_idmac(int irq, FAR void *context, FAR void *arg);
static int intr_handler_skdmac0(int irq, FAR void *context, FAR void *arg);
static int intr_handler_skdmac1(int irq, FAR void *context, FAR void *arg);
static int intr_handler_admac0(int irq, void *context, void *arg);
static int intr_handler_admac1(int irq, void *context, void *arg);
static int intr_handler_idmac(int irq, void *context, void *arg);
static int intr_handler_skdmac0(int irq, void *context, void *arg);
static int intr_handler_skdmac1(int irq, void *context, void *arg);
static uint32_t irq_map[] =
{
CXD56_IRQ_APP_DMAC0,
@@ -253,7 +253,7 @@ static uint32_t irq_map[] =
CXD56_IRQ_SKDMAC_1,
};
static int (*intc_handler[])(int irq, FAR void *context, FAR void *arg) =
static int (*intc_handler[])(int irq, void *context, void *arg) =
{
intr_handler_admac0,
intr_handler_admac1,
@@ -420,19 +420,19 @@ static void _dmac_intc_handler(int ch)
}
}
static int intr_handler_admac0(int irq, FAR void *context, FAR void *arg)
static int intr_handler_admac0(int irq, void *context, void *arg)
{
_dmac_intc_handler(0);
return OK;
}
static int intr_handler_admac1(int irq, FAR void *context, FAR void *arg)
static int intr_handler_admac1(int irq, void *context, void *arg)
{
_dmac_intc_handler(1);
return OK;
}
static int intr_handler_idmac(int irq, FAR void *context, FAR void *arg)
static int intr_handler_idmac(int irq, void *context, void *arg)
{
struct dmac_register_map *dev = get_device(2); /* XXX */
uint32_t stat = dev->intstatus & 0x1f;
@@ -449,13 +449,13 @@ static int intr_handler_idmac(int irq, FAR void *context, FAR void *arg)
return OK;
}
static int intr_handler_skdmac0(int irq, FAR void *context, FAR void *arg)
static int intr_handler_skdmac0(int irq, void *context, void *arg)
{
_dmac_intc_handler(7);
return OK;
}
static int intr_handler_skdmac1(int irq, FAR void *context, FAR void *arg)
static int intr_handler_skdmac1(int irq, void *context, void *arg)
{
_dmac_intc_handler(8);
return OK;
+1 -1
View File
@@ -35,7 +35,7 @@
* DMA channel.
*/
typedef FAR void *DMA_HANDLE;
typedef void *DMA_HANDLE;
/* Description:
* This is the type of the callback that is used to inform the user of the
+31 -31
View File
@@ -102,21 +102,21 @@ struct cxd56_emmc_state_s
/* Block driver interfaces **************************************************/
static int cxd56_emmc_open(FAR struct inode *inode);
static int cxd56_emmc_close(FAR struct inode *inode);
static ssize_t cxd56_emmc_read(FAR struct inode *inode,
static int cxd56_emmc_open(struct inode *inode);
static int cxd56_emmc_close(struct inode *inode);
static ssize_t cxd56_emmc_read(struct inode *inode,
unsigned char *buffer,
blkcnt_t start_sector,
unsigned int nsectors);
#if !defined(CONFIG_MMCSD_READONLY)
static ssize_t cxd56_emmc_write(FAR struct inode *inode,
static ssize_t cxd56_emmc_write(struct inode *inode,
const unsigned char *buffer,
blkcnt_t start_sector,
unsigned int nsectors);
#endif
static int cxd56_emmc_geometry(FAR struct inode *inode,
static int cxd56_emmc_geometry(struct inode *inode,
struct geometry *geometry);
static int emmc_interrupt(int irq, FAR void *context, FAR void *arg);
static int emmc_interrupt(int irq, void *context, void *arg);
/****************************************************************************
* Private Data
@@ -143,12 +143,12 @@ struct cxd56_emmc_state_s g_emmcdev;
* Private Functions
****************************************************************************/
static int emmc_takesem(FAR sem_t *sem)
static int emmc_takesem(sem_t *sem)
{
return nxsem_wait_uninterruptible(sem);
}
static void emmc_givesem(FAR sem_t *sem)
static void emmc_givesem(sem_t *sem)
{
nxsem_post(sem);
}
@@ -508,7 +508,7 @@ static int emmc_switchcmd(uint8_t index, uint8_t val)
*
****************************************************************************/
static int emmc_interrupt(int irq, FAR void *context, FAR void *arg)
static int emmc_interrupt(int irq, void *context, void *arg)
{
uint32_t intr;
@@ -689,7 +689,7 @@ errout:
return ret;
}
static int cxd56_emmc_readsectors(FAR struct cxd56_emmc_state_s *priv,
static int cxd56_emmc_readsectors(struct cxd56_emmc_state_s *priv,
void *buf,
size_t start_sector,
unsigned int nsectors)
@@ -753,7 +753,7 @@ finish:
}
#if !defined(CONFIG_MMCSD_READONLY)
static int cxd56_emmc_writesectors(FAR struct cxd56_emmc_state_s *priv,
static int cxd56_emmc_writesectors(struct cxd56_emmc_state_s *priv,
const void *buf, blkcnt_t start_sector,
unsigned int nsectors)
{
@@ -829,13 +829,13 @@ finish:
}
#endif
static int cxd56_emmc_open(FAR struct inode *inode)
static int cxd56_emmc_open(struct inode *inode)
{
FAR struct cxd56_emmc_state_s *priv;
struct cxd56_emmc_state_s *priv;
int ret;
DEBUGASSERT(inode && inode->i_private);
priv = (FAR struct cxd56_emmc_state_s *)inode->i_private;
priv = (struct cxd56_emmc_state_s *)inode->i_private;
/* Just increment the reference count on the driver */
@@ -850,13 +850,13 @@ static int cxd56_emmc_open(FAR struct inode *inode)
return OK;
}
static int cxd56_emmc_close(FAR struct inode *inode)
static int cxd56_emmc_close(struct inode *inode)
{
FAR struct cxd56_emmc_state_s *priv;
struct cxd56_emmc_state_s *priv;
int ret;
DEBUGASSERT(inode && inode->i_private);
priv = (FAR struct cxd56_emmc_state_s *)inode->i_private;
priv = (struct cxd56_emmc_state_s *)inode->i_private;
/* Decrement the reference count on the block driver */
@@ -872,15 +872,15 @@ static int cxd56_emmc_close(FAR struct inode *inode)
return OK;
}
static ssize_t cxd56_emmc_read(FAR struct inode *inode,
static ssize_t cxd56_emmc_read(struct inode *inode,
unsigned char *buffer, blkcnt_t start_sector,
unsigned int nsectors)
{
FAR struct cxd56_emmc_state_s *priv;
struct cxd56_emmc_state_s *priv;
int ret;
DEBUGASSERT(inode && inode->i_private);
priv = (FAR struct cxd56_emmc_state_s *)inode->i_private;
priv = (struct cxd56_emmc_state_s *)inode->i_private;
finfo("Read sector %" PRIu32 " (%u sectors) to %p\n",
start_sector, nsectors, buffer);
@@ -896,16 +896,16 @@ static ssize_t cxd56_emmc_read(FAR struct inode *inode,
}
#if !defined(CONFIG_MMCSD_READONLY)
static ssize_t cxd56_emmc_write(FAR struct inode *inode,
static ssize_t cxd56_emmc_write(struct inode *inode,
const unsigned char *buffer,
blkcnt_t start_sector,
unsigned int nsectors)
{
FAR struct cxd56_emmc_state_s *priv;
struct cxd56_emmc_state_s *priv;
int ret;
DEBUGASSERT(inode && inode->i_private);
priv = (FAR struct cxd56_emmc_state_s *)inode->i_private;
priv = (struct cxd56_emmc_state_s *)inode->i_private;
finfo("Write %p to sector %" PRIu32 " (%u sectors)\n", buffer,
start_sector, nsectors);
@@ -921,13 +921,13 @@ static ssize_t cxd56_emmc_write(FAR struct inode *inode,
}
#endif
static int cxd56_emmc_geometry(FAR struct inode *inode,
static int cxd56_emmc_geometry(struct inode *inode,
struct geometry *geometry)
{
FAR struct cxd56_emmc_state_s *priv;
struct cxd56_emmc_state_s *priv;
DEBUGASSERT(inode && inode->i_private);
priv = (FAR struct cxd56_emmc_state_s *)inode->i_private;
priv = (struct cxd56_emmc_state_s *)inode->i_private;
geometry->geo_available = true;
geometry->geo_mediachanged = false;
@@ -944,9 +944,9 @@ static int cxd56_emmc_geometry(FAR struct inode *inode,
int cxd56_emmcinitialize(void)
{
FAR struct cxd56_emmc_state_s *priv;
FAR uint8_t *buf;
FAR struct emmc_dma_desc_s *descs;
struct cxd56_emmc_state_s *priv;
uint8_t *buf;
struct emmc_dma_desc_s *descs;
int ret;
priv = &g_emmcdev;
@@ -962,7 +962,7 @@ int cxd56_emmcinitialize(void)
return -EIO;
}
buf = (FAR uint8_t *)kmm_malloc(SECTOR_SIZE);
buf = (uint8_t *)kmm_malloc(SECTOR_SIZE);
if (buf)
{
putreg32(SECTOR_SIZE, EMMC_BYTCNT);
@@ -976,7 +976,7 @@ int cxd56_emmcinitialize(void)
return -EIO;
}
priv->total_sectors = *(FAR uint32_t *)&buf[EXTCSD_SEC_COUNT];
priv->total_sectors = *(uint32_t *)&buf[EXTCSD_SEC_COUNT];
kmm_free(descs);
}
+1 -1
View File
@@ -160,7 +160,7 @@ static int cxd56_sendmsg(int cpuid, int protoid, int msgtype, uint16_t pdata,
static int cxd56_farapidonehandler(int cpuid, int protoid,
uint32_t pdata, uint32_t data,
FAR void *userdata)
void *userdata)
{
/* Receive event flag message as Far API done.
* We need only far API done event.
+22 -22
View File
@@ -62,11 +62,11 @@ struct bat_gauge_dev_s
* Private Function Prototypes
****************************************************************************/
static ssize_t gauge_read(FAR struct file *filep, FAR char *buffer,
static ssize_t gauge_read(struct file *filep, char *buffer,
size_t buflen);
static ssize_t gauge_write(FAR struct file *filep,
FAR const char *buffer, size_t buflen);
static int gauge_ioctl(FAR struct file *filep, int cmd,
static ssize_t gauge_write(struct file *filep,
const char *buffer, size_t buflen);
static int gauge_ioctl(struct file *filep, int cmd,
unsigned long arg);
/****************************************************************************
@@ -97,7 +97,7 @@ static struct bat_gauge_dev_s g_gaugedev;
* Name: gauge_get_status
****************************************************************************/
static int gauge_get_status(FAR enum battery_status_e *status)
static int gauge_get_status(enum battery_status_e *status)
{
uint8_t state;
int ret;
@@ -150,7 +150,7 @@ static int gauge_get_status(FAR enum battery_status_e *status)
* Name: gauge_get_vol
****************************************************************************/
static int gauge_get_vol(FAR b16_t *voltage)
static int gauge_get_vol(b16_t *voltage)
{
struct pmic_gauge_s gauge;
int ret;
@@ -176,7 +176,7 @@ static int gauge_get_vol(FAR b16_t *voltage)
* Name: gauge_get_capacity
****************************************************************************/
static int gauge_get_capacity(FAR b16_t *capacity)
static int gauge_get_capacity(b16_t *capacity)
{
b16_t vol;
int lower;
@@ -234,7 +234,7 @@ static int gauge_get_capacity(FAR b16_t *capacity)
* Name: gauge_online
****************************************************************************/
static int gauge_online(FAR bool *online)
static int gauge_online(bool *online)
{
if (online == NULL)
{
@@ -249,7 +249,7 @@ static int gauge_online(FAR bool *online)
* Name: gauge_read
****************************************************************************/
static ssize_t gauge_read(FAR struct file *filep, FAR char *buffer,
static ssize_t gauge_read(struct file *filep, char *buffer,
size_t buflen)
{
/* Return nothing read */
@@ -261,8 +261,8 @@ static ssize_t gauge_read(FAR struct file *filep, FAR char *buffer,
* Name: gauge_write
****************************************************************************/
static ssize_t gauge_write(FAR struct file *filep,
FAR const char *buffer, size_t buflen)
static ssize_t gauge_write(struct file *filep,
const char *buffer, size_t buflen)
{
/* Return nothing written */
@@ -273,10 +273,10 @@ static ssize_t gauge_write(FAR struct file *filep,
* Name: gauge_ioctl
****************************************************************************/
static int gauge_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
static int gauge_ioctl(struct file *filep, int cmd, unsigned long arg)
{
FAR struct inode *inode = filep->f_inode;
FAR struct bat_gauge_dev_s *priv = inode->i_private;
struct inode *inode = filep->f_inode;
struct bat_gauge_dev_s *priv = inode->i_private;
int ret = -ENOTTY;
nxsem_wait_uninterruptible(&priv->batsem);
@@ -285,29 +285,29 @@ static int gauge_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
case BATIOC_STATE:
{
FAR enum battery_status_e *status =
(FAR enum battery_status_e *)(uintptr_t)arg;
enum battery_status_e *status =
(enum battery_status_e *)(uintptr_t)arg;
ret = gauge_get_status(status);
}
break;
case BATIOC_VOLTAGE:
{
FAR b16_t *voltage = (FAR b16_t *)(uintptr_t)arg;
b16_t *voltage = (b16_t *)(uintptr_t)arg;
ret = gauge_get_vol(voltage);
}
break;
case BATIOC_CAPACITY:
{
FAR b16_t *capacity = (FAR b16_t *)(uintptr_t)arg;
b16_t *capacity = (b16_t *)(uintptr_t)arg;
ret = gauge_get_capacity(capacity);
}
break;
case BATIOC_ONLINE:
{
FAR bool *online = (FAR bool *)(uintptr_t)arg;
bool *online = (bool *)(uintptr_t)arg;
ret = gauge_online(online);
}
break;
@@ -340,9 +340,9 @@ static int gauge_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
*
****************************************************************************/
int cxd56_gauge_initialize(FAR const char *devpath)
int cxd56_gauge_initialize(const char *devpath)
{
FAR struct bat_gauge_dev_s *priv = &g_gaugedev;
struct bat_gauge_dev_s *priv = &g_gaugedev;
int ret;
/* Initialize the CXD5247 device structure */
@@ -375,7 +375,7 @@ int cxd56_gauge_initialize(FAR const char *devpath)
*
****************************************************************************/
int cxd56_gauge_uninitialize(FAR const char *devpath)
int cxd56_gauge_uninitialize(const char *devpath)
{
unregister_driver(devpath);
return OK;
+2 -2
View File
@@ -23,7 +23,7 @@
/* initialize function */
int cxd56_gauge_initialize(FAR const char *devpath);
int cxd56_gauge_uninitialize(FAR const char *devpath);
int cxd56_gauge_initialize(const char *devpath);
int cxd56_gauge_uninitialize(const char *devpath);
#endif /* __ARCH_ARM_SRC_CXD56XX_CXD56_GAUGE_H */
+11 -11
View File
@@ -46,14 +46,14 @@
* Private Function Prototypes
****************************************************************************/
static ssize_t ge2d_read(FAR struct file *filep, FAR char *buffer,
static ssize_t ge2d_read(struct file *filep, char *buffer,
size_t len);
static ssize_t ge2d_write(FAR struct file *filep, FAR const char *buffer,
static ssize_t ge2d_write(struct file *filep, const char *buffer,
size_t len);
static int ge2d_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
static int ge2d_ioctl(struct file *filep, int cmd, unsigned long arg);
static int ge2d_semtake(sem_t *id);
static void ge2d_semgive(sem_t *id);
static int ge2d_irqhandler(int irq, FAR void *context, FAR void *arg);
static int ge2d_irqhandler(int irq, void *context, void *arg);
/****************************************************************************
* Private Data
@@ -95,8 +95,8 @@ static void ge2d_semgive(sem_t *id)
* Name: ge2d_read
****************************************************************************/
static ssize_t ge2d_read(FAR struct file *filep,
FAR char *buffer,
static ssize_t ge2d_read(struct file *filep,
char *buffer,
size_t len)
{
return 0;
@@ -106,7 +106,7 @@ static ssize_t ge2d_read(FAR struct file *filep,
* Name: ge2d_write
****************************************************************************/
static ssize_t ge2d_write(FAR struct file *filep, FAR const char *buffer,
static ssize_t ge2d_write(struct file *filep, const char *buffer,
size_t len)
{
uint32_t bits;
@@ -157,7 +157,7 @@ static ssize_t ge2d_write(FAR struct file *filep, FAR const char *buffer,
* Name: ge2d_ioctl
****************************************************************************/
static int ge2d_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
static int ge2d_ioctl(struct file *filep, int cmd, unsigned long arg)
{
int ret = -ENOTTY;
@@ -180,7 +180,7 @@ static int ge2d_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: ge2d_irqhandler
****************************************************************************/
static int ge2d_irqhandler(int irq, FAR void *context, FAR void *arg)
static int ge2d_irqhandler(int irq, void *context, void *arg)
{
uint32_t stat;
@@ -202,7 +202,7 @@ static int ge2d_irqhandler(int irq, FAR void *context, FAR void *arg)
* Name: cxd56_ge2dinitialize
****************************************************************************/
int cxd56_ge2dinitialize(FAR const char *devname)
int cxd56_ge2dinitialize(const char *devname)
{
int ret;
@@ -232,7 +232,7 @@ int cxd56_ge2dinitialize(FAR const char *devname)
* Name: cxd56_ge2duninitialize
****************************************************************************/
void cxd56_ge2duninitialize(FAR const char *devname)
void cxd56_ge2duninitialize(const char *devname)
{
up_disable_irq(CXD56_IRQ_GE2D);
irq_detach(CXD56_IRQ_GE2D);
+39 -39
View File
@@ -58,8 +58,8 @@
struct cxd56_geofence_dev_s
{
sem_t devsem;
FAR struct pollfd *fds[CONFIG_GEOFENCE_NPOLLWAITERS];
sem_t devsem;
struct pollfd *fds[CONFIG_GEOFENCE_NPOLLWAITERS];
};
/****************************************************************************
@@ -68,14 +68,14 @@ struct cxd56_geofence_dev_s
/* file operation functions */
static ssize_t cxd56_geofence_read(FAR struct file *filep,
FAR char *buffer,
static ssize_t cxd56_geofence_read(struct file *filep,
char *buffer,
size_t len);
static int cxd56_geofence_ioctl(FAR struct file *filep,
static int cxd56_geofence_ioctl(struct file *filep,
int cmd,
unsigned long arg);
static int cxd56_geofence_poll(FAR struct file *filep,
FAR struct pollfd *fds,
static int cxd56_geofence_poll(struct file *filep,
struct pollfd *fds,
bool setup);
/* ioctl command functions */
@@ -113,7 +113,7 @@ static const struct file_operations g_geofencefops =
/* ioctl command list */
FAR static int (*g_cmdlist[CXD56_GEOFENCE_IOCTL_MAX])(unsigned long) =
static int (*g_cmdlist[CXD56_GEOFENCE_IOCTL_MAX])(unsigned long) =
{
NULL, /* CXD56_GEOFENCE_IOCTL_INVAL = 0 */
cxd56_geofence_start,
@@ -191,15 +191,15 @@ static int cxd56_geofence_stop(unsigned long arg)
static int cxd56_geofence_add_region(unsigned long arg)
{
int ret;
FAR struct cxd56_geofence_region_s *reg_data;
int ret;
struct cxd56_geofence_region_s *reg_data;
if (!arg)
{
return -EINVAL;
}
reg_data = (FAR struct cxd56_geofence_region_s *)arg;
reg_data = (struct cxd56_geofence_region_s *)arg;
ret = fw_gd_geoaddregion(reg_data->id,
reg_data->latitude,
@@ -226,15 +226,15 @@ static int cxd56_geofence_add_region(unsigned long arg)
static int cxd56_geofence_modify_region(unsigned long arg)
{
int ret;
FAR struct cxd56_geofence_region_s *reg_data;
int ret;
struct cxd56_geofence_region_s *reg_data;
if (!arg)
{
return -EINVAL;
}
reg_data = (FAR struct cxd56_geofence_region_s *)arg;
reg_data = (struct cxd56_geofence_region_s *)arg;
ret = fw_gd_geomodifyregion(reg_data->id, reg_data->latitude,
reg_data->longitude, reg_data->radius);
@@ -259,8 +259,8 @@ static int cxd56_geofence_modify_region(unsigned long arg)
static int cxd56_geofence_delete_region(unsigned long arg)
{
int ret;
FAR uint8_t id;
int ret;
uint8_t id;
if (UINT8_MAX < arg)
{
@@ -314,15 +314,15 @@ static int cxd56_geofence_delete_all_region(unsigned long arg)
static int cxd56_geofence_get_region_data(unsigned long arg)
{
int ret;
FAR struct cxd56_geofence_region_s *reg_data;
int ret;
struct cxd56_geofence_region_s *reg_data;
if (!arg)
{
return -EINVAL;
}
reg_data = (FAR struct cxd56_geofence_region_s *)arg;
reg_data = (struct cxd56_geofence_region_s *)arg;
ret = fw_gd_geogetregiondata(reg_data->id, &reg_data->latitude,
&reg_data->longitude, &reg_data->radius);
@@ -399,14 +399,14 @@ static int cxd56_geofence_get_all_status(unsigned long arg)
static int cxd56_geofence_set_mode(unsigned long arg)
{
int ret;
FAR struct cxd56_geofence_mode_s *mode;
struct cxd56_geofence_mode_s *mode;
if (!arg)
{
return -EINVAL;
}
mode = (FAR struct cxd56_geofence_mode_s *)arg;
mode = (struct cxd56_geofence_mode_s *)arg;
ret = fw_gd_geosetopmode(mode->deadzone, mode->dwell_detecttime);
@@ -429,10 +429,10 @@ static int cxd56_geofence_set_mode(unsigned long arg)
*
****************************************************************************/
static void cxd56_geofence_sighandler(uint32_t data, FAR void *userdata)
static void cxd56_geofence_sighandler(uint32_t data, void *userdata)
{
FAR struct cxd56_geofence_dev_s *priv =
(FAR struct cxd56_geofence_dev_s *)userdata;
struct cxd56_geofence_dev_s *priv =
(struct cxd56_geofence_dev_s *)userdata;
int i;
int ret;
@@ -469,7 +469,7 @@ static void cxd56_geofence_sighandler(uint32_t data, FAR void *userdata)
*
****************************************************************************/
static int cxd56_geofence_initialize(FAR struct cxd56_geofence_dev_s *dev)
static int cxd56_geofence_initialize(struct cxd56_geofence_dev_s *dev)
{
int32_t ret = 0;
@@ -492,7 +492,7 @@ static int cxd56_geofence_initialize(FAR struct cxd56_geofence_dev_s *dev)
*
****************************************************************************/
static ssize_t cxd56_geofence_read(FAR struct file *filep, FAR char *buffer,
static ssize_t cxd56_geofence_read(struct file *filep, char *buffer,
size_t len)
{
int32_t ret = 0;
@@ -535,7 +535,7 @@ static ssize_t cxd56_geofence_read(FAR struct file *filep, FAR char *buffer,
*
****************************************************************************/
static int cxd56_geofence_ioctl(FAR struct file *filep, int cmd,
static int cxd56_geofence_ioctl(struct file *filep, int cmd,
unsigned long arg)
{
if (cmd <= CXD56_GEOFENCE_IOCTL_INVAL || cmd >= CXD56_GEOFENCE_IOCTL_MAX)
@@ -562,17 +562,17 @@ static int cxd56_geofence_ioctl(FAR struct file *filep, int cmd,
*
****************************************************************************/
static int cxd56_geofence_poll(FAR struct file *filep,
FAR struct pollfd *fds,
static int cxd56_geofence_poll(struct file *filep,
struct pollfd *fds,
bool setup)
{
FAR struct inode * inode;
FAR struct cxd56_geofence_dev_s *priv;
int ret = OK;
int i;
struct inode * inode;
struct cxd56_geofence_dev_s *priv;
int ret = OK;
int i;
inode = filep->f_inode;
priv = (FAR struct cxd56_geofence_dev_s *)inode->i_private;
priv = (struct cxd56_geofence_dev_s *)inode->i_private;
ret = nxsem_wait(&priv->devsem);
if (ret < 0)
@@ -643,12 +643,12 @@ errout:
*
****************************************************************************/
static int cxd56_geofence_register(FAR const char *devpath)
static int cxd56_geofence_register(const char *devpath)
{
FAR struct cxd56_geofence_dev_s *priv;
int ret;
struct cxd56_geofence_dev_s *priv;
int ret;
priv = (FAR struct cxd56_geofence_dev_s *)kmm_malloc(
priv = (struct cxd56_geofence_dev_s *)kmm_malloc(
sizeof(struct cxd56_geofence_dev_s));
if (!priv)
{
@@ -708,7 +708,7 @@ static int cxd56_geofence_register(FAR const char *devpath)
*
****************************************************************************/
int cxd56_geofenceinitialize(FAR const char *devpath)
int cxd56_geofenceinitialize(const char *devpath)
{
int ret;
+1 -1
View File
@@ -60,7 +60,7 @@ extern "C"
*
****************************************************************************/
int cxd56_geofenceinitialize(FAR const char *devpath);
int cxd56_geofenceinitialize(const char *devpath);
#undef EXTERN
#if defined(__cplusplus)
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -82,7 +82,7 @@ extern "C"
*
****************************************************************************/
int cxd56_gnssinitialize(FAR const char *devpath);
int cxd56_gnssinitialize(const char *devpath);
#undef EXTERN
#if defined(__cplusplus)
+39 -39
View File
@@ -78,12 +78,12 @@ int fw_gd_selectsatellitesystem(uint32_t system);
* by CXD56_GNSS_B_SAT_XXX.
*/
int fw_gd_getsatellitesystem(FAR uint32_t *system);
int fw_gd_getsatellitesystem(uint32_t *system);
/* Set the rough receiver position */
int fw_gd_setreceiverpositionellipsoidal(FAR double *dlat, FAR double *dlon,
FAR double *dheight);
int fw_gd_setreceiverpositionellipsoidal(double *dlat, double *dlon,
double *dheight);
/* Set the rough receiver position as orgothonal */
@@ -95,7 +95,7 @@ int fw_gd_set1ppsoutput(uint32_t enable);
/* Get the current 1PPS output setting. */
int fw_gd_get1ppsoutput(FAR uint32_t *enable);
int fw_gd_get1ppsoutput(uint32_t *enable);
/* Set the receiver operation mode
* 1st argument 'mode' is a operation mode defined by CXD56_GNSS_OPMOD_XXX.
@@ -106,7 +106,7 @@ int fw_gd_setoperationmode(uint32_t mode, uint32_t cycle);
/* Get the receiver operation mode */
int fw_gd_getoperationmode(FAR uint32_t *mode, FAR uint32_t *cycle);
int fw_gd_getoperationmode(uint32_t *mode, uint32_t *cycle);
/* Set the TCXO offset */
@@ -114,14 +114,14 @@ int fw_gd_settcxooffset(int32_t offset);
/* Get the TCXO offset */
int fw_gd_gettcxooffset(FAR int32_t *offset);
int fw_gd_gettcxooffset(int32_t *offset);
/* Set the estimated current time of the receiver.
* 1st argument date & time are in UTC.
*/
int fw_gd_settime(FAR struct cxd56_gnss_date_s *date,
FAR struct cxd56_gnss_time_s *time);
int fw_gd_settime(struct cxd56_gnss_date_s *date,
struct cxd56_gnss_time_s *time);
/* Set the network time */
@@ -129,21 +129,21 @@ int fw_gd_setframetime(uint16_t sec, uint32_t fracsec);
/* Get the almanac data */
int fw_gd_getalmanac(uint32_t satellite, FAR uint32_t *almanac,
FAR uint32_t *almanacsize);
int fw_gd_getalmanac(uint32_t satellite, uint32_t *almanac,
uint32_t *almanacsize);
/* Set the almanac data */
int fw_gd_setalmanac(uint32_t satellite, FAR uint32_t *almanac);
int fw_gd_setalmanac(uint32_t satellite, uint32_t *almanac);
/* Get the Ephemeris data */
int fw_gd_getephemeris(uint32_t satellite, FAR uint32_t *ephemeris,
FAR uint32_t *ephemerissize);
int fw_gd_getephemeris(uint32_t satellite, uint32_t *ephemeris,
uint32_t *ephemerissize);
/* Set the Ephemeris data */
int fw_gd_setephemeris(uint32_t satellite, FAR uint32_t *ephemeris);
int fw_gd_setephemeris(uint32_t satellite, uint32_t *ephemeris);
/* Select to use or not use the initial position calculation supporting
* information of the QZSS L1-SAIF.
@@ -155,7 +155,7 @@ int fw_gd_setqzssposassist(uint32_t enable);
* information of the QZSS L1-SAIF.
*/
int fw_gd_getqzssposassist(FAR uint32_t *enable);
int fw_gd_getqzssposassist(uint32_t *enable);
/* Set IMES bitrates. */
@@ -163,7 +163,7 @@ int fw_gd_setimesbitrate(uint32_t bitrate);
/* Get IMES bitrates. */
int fw_gd_getimesbitrate(FAR uint32_t *bitrate);
int fw_gd_getimesbitrate(uint32_t *bitrate);
/* Set IMES center frequency offset. */
@@ -176,7 +176,7 @@ int fw_gd_setimespreamble(uint32_t preamble);
/* Start GPS test */
void fw_gd_startgpstest(uint32_t satellite, uint32_t reserve1,
uint32_t reserve2, uint32_t reserve3);
uint32_t reserve2, uint32_t reserve3);
/* Stop GPS test */
@@ -184,13 +184,13 @@ int fw_gd_stopgpstest(void);
/* Get GPS test result */
int fw_gd_getgpstestresult(FAR float *cn, FAR float *doppler);
int fw_gd_getgpstestresult(float *cn, float *doppler);
/* Control Spectrum output */
int fw_gd_spectrumcontrol(unsigned long time, unsigned int enable,
unsigned char monipoint1, unsigned char step1,
unsigned char monipoint2, unsigned char step2);
unsigned char monipoint1, unsigned char step1,
unsigned char monipoint2, unsigned char step2);
/* Save the backup data to a Flash memory. */
@@ -202,7 +202,7 @@ int fw_gd_cepcheckassistdata(void);
/* CEP Get Age Data */
int fw_gd_cepgetagedata(FAR float *age, FAR float *cepi);
int fw_gd_cepgetagedata(float *age, float *cepi);
/* CEP Reset Assist Data init flag & valid flag */
@@ -210,18 +210,18 @@ int fw_gd_cepinitassistdata(void);
/* AGPS Set tau */
int fw_gd_settaugps(FAR double *tau);
int fw_gd_settaugps(double *tau);
/* AGPS Set Acquist */
int fw_gd_setacquist(FAR uint8_t *pacquistdata, uint16_t acquistsize);
int fw_gd_setacquist(uint8_t *pacquistdata, uint16_t acquistsize);
/* Set the estimated current time of the receiver.
* 1st argument date & time are in GPS time.
*/
int fw_gd_settimegps(FAR struct cxd56_gnss_date_s *date,
FAR struct cxd56_gnss_time_s *time);
int fw_gd_settimegps(struct cxd56_gnss_date_s *date,
struct cxd56_gnss_time_s *time);
/* Clear Receiver Information */
@@ -229,21 +229,21 @@ int fw_gd_clearreceiverinfo(uint32_t type);
/* AGPS Set Tow Assist */
int fw_gd_settowassist(FAR uint8_t *passistdata, uint16_t datasize);
int fw_gd_settowassist(uint8_t *passistdata, uint16_t datasize);
/* AGPS Set UTC Model */
int fw_gd_setutcmodel(FAR uint8_t *pmodeldata, uint16_t datasize);
int fw_gd_setutcmodel(uint8_t *pmodeldata, uint16_t datasize);
/* Read GNSS data to specified buffer */
int fw_gd_readbuffer(uint8_t type, int32_t offset, FAR void *buf,
uint32_t length);
int fw_gd_readbuffer(uint8_t type, int32_t offset, void *buf,
uint32_t length);
/* Write GNSS data from specified buffer */
int fw_gd_writebuffer(uint8_t type, int32_t offset, FAR void *buf,
uint32_t length);
int fw_gd_writebuffer(uint8_t type, int32_t offset, void *buf,
uint32_t length);
/* Set notify mask, this mask flag is cleared when notified(poll/signal) */
@@ -267,8 +267,8 @@ int fw_gd_geodeleteallregion(void);
/* Geofence Region check */
int fw_gd_geogetregiondata(uint8_t id, FAR long *lat, FAR long *lon,
FAR uint16_t *rad);
int fw_gd_geogetregiondata(uint8_t id, long *lat, long *lon,
uint16_t *rad);
/* Geofence Get Used Region ID */
@@ -304,11 +304,11 @@ int fw_gd_pvtlogdeletelog(void);
/* Pvtlog Get Log status */
int fw_gd_pvtloggetlogstatus(FAR struct cxd56_gnss_status_s *plogstatus);
int fw_gd_pvtloggetlogstatus(struct cxd56_gnss_status_s *plogstatus);
/* Start outputting carrier phase info. */
int fw_gd_rtkstart(FAR struct cxd56_rtk_setting_s *pparam);
int fw_gd_rtkstart(struct cxd56_rtk_setting_s *pparam);
/* Stop outputting carrier phase info. */
@@ -323,7 +323,7 @@ int fw_gd_rtksetoutputinterval(int interval);
/* Get output interval of carrier phase info. [ms] */
int fw_gd_rtkgetoutputinterval(FAR int *interval);
int fw_gd_rtkgetoutputinterval(int *interval);
/* Set GNSS of outputting carrier phase info. */
@@ -331,7 +331,7 @@ int fw_gd_rtksetgnss(uint32_t gnss);
/* Get GNSS of outputting carrier phase info. */
int fw_gd_rtkgetgnss(FAR uint32_t *pgnss);
int fw_gd_rtkgetgnss(uint32_t *pgnss);
/* Set enable/disable GD to notify updating ephemeris */
@@ -339,7 +339,7 @@ int fw_gd_rtksetephnotify(int enable);
/* Get enable/disable GD to notify updating ephemeris */
int fw_gd_rtkgetephnotify(FAR int *enable);
int fw_gd_rtkgetephnotify(int *enable);
/* Set the Ephemeris data Ephemeris data size is variable. */
@@ -348,7 +348,7 @@ int fw_gd_setvarephemeris(uint32_t *ephemeris, uint32_t ephemerissize);
/* Get the Ephemeris data Ephemeris data size is variable. */
int fw_gd_getvarephemeris(uint32_t satellite, uint32_t *ephemeris,
uint32_t ephemerissize);
uint32_t ephemerissize);
/* Set usecase mode */
+2 -2
View File
@@ -332,7 +332,7 @@ static bool enabled_irq(int irq)
return ((val & (1 << (irq - CXD56_IRQ_EXTINT))) != 0);
}
static int gpioint_handler(int irq, FAR void *context, FAR void *arg)
static int gpioint_handler(int irq, void *context, void *arg)
{
uint32_t val;
uint32_t shift;
@@ -404,7 +404,7 @@ static int gpioint_handler(int irq, FAR void *context, FAR void *arg)
****************************************************************************/
int cxd56_gpioint_config(uint32_t pin, uint32_t gpiocfg, xcpt_t isr,
FAR void *arg)
void *arg)
{
int slot;
int irq;
+1 -1
View File
@@ -129,7 +129,7 @@ extern "C"
****************************************************************************/
int cxd56_gpioint_config(uint32_t pin, uint32_t gpiocfg, xcpt_t isr,
FAR void *arg);
void *arg);
/****************************************************************************
* Name: cxd56_gpioint_irq
+32 -32
View File
@@ -109,19 +109,19 @@ struct cxd56_hifdrv_s
/* Character driver methods */
static int hif_open(FAR struct file *filep);
static int hif_close(FAR struct file *filep);
static off_t hif_seek(FAR struct file *filep, off_t offset,
static int hif_open(struct file *filep);
static int hif_close(struct file *filep);
static off_t hif_seek(struct file *filep, off_t offset,
int whence);
static ssize_t hif_read(FAR struct file *filep, FAR char *buffer,
static ssize_t hif_read(struct file *filep, char *buffer,
size_t len);
static ssize_t hif_write(FAR struct file *filep,
FAR const char *buffer, size_t len);
static int hif_ioctl(FAR struct file *filep, int cmd,
static ssize_t hif_write(struct file *filep,
const char *buffer, size_t len);
static int hif_ioctl(struct file *filep, int cmd,
unsigned long arg);
static int hif_poll(FAR struct file *filep, FAR struct pollfd *fds,
static int hif_poll(struct file *filep, struct pollfd *fds,
bool setup);
static int hif_unlink(FAR struct inode *inode);
static int hif_unlink(struct inode *inode);
/****************************************************************************
* Private Data
@@ -187,15 +187,15 @@ static int hif_sendmsg(uint8_t id, void *arg)
return ret;
}
static int hif_open(FAR struct file *filep)
static int hif_open(struct file *filep)
{
FAR struct inode *inode;
FAR struct cxd56_hifdev_s *priv;
struct inode *inode;
struct cxd56_hifdev_s *priv;
DEBUGASSERT(filep && filep->f_inode);
inode = filep->f_inode;
priv = (FAR struct cxd56_hifdev_s *)inode->i_private;
priv = (struct cxd56_hifdev_s *)inode->i_private;
DEBUGASSERT(priv);
/* Check parameters */
@@ -243,15 +243,15 @@ static int hif_open(FAR struct file *filep)
return OK;
}
static int hif_close(FAR struct file *filep)
static int hif_close(struct file *filep)
{
FAR struct inode *inode;
FAR struct cxd56_hifdev_s *priv;
struct inode *inode;
struct cxd56_hifdev_s *priv;
DEBUGASSERT(filep && filep->f_inode);
inode = filep->f_inode;
priv = (FAR struct cxd56_hifdev_s *)inode->i_private;
priv = (struct cxd56_hifdev_s *)inode->i_private;
DEBUGASSERT(priv);
/* Decrement reference counter */
@@ -266,21 +266,21 @@ static int hif_close(FAR struct file *filep)
return OK;
}
static off_t hif_seek(FAR struct file *filep, off_t offset, int whence)
static off_t hif_seek(struct file *filep, off_t offset, int whence)
{
return OK;
}
static ssize_t hif_read(FAR struct file *filep, FAR char *buffer, size_t len)
static ssize_t hif_read(struct file *filep, char *buffer, size_t len)
{
FAR struct inode *inode;
FAR struct cxd56_hifdev_s *priv;
struct inode *inode;
struct cxd56_hifdev_s *priv;
int ret;
DEBUGASSERT(filep && filep->f_inode);
inode = filep->f_inode;
priv = (FAR struct cxd56_hifdev_s *)inode->i_private;
priv = (struct cxd56_hifdev_s *)inode->i_private;
DEBUGASSERT(priv);
/* Check parameters */
@@ -302,17 +302,17 @@ static ssize_t hif_read(FAR struct file *filep, FAR char *buffer, size_t len)
return ret;
}
static ssize_t hif_write(FAR struct file *filep,
FAR const char *buffer, size_t len)
static ssize_t hif_write(struct file *filep,
const char *buffer, size_t len)
{
FAR struct inode *inode;
FAR struct cxd56_hifdev_s *priv;
struct inode *inode;
struct cxd56_hifdev_s *priv;
int ret;
DEBUGASSERT(filep && filep->f_inode);
inode = filep->f_inode;
priv = (FAR struct cxd56_hifdev_s *)inode->i_private;
priv = (struct cxd56_hifdev_s *)inode->i_private;
DEBUGASSERT(priv);
/* Check parameters */
@@ -334,19 +334,19 @@ static ssize_t hif_write(FAR struct file *filep,
return ret;
}
static int hif_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
static int hif_ioctl(struct file *filep, int cmd, unsigned long arg)
{
return OK;
}
static int hif_poll(FAR struct file *filep,
FAR struct pollfd *fds, bool setup)
static int hif_poll(struct file *filep,
struct pollfd *fds, bool setup)
{
return OK;
}
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
static int hif_unlink(FAR struct inode *inode)
static int hif_unlink(struct inode *inode)
{
return OK;
}
@@ -354,7 +354,7 @@ static int hif_unlink(FAR struct inode *inode)
static int hif_rxhandler(int cpuid, int protoid,
uint32_t pdata, uint32_t data,
FAR void *userdata)
void *userdata)
{
struct cxd56_hifdrv_s *drv = &g_hifdrv;
+19 -19
View File
@@ -129,8 +129,8 @@ static struct cxd56_i2cdev_s g_i2c2dev =
* Private Functions
****************************************************************************/
static inline int i2c_takesem(FAR sem_t *sem);
static inline int i2c_givesem(FAR sem_t *sem);
static inline int i2c_takesem(sem_t *sem);
static inline int i2c_givesem(sem_t *sem);
static inline uint32_t i2c_reg_read(struct cxd56_i2cdev_s *priv,
uint32_t offset);
@@ -144,25 +144,25 @@ static inline void i2c_reg_rmw(struct cxd56_i2cdev_s *dev,
static int cxd56_i2c_disable(struct cxd56_i2cdev_s *priv);
static void cxd56_i2c_enable(struct cxd56_i2cdev_s *priv);
static int cxd56_i2c_interrupt(int irq, FAR void *context, FAR void *arg);
static int cxd56_i2c_interrupt(int irq, void *context, void *arg);
static void cxd56_i2c_timeout(wdparm_t arg);
static void cxd56_i2c_setfrequency(struct cxd56_i2cdev_s *priv,
uint32_t frequency);
static int cxd56_i2c_transfer(FAR struct i2c_master_s *dev,
FAR struct i2c_msg_s *msgs, int count);
static int cxd56_i2c_transfer(struct i2c_master_s *dev,
struct i2c_msg_s *msgs, int count);
#ifdef CONFIG_I2C_RESET
static int cxd56_i2c_reset(FAR struct i2c_master_s *dev);
static int cxd56_i2c_reset(struct i2c_master_s *dev);
#endif
#if defined(CONFIG_CXD56_I2C0_SCUSEQ) || defined(CONFIG_CXD56_I2C1_SCUSEQ)
static int cxd56_i2c_transfer_scu(FAR struct i2c_master_s *dev,
FAR struct i2c_msg_s *msgs, int count);
static int cxd56_i2c_transfer_scu(struct i2c_master_s *dev,
struct i2c_msg_s *msgs, int count);
#endif
/****************************************************************************
* Name: i2c_takesem
****************************************************************************/
static inline int i2c_takesem(FAR sem_t *sem)
static inline int i2c_takesem(sem_t *sem)
{
return nxsem_wait_uninterruptible(sem);
}
@@ -171,7 +171,7 @@ static inline int i2c_takesem(FAR sem_t *sem)
* Name: i2c_givesem
****************************************************************************/
static inline int i2c_givesem(FAR sem_t *sem)
static inline int i2c_givesem(sem_t *sem)
{
return nxsem_post(sem);
}
@@ -413,9 +413,9 @@ static void cxd56_i2c_drainrxfifo(struct cxd56_i2cdev_s *priv)
*
****************************************************************************/
static int cxd56_i2c_interrupt(int irq, FAR void *context, FAR void *arg)
static int cxd56_i2c_interrupt(int irq, void *context, void *arg)
{
FAR struct cxd56_i2cdev_s *priv = (FAR struct cxd56_i2cdev_s *)arg;
struct cxd56_i2cdev_s *priv = (struct cxd56_i2cdev_s *)arg;
uint32_t state;
int ret;
@@ -604,8 +604,8 @@ static int cxd56_i2c_send(struct cxd56_i2cdev_s *priv, int last)
* currently guaranteed.
****************************************************************************/
static int cxd56_i2c_transfer(FAR struct i2c_master_s *dev,
FAR struct i2c_msg_s *msgs, int count)
static int cxd56_i2c_transfer(struct i2c_master_s *dev,
struct i2c_msg_s *msgs, int count)
{
struct cxd56_i2cdev_s *priv = (struct cxd56_i2cdev_s *)dev;
int i;
@@ -716,7 +716,7 @@ static int cxd56_i2c_transfer(FAR struct i2c_master_s *dev,
****************************************************************************/
#ifdef CONFIG_I2C_RESET
static int cxd56_i2c_reset(FAR struct i2c_master_s *dev)
static int cxd56_i2c_reset(struct i2c_master_s *dev)
{
return OK;
}
@@ -821,10 +821,10 @@ static int cxd56_i2c_scusend(int port, int addr,
return ret;
}
static int cxd56_i2c_transfer_scu(FAR struct i2c_master_s *dev,
FAR struct i2c_msg_s *msgs, int count)
static int cxd56_i2c_transfer_scu(struct i2c_master_s *dev,
struct i2c_msg_s *msgs, int count)
{
FAR struct cxd56_i2cdev_s *priv = (FAR struct cxd56_i2cdev_s *)dev;
struct cxd56_i2cdev_s *priv = (struct cxd56_i2cdev_s *)dev;
ssize_t len = 0;
uint8_t *buf = NULL;
uint8_t addr = msgs->addr;
@@ -1069,7 +1069,7 @@ struct i2c_master_s *cxd56_i2cbus_initialize(int port)
*
****************************************************************************/
int cxd56_i2cbus_uninitialize(FAR struct i2c_master_s *dev)
int cxd56_i2cbus_uninitialize(struct i2c_master_s *dev)
{
struct cxd56_i2cdev_s *priv = (struct cxd56_i2cdev_s *)dev;
+2 -2
View File
@@ -59,7 +59,7 @@ extern "C"
*
****************************************************************************/
FAR struct i2c_master_s *cxd56_i2cbus_initialize(int port);
struct i2c_master_s *cxd56_i2cbus_initialize(int port);
/****************************************************************************
* Name: cxd56_i2cbus_uninitialize
@@ -76,7 +76,7 @@ FAR struct i2c_master_s *cxd56_i2cbus_initialize(int port);
*
****************************************************************************/
int cxd56_i2cbus_uninitialize(FAR struct i2c_master_s *dev);
int cxd56_i2cbus_uninitialize(struct i2c_master_s *dev);
#undef EXTERN
#if defined(__cplusplus)
+10 -10
View File
@@ -47,15 +47,15 @@ struct cxd56_i2c_bitbang_dev_s
* Private Function Prototypes
****************************************************************************/
static void i2c_bb_initialize(FAR struct i2c_bitbang_lower_dev_s *lower);
static void i2c_bb_initialize(struct i2c_bitbang_lower_dev_s *lower);
static void i2c_bb_set_scl(FAR struct i2c_bitbang_lower_dev_s *lower,
static void i2c_bb_set_scl(struct i2c_bitbang_lower_dev_s *lower,
bool high);
static void i2c_bb_set_sda(FAR struct i2c_bitbang_lower_dev_s *lower,
static void i2c_bb_set_sda(struct i2c_bitbang_lower_dev_s *lower,
bool high);
static bool i2c_bb_get_scl(FAR struct i2c_bitbang_lower_dev_s *lower);
static bool i2c_bb_get_sda(FAR struct i2c_bitbang_lower_dev_s *lower);
static bool i2c_bb_get_scl(struct i2c_bitbang_lower_dev_s *lower);
static bool i2c_bb_get_sda(struct i2c_bitbang_lower_dev_s *lower);
/****************************************************************************
* Private Data
@@ -74,7 +74,7 @@ const static struct i2c_bitbang_lower_ops_s g_ops =
* Private Functions
****************************************************************************/
static void i2c_bb_initialize(FAR struct i2c_bitbang_lower_dev_s *lower)
static void i2c_bb_initialize(struct i2c_bitbang_lower_dev_s *lower)
{
struct cxd56_i2c_bitbang_dev_s *dev = lower->priv;
@@ -84,7 +84,7 @@ static void i2c_bb_initialize(FAR struct i2c_bitbang_lower_dev_s *lower)
board_gpio_config(dev->sda_pin, 0, true, true, PIN_PULLUP);
}
static void i2c_bb_set_scl(FAR struct i2c_bitbang_lower_dev_s *lower,
static void i2c_bb_set_scl(struct i2c_bitbang_lower_dev_s *lower,
bool high)
{
struct cxd56_i2c_bitbang_dev_s *dev = lower->priv;
@@ -96,7 +96,7 @@ static void i2c_bb_set_scl(FAR struct i2c_bitbang_lower_dev_s *lower,
board_gpio_write(dev->scl_pin, value);
}
static void i2c_bb_set_sda(FAR struct i2c_bitbang_lower_dev_s *lower,
static void i2c_bb_set_sda(struct i2c_bitbang_lower_dev_s *lower,
bool high)
{
struct cxd56_i2c_bitbang_dev_s *dev = lower->priv;
@@ -108,14 +108,14 @@ static void i2c_bb_set_sda(FAR struct i2c_bitbang_lower_dev_s *lower,
board_gpio_write(dev->sda_pin, value);
}
static bool i2c_bb_get_scl(FAR struct i2c_bitbang_lower_dev_s *lower)
static bool i2c_bb_get_scl(struct i2c_bitbang_lower_dev_s *lower)
{
struct cxd56_i2c_bitbang_dev_s *dev = lower->priv;
return board_gpio_read(dev->scl_pin);
}
static bool i2c_bb_get_sda(FAR struct i2c_bitbang_lower_dev_s *lower)
static bool i2c_bb_get_sda(struct i2c_bitbang_lower_dev_s *lower)
{
struct cxd56_i2c_bitbang_dev_s *dev = lower->priv;
+39 -39
View File
@@ -107,7 +107,7 @@ struct iccdev_s
cxd56_iccsighandler_t sighandler;
} u;
FAR void *userdata;
void *userdata;
sem_t rxwait;
struct wdog_s rxtimeout;
@@ -117,7 +117,7 @@ struct iccdev_s
int signo;
pid_t pid;
FAR void *sigdata;
void *sigdata;
struct sq_queue_s recvq;
struct sq_queue_s freelist;
@@ -129,9 +129,9 @@ struct iccdev_s
****************************************************************************/
static int icc_sighandler(int cpuid, int protoid, uint32_t pdata,
uint32_t data, FAR void *userdata);
uint32_t data, void *userdata);
static int icc_msghandler(int cpuid, int protoid, uint32_t pdata,
uint32_t data, FAR void *userdata);
uint32_t data, void *userdata);
static int icc_irqhandler(int cpuid, uint32_t word[2]);
/****************************************************************************
@@ -160,7 +160,7 @@ static void icc_semgive(sem_t *semid)
nxsem_post(semid);
}
static FAR struct iccdev_s *icc_getprotocol(int protoid)
static struct iccdev_s *icc_getprotocol(int protoid)
{
if (protoid < 0 || protoid >= NPROTOCOLS)
{
@@ -170,7 +170,7 @@ static FAR struct iccdev_s *icc_getprotocol(int protoid)
return g_protocol[protoid];
}
static FAR struct iccdev_s *icc_getcpu(int cpuid)
static struct iccdev_s *icc_getcpu(int cpuid)
{
if (cpuid < 0 || cpuid >= NCPUS)
{
@@ -182,8 +182,8 @@ static FAR struct iccdev_s *icc_getcpu(int cpuid)
static int icc_irqhandler(int cpuid, uint32_t word[2])
{
FAR struct iccdev_s *priv;
FAR struct iccreq_s *req;
struct iccdev_s *priv;
struct iccreq_s *req;
int protoid;
protoid = GET_PROTOCOLID(word);
@@ -222,7 +222,7 @@ static int icc_irqhandler(int cpuid, uint32_t word[2])
}
}
req = (FAR struct iccreq_s *)sq_remfirst(&priv->freelist);
req = (struct iccreq_s *)sq_remfirst(&priv->freelist);
if (!req)
{
iccerr("Receive buffer is full.\n");
@@ -232,7 +232,7 @@ static int icc_irqhandler(int cpuid, uint32_t word[2])
req->word[0] = word[0];
req->word[1] = word[1];
sq_addlast((FAR sq_entry_t *)req, &priv->recvq);
sq_addlast((sq_entry_t *)req, &priv->recvq);
icc_semgive(&priv->rxwait);
@@ -252,9 +252,9 @@ static int icc_irqhandler(int cpuid, uint32_t word[2])
}
static int icc_sighandler(int cpuid, int protoid, uint32_t pdata,
uint32_t data, FAR void *userdata)
uint32_t data, void *userdata)
{
FAR struct iccdev_s *priv = icc_getcpu(cpuid);
struct iccdev_s *priv = icc_getcpu(cpuid);
if (!priv)
{
@@ -282,7 +282,7 @@ static int icc_sighandler(int cpuid, int protoid, uint32_t pdata,
}
static int icc_msghandler(int cpuid, int protoid, uint32_t pdata,
uint32_t data, FAR void *userdata)
uint32_t data, void *userdata)
{
/* Do nothing. This handler used for reserve MSG protocol handler.
* This handler returns -1 to indicate not consumed the passed
@@ -294,13 +294,13 @@ static int icc_msghandler(int cpuid, int protoid, uint32_t pdata,
static void icc_rxtimeout(wdparm_t arg)
{
FAR struct iccdev_s *priv = (FAR struct iccdev_s *)arg;
struct iccdev_s *priv = (struct iccdev_s *)arg;
icc_semgive(&priv->rxwait);
}
static int icc_recv(FAR struct iccdev_s *priv, FAR iccmsg_t *msg, int32_t ms)
static int icc_recv(struct iccdev_s *priv, iccmsg_t *msg, int32_t ms)
{
FAR struct iccreq_s *req;
struct iccreq_s *req;
irqstate_t flags;
int ret = OK;
@@ -330,7 +330,7 @@ static int icc_recv(FAR struct iccdev_s *priv, FAR iccmsg_t *msg, int32_t ms)
}
flags = enter_critical_section();
req = (FAR struct iccreq_s *)sq_remfirst(&priv->recvq);
req = (struct iccreq_s *)sq_remfirst(&priv->recvq);
if (req)
{
@@ -338,7 +338,7 @@ static int icc_recv(FAR struct iccdev_s *priv, FAR iccmsg_t *msg, int32_t ms)
msg->data = req->msg.data;
msg->cpuid = req->msg.cpuid;
msg->protodata = req->msg.pdata;
sq_addlast((FAR sq_entry_t *)req, &priv->freelist);
sq_addlast((sq_entry_t *)req, &priv->freelist);
}
else
{
@@ -350,9 +350,9 @@ static int icc_recv(FAR struct iccdev_s *priv, FAR iccmsg_t *msg, int32_t ms)
return ret;
}
static FAR struct iccdev_s *icc_devnew(void)
static struct iccdev_s *icc_devnew(void)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
int i;
priv = (struct iccdev_s *)kmm_malloc(sizeof(struct iccdev_s));
@@ -373,7 +373,7 @@ static FAR struct iccdev_s *icc_devnew(void)
for (i = 0; i < NBUFFERS; i++)
{
sq_addlast((FAR sq_entry_t *)&priv->pool[i], &priv->freelist);
sq_addlast((sq_entry_t *)&priv->pool[i], &priv->freelist);
}
priv->pid = INVALID_PROCESS_ID;
@@ -381,7 +381,7 @@ static FAR struct iccdev_s *icc_devnew(void)
return priv;
}
static void icc_devfree(FAR struct iccdev_s *priv)
static void icc_devfree(struct iccdev_s *priv)
{
wd_cancel(&priv->rxtimeout);
kmm_free(priv);
@@ -392,9 +392,9 @@ static void icc_devfree(FAR struct iccdev_s *priv)
****************************************************************************/
int cxd56_iccregisterhandler(int protoid, cxd56_icchandler_t handler,
FAR void *data)
void *data)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
irqstate_t flags;
int ret = OK;
@@ -416,9 +416,9 @@ int cxd56_iccregisterhandler(int protoid, cxd56_icchandler_t handler,
}
int cxd56_iccregistersighandler(int cpuid, cxd56_iccsighandler_t handler,
FAR void *data)
void *data)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
irqstate_t flags;
int ret = OK;
@@ -439,9 +439,9 @@ int cxd56_iccregistersighandler(int cpuid, cxd56_iccsighandler_t handler,
return ret;
}
int cxd56_iccsend(int protoid, FAR iccmsg_t *msg, int32_t ms)
int cxd56_iccsend(int protoid, iccmsg_t *msg, int32_t ms)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
struct iccreq_s req;
if (!msg)
@@ -466,14 +466,14 @@ int cxd56_iccsend(int protoid, FAR iccmsg_t *msg, int32_t ms)
return cxd56_cfpush(req.word);
}
int cxd56_iccsendmsg(FAR iccmsg_t *msg, int32_t ms)
int cxd56_iccsendmsg(iccmsg_t *msg, int32_t ms)
{
return cxd56_iccsend(CXD56_PROTO_MSG, msg, ms);
}
int cxd56_iccrecv(int protoid, FAR iccmsg_t *msg, int32_t ms)
int cxd56_iccrecv(int protoid, iccmsg_t *msg, int32_t ms)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
if (!msg)
{
@@ -489,9 +489,9 @@ int cxd56_iccrecv(int protoid, FAR iccmsg_t *msg, int32_t ms)
return icc_recv(priv, msg, ms);
}
int cxd56_iccrecvmsg(FAR iccmsg_t *msg, int32_t ms)
int cxd56_iccrecvmsg(iccmsg_t *msg, int32_t ms)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
if (!msg)
{
@@ -526,9 +526,9 @@ int cxd56_iccsignal(int8_t cpuid, int8_t signo, int16_t sigdata,
return cxd56_cfpush(req.word);
}
int cxd56_iccnotify(int cpuid, int signo, FAR void *sigdata)
int cxd56_iccnotify(int cpuid, int signo, void *sigdata)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
priv = icc_getcpu(cpuid);
if (!priv)
@@ -545,7 +545,7 @@ int cxd56_iccnotify(int cpuid, int signo, FAR void *sigdata)
int cxd56_iccinit(int protoid)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
if (protoid < 0 || protoid >= NPROTOCOLS)
{
@@ -570,7 +570,7 @@ int cxd56_iccinit(int protoid)
int cxd56_iccinitmsg(int cpuid)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
if (cpuid < 0 || cpuid >= NCPUS)
{
@@ -595,7 +595,7 @@ int cxd56_iccinitmsg(int cpuid)
void cxd56_iccuninit(int protoid)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
irqstate_t flags;
if (protoid < 0 || protoid >= NPROTOCOLS)
@@ -616,7 +616,7 @@ void cxd56_iccuninit(int protoid)
void cxd56_iccuninitmsg(int cpuid)
{
FAR struct iccdev_s *priv;
struct iccdev_s *priv;
irqstate_t flags;
if (cpuid < 0 || cpuid >= NCPUS)

Some files were not shown because too many files have changed in this diff Show More