ina2xx-adc.c (651a88798412e216f337d70181127e847f00a4b7) ina2xx-adc.c (74f582ec127e3b10aec71e8d15f1c14b0f0481ec)
1/*
2 * INA2XX Current and Power Monitors
3 *
4 * Copyright 2015 Baylibre SAS.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 536 unchanged lines hidden (view full) ---

545static ssize_t ina2xx_allow_async_readout_store(struct device *dev,
546 struct device_attribute *attr,
547 const char *buf, size_t len)
548{
549 struct ina2xx_chip_info *chip = iio_priv(dev_to_iio_dev(dev));
550 bool val;
551 int ret;
552
1/*
2 * INA2XX Current and Power Monitors
3 *
4 * Copyright 2015 Baylibre SAS.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 536 unchanged lines hidden (view full) ---

545static ssize_t ina2xx_allow_async_readout_store(struct device *dev,
546 struct device_attribute *attr,
547 const char *buf, size_t len)
548{
549 struct ina2xx_chip_info *chip = iio_priv(dev_to_iio_dev(dev));
550 bool val;
551 int ret;
552
553 ret = strtobool(buf, &val);
553 ret = kstrtobool(buf, &val);
554 if (ret)
555 return ret;
556
557 chip->allow_async_readout = val;
558
559 return len;
560}
561

--- 460 unchanged lines hidden (view full) ---

1022 } else {
1023 indio_dev->channels = ina219_channels;
1024 indio_dev->num_channels = ARRAY_SIZE(ina219_channels);
1025 indio_dev->info = &ina219_info;
1026 }
1027 indio_dev->name = id->name;
1028
1029 ret = devm_iio_kfifo_buffer_setup(&client->dev, indio_dev,
554 if (ret)
555 return ret;
556
557 chip->allow_async_readout = val;
558
559 return len;
560}
561

--- 460 unchanged lines hidden (view full) ---

1022 } else {
1023 indio_dev->channels = ina219_channels;
1024 indio_dev->num_channels = ARRAY_SIZE(ina219_channels);
1025 indio_dev->info = &ina219_info;
1026 }
1027 indio_dev->name = id->name;
1028
1029 ret = devm_iio_kfifo_buffer_setup(&client->dev, indio_dev,
1030 INDIO_BUFFER_SOFTWARE,
1031 &ina2xx_setup_ops);
1032 if (ret)
1033 return ret;
1034
1035 return iio_device_register(indio_dev);
1036}
1037
1038static int ina2xx_remove(struct i2c_client *client)

--- 60 unchanged lines hidden ---
1030 &ina2xx_setup_ops);
1031 if (ret)
1032 return ret;
1033
1034 return iio_device_register(indio_dev);
1035}
1036
1037static int ina2xx_remove(struct i2c_client *client)

--- 60 unchanged lines hidden ---