lis3lv02d_i2c.c (4ba24fef3eb3b142197135223b90ced2f319cd53) | lis3lv02d_i2c.c (6893d9b51093cf499ee6217e98c50006ec2727c6) |
---|---|
1/* 2 * drivers/hwmon/lis3lv02d_i2c.c 3 * 4 * Implements I2C interface for lis3lv02d (STMicroelectronics) accelerometer. 5 * Driver is based on corresponding SPI driver written by Daniel Mack 6 * (lis3lv02d_spi.c (C) 2009 Daniel Mack <daniel@caiaq.de> ). 7 * 8 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). --- 92 unchanged lines hidden (view full) --- 101 return lis3->write(lis3, CTRL_REG1, reg); 102} 103 104/* Default axis mapping but it can be overwritten by platform data */ 105static union axis_conversion lis3lv02d_axis_map = 106 { .as_array = { LIS3_DEV_X, LIS3_DEV_Y, LIS3_DEV_Z } }; 107 108#ifdef CONFIG_OF | 1/* 2 * drivers/hwmon/lis3lv02d_i2c.c 3 * 4 * Implements I2C interface for lis3lv02d (STMicroelectronics) accelerometer. 5 * Driver is based on corresponding SPI driver written by Daniel Mack 6 * (lis3lv02d_spi.c (C) 2009 Daniel Mack <daniel@caiaq.de> ). 7 * 8 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). --- 92 unchanged lines hidden (view full) --- 101 return lis3->write(lis3, CTRL_REG1, reg); 102} 103 104/* Default axis mapping but it can be overwritten by platform data */ 105static union axis_conversion lis3lv02d_axis_map = 106 { .as_array = { LIS3_DEV_X, LIS3_DEV_Y, LIS3_DEV_Z } }; 107 108#ifdef CONFIG_OF |
109static struct of_device_id lis3lv02d_i2c_dt_ids[] = { | 109static const struct of_device_id lis3lv02d_i2c_dt_ids[] = { |
110 { .compatible = "st,lis3lv02d" }, 111 {} 112}; 113MODULE_DEVICE_TABLE(of, lis3lv02d_i2c_dt_ids); 114#endif 115 116static int lis3lv02d_i2c_probe(struct i2c_client *client, 117 const struct i2c_device_id *id) --- 173 unchanged lines hidden --- | 110 { .compatible = "st,lis3lv02d" }, 111 {} 112}; 113MODULE_DEVICE_TABLE(of, lis3lv02d_i2c_dt_ids); 114#endif 115 116static int lis3lv02d_i2c_probe(struct i2c_client *client, 117 const struct i2c_device_id *id) --- 173 unchanged lines hidden --- |