drivers: rename newly introduced up_i2creset to I2C_RESET
This commit is contained in:
parent
b9a769d65d
commit
34e68a569b
@ -201,6 +201,7 @@ config MS58XX_I2C_FREQUENCY
|
||||
config MS58XX_VDD
|
||||
int "MEAS MS58XX VDD"
|
||||
default 30
|
||||
depends on MS58XX
|
||||
|
||||
config MPL115A
|
||||
bool "Freescale MPL115A Barometer Sensor support"
|
||||
|
@ -201,10 +201,10 @@ static int hts221_do_transfer(FAR struct hts221_dev_s *priv,
|
||||
break;
|
||||
}
|
||||
|
||||
ret = up_i2creset(priv->i2c);
|
||||
ret = I2C_RESET(priv->i2c);
|
||||
if (ret < 0)
|
||||
{
|
||||
hts221_dbg("up_i2creset failed: %d\n", ret);
|
||||
hts221_dbg("I2C_RESET failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -892,7 +892,7 @@ static int hts221_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct hts221_dev_s *priv = inode->i_private;
|
||||
int32_t ret = 0;
|
||||
int ret = OK;
|
||||
|
||||
while (sem_wait(&priv->devsem) != 0)
|
||||
{
|
||||
@ -932,7 +932,7 @@ static int hts221_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
ret = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -131,9 +131,11 @@ static int lis2dh_get_reading(FAR struct lis2dh_dev_s *dev,
|
||||
FAR struct lis2dh_vector_s *res, bool force_read);
|
||||
static int lis2dh_powerdown(FAR struct lis2dh_dev_s *dev);
|
||||
static int lis2dh_reboot(FAR struct lis2dh_dev_s *dev);
|
||||
#ifndef CONFIG_DISABLE_POLL
|
||||
static int lis2dh_poll(FAR struct file *filep,
|
||||
FAR struct pollfd *fds, bool setup);
|
||||
static void lis2dh_notify(FAR struct lis2dh_dev_s *priv);
|
||||
#endif
|
||||
static int lis2dh_int_handler(int irq, FAR void *context,
|
||||
FAR void *arg);
|
||||
static int lis2dh_setup(FAR struct lis2dh_dev_s *dev,
|
||||
@ -1614,10 +1616,10 @@ static int lis2dh_access(FAR struct lis2dh_dev_s *dev, uint8_t subaddr,
|
||||
{
|
||||
/* Some error. Try to reset I2C bus and keep trying. */
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
int ret = up_i2creset(dev->i2c);
|
||||
int ret = I2C_RESET(dev->i2c);
|
||||
if (ret < 0)
|
||||
{
|
||||
lis2dh_dbg("up_i2creset failed: %d\n", ret);
|
||||
lis2dh_dbg("I2C_RESET failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -257,10 +257,10 @@ static int lps25h_do_transfer(FAR struct lps25h_dev_s *dev,
|
||||
break;
|
||||
}
|
||||
|
||||
ret = up_i2creset(dev->i2c);
|
||||
ret = I2C_RESET(dev->i2c);
|
||||
if (ret < 0)
|
||||
{
|
||||
lps25h_dbg("up_i2creset failed: %d\n", ret);
|
||||
lps25h_dbg("I2C_RESET failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -708,7 +708,7 @@ static int lps25h_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct lps25h_dev_s *dev = inode->i_private;
|
||||
int ret = 0;
|
||||
int ret = OK;
|
||||
|
||||
while (sem_wait(&dev->devsem) != 0)
|
||||
{
|
||||
@ -742,7 +742,7 @@ static int lps25h_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
ret = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -176,10 +176,10 @@ static int fusb301_getreg(FAR struct fusb301_dev_s *priv, uint8_t reg)
|
||||
break;
|
||||
}
|
||||
|
||||
ret = up_i2creset(priv->i2c);
|
||||
ret = I2C_RESET(priv->i2c);
|
||||
if (ret < 0)
|
||||
{
|
||||
fusb301_err("ERROR: up_i2creset failed: %d\n", ret);
|
||||
fusb301_err("ERROR: I2C_RESET failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -246,10 +246,10 @@ static int fusb301_putreg(FAR struct fusb301_dev_s *priv, uint8_t regaddr,
|
||||
break;
|
||||
}
|
||||
|
||||
ret = up_i2creset(priv->i2c);
|
||||
ret = I2C_RESET(priv->i2c);
|
||||
if (ret < 0)
|
||||
{
|
||||
fusb301_err("ERROR: up_i2creset failed: %d\n", ret);
|
||||
fusb301_err("ERROR: I2C_RESET failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user