iio: hid-sensors: Move get sensitivity attribute to hid-sensor-common
No functional change has been made with this patch. The main intent here is to reduce code repetition of getting sensitivity attribute. In the current implementation, sensor_hub_input_get_attribute_info() is called from multiple drivers to get attribute info for sensitivity field. Moving this to common place will avoid code repetition. Signed-off-by: Ye Xiang <xiang.ye@intel.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210201054921.18214-2-xiang.ye@intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
committed by
Jonathan Cameron
parent
6bc5ebe8aa
commit
0e41fd515f
@@ -248,7 +248,9 @@ static inline int hid_sensor_convert_exponent(int unit_expo)
|
||||
|
||||
int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
|
||||
u32 usage_id,
|
||||
struct hid_sensor_common *st);
|
||||
struct hid_sensor_common *st,
|
||||
const u32 *sensitivity_addresses,
|
||||
u32 sensitivity_addresses_len);
|
||||
int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
|
||||
int val1, int val2);
|
||||
int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
|
||||
|
||||
Reference in New Issue
Block a user