diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2013-07-27 16:31:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-08-04 11:04:58 +0100 |
commit | 7561c301411a0cf9793ec6e9706094e01d66f48e (patch) | |
tree | f8e5e6fb451e0a21c897c37d9c7a0376f11c7ebf /drivers/staging/iio | |
parent | 9bc541028b2b93962e0bebce62ce6e295aab2086 (diff) |
staging:iio:hmc5843: Drop I2C detection code
I2C is generally not probed for devices other than those commonly found
on architectures where device treeor board files are not used. Note also
that this implementation does not fill in the name field of the
i2c_board_info structure as the documentation states it must. Hence
it is unlikely anyone is actually using it.
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/magnetometer/hmc5843.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c index 86c6bf9d5dd8..e5999d4947bf 100644 --- a/drivers/staging/iio/magnetometer/hmc5843.c +++ b/drivers/staging/iio/magnetometer/hmc5843.c @@ -53,14 +53,6 @@ enum hmc5843_ids { }; /* - * Beware: identification of the HMC5883 is still "H43"; - * I2C address is also unchanged - */ -#define HMC5843_ID_REG_LENGTH 0x03 -#define HMC5843_ID_STRING "H43" -#define HMC5843_I2C_ADDRESS 0x1E - -/* * Range gain settings in (+-)Ga * Beware: HMC5843 and HMC5883 have different recommended sensor field * ranges; default corresponds to +-1.0 Ga and +-1.3 Ga, respectively @@ -185,10 +177,6 @@ static const char * const hmc5883_regval_to_sample_freq[] = { "0.75", "1.5", "3", "7.5", "15", "30", "75", }; -/* Addresses to scan: 0x1E */ -static const unsigned short normal_i2c[] = { HMC5843_I2C_ADDRESS, - I2C_CLIENT_END }; - /* Describe chip variants */ struct hmc5843_chip_info { const struct iio_chan_spec *channels; @@ -621,25 +609,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = { }, }; -static int hmc5843_detect(struct i2c_client *client, - struct i2c_board_info *info) -{ - unsigned char id_str[HMC5843_ID_REG_LENGTH]; - - if (client->addr != HMC5843_I2C_ADDRESS) - return -ENODEV; - - if (i2c_smbus_read_i2c_block_data(client, HMC5843_ID_REG_A, - HMC5843_ID_REG_LENGTH, id_str) - != HMC5843_ID_REG_LENGTH) - return -ENODEV; - - if (0 != strncmp(id_str, HMC5843_ID_STRING, HMC5843_ID_REG_LENGTH)) - return -ENODEV; - - return 0; -} - /* Called when we have found a new HMC58X3 */ static void hmc5843_init_client(struct i2c_client *client, const struct i2c_device_id *id) @@ -756,8 +725,6 @@ static struct i2c_driver hmc5843_driver = { .id_table = hmc5843_id, .probe = hmc5843_probe, .remove = hmc5843_remove, - .detect = hmc5843_detect, - .address_list = normal_i2c, }; module_i2c_driver(hmc5843_driver); |