staging: iio: adc: ad7606: Misc style fixes (no functional change)
* Placed includes in alphabetical order * Added brackets around num and mask through out for AD760X_CHANNEL * Used single line comments where needed * Removed extra lines and spaces Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
cc49bd1652
commit
54160ae3b2
@ -5,25 +5,25 @@
|
|||||||
* Copyright 2011 Analog Devices Inc.
|
* Copyright 2011 Analog Devices Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/sysfs.h>
|
|
||||||
#include <linux/regulator/consumer.h>
|
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/regulator/consumer.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
#include <linux/sysfs.h>
|
||||||
#include <linux/util_macros.h>
|
#include <linux/util_macros.h>
|
||||||
|
|
||||||
#include <linux/iio/iio.h>
|
#include <linux/iio/iio.h>
|
||||||
#include <linux/iio/sysfs.h>
|
|
||||||
#include <linux/iio/buffer.h>
|
#include <linux/iio/buffer.h>
|
||||||
#include <linux/iio/trigger_consumer.h>
|
#include <linux/iio/sysfs.h>
|
||||||
#include <linux/iio/trigger.h>
|
#include <linux/iio/trigger.h>
|
||||||
#include <linux/iio/triggered_buffer.h>
|
#include <linux/iio/triggered_buffer.h>
|
||||||
|
#include <linux/iio/trigger_consumer.h>
|
||||||
|
|
||||||
#include "ad7606.h"
|
#include "ad7606.h"
|
||||||
|
|
||||||
@ -249,8 +249,7 @@ static const struct attribute_group ad7606_attribute_group_range = {
|
|||||||
.attrs = ad7606_attributes_range,
|
.attrs = ad7606_attributes_range,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AD760X_CHANNEL(num, mask) \
|
#define AD760X_CHANNEL(num, mask) { \
|
||||||
{ \
|
|
||||||
.type = IIO_VOLTAGE, \
|
.type = IIO_VOLTAGE, \
|
||||||
.indexed = 1, \
|
.indexed = 1, \
|
||||||
.channel = num, \
|
.channel = num, \
|
||||||
@ -265,7 +264,7 @@ static const struct attribute_group ad7606_attribute_group_range = {
|
|||||||
.storagebits = 16, \
|
.storagebits = 16, \
|
||||||
.endianness = IIO_CPU, \
|
.endianness = IIO_CPU, \
|
||||||
}, \
|
}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define AD7605_CHANNEL(num) \
|
#define AD7605_CHANNEL(num) \
|
||||||
AD760X_CHANNEL(num, 0)
|
AD760X_CHANNEL(num, 0)
|
||||||
@ -294,9 +293,7 @@ static const struct iio_chan_spec ad7606_channels[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct ad7606_chip_info ad7606_chip_info_tbl[] = {
|
static const struct ad7606_chip_info ad7606_chip_info_tbl[] = {
|
||||||
/*
|
/* More devices added in future */
|
||||||
* More devices added in future
|
|
||||||
*/
|
|
||||||
[ID_AD7605_4] = {
|
[ID_AD7605_4] = {
|
||||||
.channels = ad7605_channels,
|
.channels = ad7605_channels,
|
||||||
.num_channels = 5,
|
.num_channels = 5,
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
* @num_channels: number of channels
|
* @num_channels: number of channels
|
||||||
* @has_oversampling: whether the device has oversampling support
|
* @has_oversampling: whether the device has oversampling support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct ad7606_chip_info {
|
struct ad7606_chip_info {
|
||||||
const struct iio_chan_spec *channels;
|
const struct iio_chan_spec *channels;
|
||||||
unsigned int num_channels;
|
unsigned int num_channels;
|
||||||
|
@ -26,7 +26,7 @@ static int ad7606_par16_read_block(struct device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ad7606_bus_ops ad7606_par16_bops = {
|
static const struct ad7606_bus_ops ad7606_par16_bops = {
|
||||||
.read_block = ad7606_par16_read_block,
|
.read_block = ad7606_par16_read_block,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ad7606_par8_read_block(struct device *dev,
|
static int ad7606_par8_read_block(struct device *dev,
|
||||||
@ -41,7 +41,7 @@ static int ad7606_par8_read_block(struct device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ad7606_bus_ops ad7606_par8_bops = {
|
static const struct ad7606_bus_ops ad7606_par8_bops = {
|
||||||
.read_block = ad7606_par8_read_block,
|
.read_block = ad7606_par8_read_block,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ad7606_par_probe(struct platform_device *pdev)
|
static int ad7606_par_probe(struct platform_device *pdev)
|
||||||
@ -72,22 +72,12 @@ static int ad7606_par_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct platform_device_id ad7606_driver_ids[] = {
|
static const struct platform_device_id ad7606_driver_ids[] = {
|
||||||
{
|
{ .name = "ad7605-4", .driver_data = ID_AD7605_4, },
|
||||||
.name = "ad7605-4",
|
{ .name = "ad7606-4", .driver_data = ID_AD7606_4, },
|
||||||
.driver_data = ID_AD7605_4,
|
{ .name = "ad7606-6", .driver_data = ID_AD7606_6, },
|
||||||
}, {
|
{ .name = "ad7606-8", .driver_data = ID_AD7606_8, },
|
||||||
.name = "ad7606-8",
|
|
||||||
.driver_data = ID_AD7606_8,
|
|
||||||
}, {
|
|
||||||
.name = "ad7606-6",
|
|
||||||
.driver_data = ID_AD7606_6,
|
|
||||||
}, {
|
|
||||||
.name = "ad7606-4",
|
|
||||||
.driver_data = ID_AD7606_4,
|
|
||||||
},
|
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_DEVICE_TABLE(platform, ad7606_driver_ids);
|
MODULE_DEVICE_TABLE(platform, ad7606_driver_ids);
|
||||||
|
|
||||||
static const struct of_device_id ad7606_of_match[] = {
|
static const struct of_device_id ad7606_of_match[] = {
|
||||||
@ -103,12 +93,11 @@ static struct platform_driver ad7606_driver = {
|
|||||||
.probe = ad7606_par_probe,
|
.probe = ad7606_par_probe,
|
||||||
.id_table = ad7606_driver_ids,
|
.id_table = ad7606_driver_ids,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "ad7606",
|
.name = "ad7606",
|
||||||
.pm = AD7606_PM_OPS,
|
.pm = AD7606_PM_OPS,
|
||||||
.of_match_table = ad7606_of_match,
|
.of_match_table = ad7606_of_match,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
module_platform_driver(ad7606_driver);
|
module_platform_driver(ad7606_driver);
|
||||||
|
|
||||||
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
|
MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
|
||||||
|
@ -36,7 +36,7 @@ static int ad7606_spi_read_block(struct device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ad7606_bus_ops ad7606_spi_bops = {
|
static const struct ad7606_bus_ops ad7606_spi_bops = {
|
||||||
.read_block = ad7606_spi_read_block,
|
.read_block = ad7606_spi_read_block,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ad7606_spi_probe(struct spi_device *spi)
|
static int ad7606_spi_probe(struct spi_device *spi)
|
||||||
@ -48,14 +48,14 @@ static int ad7606_spi_probe(struct spi_device *spi)
|
|||||||
&ad7606_spi_bops);
|
&ad7606_spi_bops);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct spi_device_id ad7606_id[] = {
|
static const struct spi_device_id ad7606_id_table[] = {
|
||||||
{"ad7605-4", ID_AD7605_4},
|
{ "ad7605-4", ID_AD7605_4 },
|
||||||
{"ad7606-8", ID_AD7606_8},
|
{ "ad7606-4", ID_AD7606_4 },
|
||||||
{"ad7606-6", ID_AD7606_6},
|
{ "ad7606-6", ID_AD7606_6 },
|
||||||
{"ad7606-4", ID_AD7606_4},
|
{ "ad7606-8", ID_AD7606_8 },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(spi, ad7606_id);
|
MODULE_DEVICE_TABLE(spi, ad7606_id_table);
|
||||||
|
|
||||||
static const struct of_device_id ad7606_of_match[] = {
|
static const struct of_device_id ad7606_of_match[] = {
|
||||||
{ .compatible = "adi,ad7605-4" },
|
{ .compatible = "adi,ad7605-4" },
|
||||||
@ -73,7 +73,7 @@ static struct spi_driver ad7606_driver = {
|
|||||||
.pm = AD7606_PM_OPS,
|
.pm = AD7606_PM_OPS,
|
||||||
},
|
},
|
||||||
.probe = ad7606_spi_probe,
|
.probe = ad7606_spi_probe,
|
||||||
.id_table = ad7606_id,
|
.id_table = ad7606_id_table,
|
||||||
};
|
};
|
||||||
module_spi_driver(ad7606_driver);
|
module_spi_driver(ad7606_driver);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user