From: Segwon Date: Tue, 14 Nov 2017 04:24:37 +0000 (+0900) Subject: i2c: remove unused interface function that peripheral_interface_i2c_set_address() X-Git-Tag: submit/tizen_4.0/20171220.125806^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=503baca692cf21f5f652d9418b2efce068fc45a5;p=platform%2Fcore%2Fapi%2Fperipheral-io.git i2c: remove unused interface function that peripheral_interface_i2c_set_address() Change-Id: I277e99134c27a411614aac9502c700ab83f04c3e Signed-off-by: Segwon --- diff --git a/include/interface/peripheral_interface_i2c.h b/include/interface/peripheral_interface_i2c.h index 67c7019..41326d6 100644 --- a/include/interface/peripheral_interface_i2c.h +++ b/include/interface/peripheral_interface_i2c.h @@ -58,7 +58,6 @@ struct i2c_smbus_ioctl_data { }; int peripheral_interface_i2c_close(peripheral_i2c_h i2c); -int peripheral_interface_i2c_set_address(peripheral_i2c_h i2c, int address); int peripheral_interface_i2c_read(peripheral_i2c_h i2c, uint8_t *data, uint32_t length); int peripheral_interface_i2c_write(peripheral_i2c_h i2c, uint8_t *data, uint32_t length); int peripheral_interface_i2c_smbus_ioctl(peripheral_i2c_h i2c, struct i2c_smbus_ioctl_data *data); diff --git a/src/interface/peripheral_interface_i2c.c b/src/interface/peripheral_interface_i2c.c index cc703fe..6b235ff 100644 --- a/src/interface/peripheral_interface_i2c.c +++ b/src/interface/peripheral_interface_i2c.c @@ -46,24 +46,6 @@ int peripheral_interface_i2c_close(peripheral_i2c_h i2c) return 0; } -int peripheral_interface_i2c_set_address(peripheral_i2c_h i2c, int address) -{ - int status; - - _D("fd : %d, slave address : 0x%x", i2c->fd, address); - RETVM_IF(i2c->fd < 0, -EINVAL, "Invalid fd"); - - status = ioctl(i2c->fd, I2C_SLAVE, address); - if (status < 0) { - char errmsg[MAX_ERR_LEN]; - strerror_r(errno, errmsg, MAX_ERR_LEN); - _E("Failed to set slave address(%x), fd : %d, errmsg : %s", address, i2c->fd, errmsg); - return status; - } - - return 0; -} - int peripheral_interface_i2c_read(peripheral_i2c_h i2c, uint8_t *data, uint32_t length) { int status;