drivers: rename newly introduced up_i2creset to I2C_RESET

This commit is contained in:
Juha Niskanen 2017-05-15 07:22:17 -06:00 committed by Gregory Nutt
parent b9a769d65d
commit 34e68a569b
5 changed files with 17 additions and 14 deletions

View File

@ -201,6 +201,7 @@ config MS58XX_I2C_FREQUENCY
config MS58XX_VDD config MS58XX_VDD
int "MEAS MS58XX VDD" int "MEAS MS58XX VDD"
default 30 default 30
depends on MS58XX
config MPL115A config MPL115A
bool "Freescale MPL115A Barometer Sensor support" bool "Freescale MPL115A Barometer Sensor support"

View File

@ -201,10 +201,10 @@ static int hts221_do_transfer(FAR struct hts221_dev_s *priv,
break; break;
} }
ret = up_i2creset(priv->i2c); ret = I2C_RESET(priv->i2c);
if (ret < 0) if (ret < 0)
{ {
hts221_dbg("up_i2creset failed: %d\n", ret); hts221_dbg("I2C_RESET failed: %d\n", ret);
return ret; return ret;
} }
#endif #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 inode *inode = filep->f_inode;
FAR struct hts221_dev_s *priv = inode->i_private; FAR struct hts221_dev_s *priv = inode->i_private;
int32_t ret = 0; int ret = OK;
while (sem_wait(&priv->devsem) != 0) while (sem_wait(&priv->devsem) != 0)
{ {
@ -932,7 +932,7 @@ static int hts221_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
break; break;
default: default:
ret = -EINVAL; ret = -ENOTTY;
break; break;
} }

View File

@ -131,9 +131,11 @@ static int lis2dh_get_reading(FAR struct lis2dh_dev_s *dev,
FAR struct lis2dh_vector_s *res, bool force_read); FAR struct lis2dh_vector_s *res, bool force_read);
static int lis2dh_powerdown(FAR struct lis2dh_dev_s *dev); static int lis2dh_powerdown(FAR struct lis2dh_dev_s *dev);
static int lis2dh_reboot(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, static int lis2dh_poll(FAR struct file *filep,
FAR struct pollfd *fds, bool setup); FAR struct pollfd *fds, bool setup);
static void lis2dh_notify(FAR struct lis2dh_dev_s *priv); static void lis2dh_notify(FAR struct lis2dh_dev_s *priv);
#endif
static int lis2dh_int_handler(int irq, FAR void *context, static int lis2dh_int_handler(int irq, FAR void *context,
FAR void *arg); FAR void *arg);
static int lis2dh_setup(FAR struct lis2dh_dev_s *dev, 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. */ /* Some error. Try to reset I2C bus and keep trying. */
#ifdef CONFIG_I2C_RESET #ifdef CONFIG_I2C_RESET
int ret = up_i2creset(dev->i2c); int ret = I2C_RESET(dev->i2c);
if (ret < 0) if (ret < 0)
{ {
lis2dh_dbg("up_i2creset failed: %d\n", ret); lis2dh_dbg("I2C_RESET failed: %d\n", ret);
return ret; return ret;
} }
#endif #endif

View File

@ -257,10 +257,10 @@ static int lps25h_do_transfer(FAR struct lps25h_dev_s *dev,
break; break;
} }
ret = up_i2creset(dev->i2c); ret = I2C_RESET(dev->i2c);
if (ret < 0) if (ret < 0)
{ {
lps25h_dbg("up_i2creset failed: %d\n", ret); lps25h_dbg("I2C_RESET failed: %d\n", ret);
return ret; return ret;
} }
#endif #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 inode *inode = filep->f_inode;
FAR struct lps25h_dev_s *dev = inode->i_private; FAR struct lps25h_dev_s *dev = inode->i_private;
int ret = 0; int ret = OK;
while (sem_wait(&dev->devsem) != 0) while (sem_wait(&dev->devsem) != 0)
{ {
@ -742,7 +742,7 @@ static int lps25h_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
break; break;
default: default:
ret = -EINVAL; ret = -ENOTTY;
break; break;
} }

View File

@ -176,10 +176,10 @@ static int fusb301_getreg(FAR struct fusb301_dev_s *priv, uint8_t reg)
break; break;
} }
ret = up_i2creset(priv->i2c); ret = I2C_RESET(priv->i2c);
if (ret < 0) if (ret < 0)
{ {
fusb301_err("ERROR: up_i2creset failed: %d\n", ret); fusb301_err("ERROR: I2C_RESET failed: %d\n", ret);
return ret; return ret;
} }
#endif #endif
@ -246,10 +246,10 @@ static int fusb301_putreg(FAR struct fusb301_dev_s *priv, uint8_t regaddr,
break; break;
} }
ret = up_i2creset(priv->i2c); ret = I2C_RESET(priv->i2c);
if (ret < 0) if (ret < 0)
{ {
fusb301_err("ERROR: up_i2creset failed: %d\n", ret); fusb301_err("ERROR: I2C_RESET failed: %d\n", ret);
return ret; return ret;
} }
#endif #endif