Shreeya Patel [Thu, 29 Mar 2018 09:12:02 +0000 (14:42 +0530)]
Staging: iio: adis16209: Indent the field definitions
Have indentation in field definitions to make them
clearly different from the register addresses.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jean-Baptiste Maneyrol [Mon, 26 Mar 2018 14:01:20 +0000 (14:01 +0000)]
iio: imu: inv_mpu6050: clean double declaration of set_power_itg
Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Xingyu Chen [Mon, 26 Mar 2018 08:46:29 +0000 (16:46 +0800)]
iio: adc: meson-saradc: add support for Meson AXG
Add the SAR ADC driver for the Amlogic Meson-AXG SoC.
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Xingyu Chen [Mon, 26 Mar 2018 08:46:28 +0000 (16:46 +0800)]
dt-bindings: iio: adc: document the Meson AXG support
Update the documentation to expicitly support the Meson-AXG SoC.
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Yixun Lan [Mon, 26 Mar 2018 08:46:27 +0000 (16:46 +0800)]
iio: adc: meson-saradc: squash and share the common adc platform data
Extract and promote common adc platform data into a new structure,
to make it better share the info between several SoCs,
this will avoid duplicating the code all over the place,
Save a few memory and make the code more maintainable.
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Sat, 24 Mar 2018 20:05:54 +0000 (16:05 -0400)]
staging: iio: tsl2x7x: use either direction for IIO_EV_INFO_{ENABLE,PERIOD}
The events IIO_EV_INFO_VALUE and IIO_EV_INFO_ENABLE currently have a
falling and rising direction configured. There does not need to be a
separate distinction so this patch changes these to use the
either direction. Directory listing of event sysfs attributes for a
TSL2772 with this patch applied:
in_intensity0_thresh_either_en
in_intensity0_thresh_either_period
in_intensity0_thresh_falling_value
in_intensity0_thresh_rising_value
in_proximity0_thresh_either_en
in_proximity0_thresh_either_period
in_proximity0_thresh_falling_value
in_proximity0_thresh_rising_value
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Sat, 24 Mar 2018 20:05:52 +0000 (16:05 -0400)]
staging: iio: tsl2x7x: use auto increment I2C protocol
The hardware supports 16-bit ALS and proximity readings, however the
datasheet recommends using the I2C auto increment protocol so that the
correct high and low bytes are read even if the integration cycle ends
between reading the lower and upper registers.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Thu, 22 Mar 2018 19:12:45 +0000 (00:42 +0530)]
Staging: iio: accel: adis16201: Move adis16201 driver out of staging
Move adis16201 driver out of staging and merge into mainline
IIO subsystem.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Thu, 22 Mar 2018 19:12:44 +0000 (00:42 +0530)]
Staging: iio: accel: adis16201: Fix 80 character line limit
Split the line over 80 characters limit to fix checkpatch
warning.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Thu, 22 Mar 2018 19:12:43 +0000 (00:42 +0530)]
Staging: iio: accel: adis16201: Use GENMASK
Use GENMASK to improve readability and remove the local variables used to
store intermediate data.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Thu, 22 Mar 2018 19:12:42 +0000 (00:42 +0530)]
Staging: iio: accel: adis16201: Remove unused headers
Remove few unused headers files since the adis core handles the buffer and
sysfs support.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:12 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: add copyright
Add Brian Masney's copyright and to the list of module authors for all
of the staging cleanups. This patch also update's Jon Brenner's current
work email address since AMS now owns TAOS.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:11 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: put local variables in reverse Christmas tree order
This patch ensures that all of the local variable declarations are in
reverse Christmas tree order where possible to increase code
readability.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:10 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: remove ch0 and ch1 variables from tsl2x7x_get_lux()
Remove the ch0 and ch1 variables from tsl2x7x_get_lux() and
write those values directly into the chip->als_cur_info.als_ch0
and chip->als_cur_info.als_ch01 variables.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:09 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: remove unused variables from tsl2x7x_get_lux()
tsl2x7x_get_lux() has a ch0lux and ch1lux variables that are not used
so this patch removes them.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:08 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: split out als and prox persistence settings
The struct tsl2x7x_settings contained a persistence member that
contained both the ALS and proximity persistence fields. This patch
splits this out into two separate fields so that the bitmasks in
several parts of the code are no longer necessary.
The default persistence settings are also changed by this patch from:
- Proximity: 0 (Every proximity cycle generates an interrupt)
- ALS: 255 (60 consecutive values out of range)
to something a little more reasonable based on my testing:
- Proximity: 1 (1 proximity value out of range)
- ALS: 1 (1 value outside of threshold range)
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:07 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: make logging consistent and correct newlines
This patch updates all of the logging commands so that they are
consistent with the other messages, includes __func__ in the message,
and all of the messages include newlines. This patch also removes some
debug log messages.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:06 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: split out als and prox interrupt settings
The struct tsl2x7x_settings contained an interrupts_en member that was
a bitmask for which interrupts are enabled. This required having
bitmasks in several parts of the code. This patch splits this field
out into two booleans to remove most of the bitmasks in the code.
This patch also fixes a bug where if an interrupt pin was configured,
but proximity interrupts were disabled, then the proximity value could
not be polled.
This patch also removes an unnecessary second call to writing the
control register in tsl2x7x_chip_on().
Driver tested using a TSL2772 hooked up to a Raspberry Pi 2.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:05 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal()
tsl2x7x_prox_cal() would set the interrupt flag, and reset the device to
start doing the calibration routine. However, this did not actually
affect the readings since they are polled. This patch drops the interrupt
code.
This patch also drops the function tsl2x7x_prox_calculate() and removes
support for the standard deviation and min sample since those values
were not used.
Driver was tested using a TSL2772 hooked up to a Raspberry Pi 2. I
performed the following testing at various distances:
- Put hand in front of sensor and keep the sensor and hand stationary.
- Perform calibration routine.
- Run iio_event_monitor.
- Verify that a proximity event is triggered when my hand comes
anywhere between the sensor and where I performed the calibration
routine.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:04 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: no need to clear interrupt flag when getting lux
tsl2x7x_get_lux() does not need to clear the interrupt flag when
querying the ALS. The interrupt flag is cleared in
tsl2x7x_event_handler(). This patches removes the unnecessary code.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:03 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: correct interrupt handler trigger
tsl2x7x_event_handler() was not called as expected when the device was
asserting a hardware interrupt. This patch changes the interrupt line
trigger from rising to falling.
The driver was tested on a TSL2772 hooked up to a Raspberry Pi 2. The
interrupt pin also had a 10K pull-up resistor per the requirements from
the datasheet. The relevant device tree binding:
&i2c1 {
tsl2772@39 {
compatible = "amstaos,tsl2772";
reg = <0x39>;
interrupt-parent = <&gpio>;
interrupts = <22 0x2>;
};
};
With this patch, iio_event_monitor now shows the events when the
channels are outside the defined interrupt thresholds.
$ sudo ./iio_event_monitor tsl2772
Found IIO device with name tsl2772 with device number 0
Event: time:
1478193460053760446, type: proximity, channel: 0, evtype:
thresh, direction: either
...
Event: time:
1478193463020270185, type: illuminance, channel: 0, evtype:
thresh, direction: either
...
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Brian Masney [Wed, 21 Mar 2018 10:29:02 +0000 (06:29 -0400)]
staging: iio: tsl2x7x: remove unnecessary code
As a follow up to the work in commit
a0722d05a195 ("staging: iio:
tsl2x7x: convert mutex_trylock() to mutex_lock()"), this patch removes
the unnecessary calls to tsl2x7x_get_prox() and tsl2x7x_get_lux() in
tsl2x7x_event_handler(). Previously, these functions were locked with
mutex_trylock(), but that is no longer the case. This patch also removes
a comment that is no longer relevant about returning the last sample.
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 23 Mar 2018 14:27:27 +0000 (11:27 -0300)]
staging:iio:ade7854: Remove read_reg_* duplications
The original code had a read function per data size; after updates, all
read functions tasks were centralized in a single function, but the old
signature was kept to maintain the module working without problems. This
patch removes a set of duplications associated with read_reg_*, and
update the areas that calling the old interface by the new one.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 23 Mar 2018 14:27:12 +0000 (11:27 -0300)]
staging:iio:ade7854: Rework SPI read function
Rework read SPI function to reduce the code duplication and centralizes
all the task in a single function.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 23 Mar 2018 14:26:57 +0000 (11:26 -0300)]
staging:iio:ade7854: Rework I2C read function
The read operation for the I2C function has many duplications that can
be generalized into a single function. This patch reworks the read
operation for I2C to centralizes all similar code in a single function.
It is possible to remove all the old interface to use the new one,
however, for keeping the things simple and working this patch maintain
legacy interface.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 23 Mar 2018 14:26:41 +0000 (11:26 -0300)]
staging:iio:ade7854: Remove write_reg_* duplications
This patch removes code duplications related to the write_reg_*
functions and centralizes them in a single function. Also, it eliminates
the legacy functions and replaces them by a unique signature that is
used by SPI and I2C.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 23 Mar 2018 14:26:25 +0000 (11:26 -0300)]
staging:iio:ade7854: Rework SPI write function
The write operation using SPI has a many code duplications (similar to
I2C) and four different interfaces per data size. This patch introduces
a single function that centralizes the main task related to SPI.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 23 Mar 2018 14:26:06 +0000 (11:26 -0300)]
staging:iio:ade7854: Rework I2C write function
The write operation using I2C has many code duplications and four
different interfaces per data size. This patch introduces a single
function that centralizes the main tasks.
The central function inserted by this patch can easily replace all the
four functions related to the data size. However, this patch does not
remove any code signature for keeping the meter module work and make
easier to review this patch.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
John Syne [Fri, 23 Mar 2018 14:25:48 +0000 (11:25 -0300)]
staging:iio:ade7854: Fix the wrong number of bits to read
Fixes: correctly handle the data size in the read operation for I2C
The function ade7854_i2c_read_reg_32() have to invoke the
i2c_master_recv() for read 32 bits values, however, the counter is set
to 3 which means 24 bits. This patch fixes the wrong size of 24 bits, to
32 bits.
Signed-off-by: John Syne <john3909@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Fixes:
8d97a5877 ("staging: iio: meter: new driver for ADE7754 devices")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
John Syne [Fri, 23 Mar 2018 14:22:10 +0000 (11:22 -0300)]
staging:iio:ade7854: Fix error handling on read/write
The original code does not correctly handle the error related to I2C
read and write. This patch fixes the error handling related to all
read/write functions for I2C.
Signed-off-by: John Syne <john3909@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Fixes:
8d97a5877 ("staging: iio: meter: new driver for ADE7754 devices")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:25 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Adjust argument to match open parentheses
In adis16201_read_raw() adjust an argument to match an open parentheses
using tabs and spaces.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:24 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Prefer reverse christmas tree ordering
Prefer reverse christmas tree ordering of declarations to improve
readability.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:23 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Use sign_extend32 function
Use sign_extned32() for 32 bit sign extending rather than hard coding.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:22 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Add comments about units in read_raw()
Clarify the conversion and formation of resultant data in the
adis16201_read_raw() with sufficient comments and remove the unnecessary
comments.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:21 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Group register definitions
Group register definitions with its register field bits to improve
readability and easy identification. A small comment is also added to
denote the purpose/functionality of the grouped register definitions.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:20 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Add _REG suffix to registers
Add a _REG suffix to distinguish between registers and the register bit
fileds.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:19 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Remove unnecessary comments
Remove few unnecessary comments since the macro definitions clearly
justify their purpose.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Fri, 16 Mar 2018 20:06:18 +0000 (01:36 +0530)]
Staging: iio: accel: adis16201: Rename few macro definitions
Rename the macro definitions with suitable names specifying their
purpose.
* ADIS16201_STARTUP_DELAY_MS: Remove the comment specifying the delay in
microseconds and rename it with addtition of _MS suffix.
* ADIS16201_MSC_CTRL_ACTIVE_DATA_RDY_HIGH: Rename the macro to make it
similar to other misc control registers which denotes the data ready
polarity.
* ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT: Rename to denote it is a
failure bit.
* ADIS16201_GLOB_CMD_FACTORY_RESET: Remove ambiguous _CAL suffix and add
_RESET suffix instead to denote factory reset command.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Mon, 12 Mar 2018 15:48:15 +0000 (17:48 +0200)]
iio: adc: ad7780: remove IIO_CHAN_INFO_SAMP_FREQ support
The `ad7780` driver does not implement setting/getting the sampling
frequency.
For the ad7780/ad7781 devices, the control is done via an external pin,
and the ad7170/ad7171 devices have a fixed sampling rate (so, no control).
For these devices, and similar other that may be added later on,
a AD_SD_CHANNEL_NO_SAMPLE_FREQ() macro has been added, which doesn't set
the IIO_CHAN_INFO_SAMP_FREQ flag.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Mon, 12 Mar 2018 12:06:54 +0000 (14:06 +0200)]
iio: adc: ad7791: implement IIO_CHAN_INFO_SAMP_FREQ
Now that the old read/write frequency sysfs attrs have been removed, we
have a clean slate to implement IIO_CHAN_INFO_SAMP_FREQ.
This driver also pre-dates IIO_CHAN_INFO_SAMP_FREQ, and this change
implements this behavior.
The `ad7791_write_raw` would have overlapped quite a bit with the old
read/write frequency functions, making things a bit harder to follow.
Fixes:
a13e831fcaa7 ("staging: iio: ad7192: implement
IIO_CHAN_INFO_SAMP_FREQ")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Mon, 12 Mar 2018 12:06:53 +0000 (14:06 +0200)]
iio: adc: ad7791: remove sample freq sysfs attributes
In the current state, these attributes are broken, because they are
registered already, and the kernel throws a warning.
The first registration happens via the `IIO_CHAN_INFO_SAMP_FREQ` flag from
the `ad_sigma_delta` driver.
In this commit these attrs are removed, and in the following the
IIO_CHAN_INFO_SAMP_FREQ behavior will be implemented, which replaces these
hooks.
This is done to make things a bit easier to review as there is a bit of
overlap in the patch if it's done all at once.
Fixes:
a13e831fcaa7 ("staging: iio: ad7192: implement IIO_CHAN_INFO_SAMP_FREQ")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gwendal Grignou [Tue, 13 Mar 2018 21:23:28 +0000 (14:23 -0700)]
iio: cros_ec: Move cros_ec_sensors_core.h in /include
Similar to other common iio frameworks, move cros_ec_sensors_core.h from
drivers/iio/common/cros_ec_sensors/ to include/linux/iio/common.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
William Breathitt Gray [Sat, 17 Mar 2018 15:49:56 +0000 (11:49 -0400)]
iio: stx104: Implement get_multiple callback
The Apex Embedded Systems STX104 series of devices provides 4 TTL
compatible lines of inputs accessed via a single 4-bit port. Since four
input lines are acquired on a single port input read, the STX104 GPIO
driver may improve multiple input reads by utilizing a get_multiple
callback. This patch implements the stx104_gpio_get_multiple function
which serves as the respective get_multiple callback.
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Baruch Siach [Thu, 22 Feb 2018 19:44:53 +0000 (21:44 +0200)]
uapi: remove telephony headers
ixjuser.h includes the telephony.h header. Other than that no kernel
code uses any of these headers. The last user of the ixjuser.h header
has been removed in commit
7326446c728 (Staging: remove telephony
drivers), more than 5 years ago.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Razvan Stefanescu [Wed, 14 Mar 2018 15:55:58 +0000 (10:55 -0500)]
staging: fsl-dpaa2/ethsw: Add TODO
Add a TODO file describing what needs to be added/changed before the driver
can be moved out of staging.
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Razvan Stefanescu [Wed, 14 Mar 2018 15:55:57 +0000 (10:55 -0500)]
staging: fsl-dpaa2/ethsw: Add README
Add a README file describing the driver architecture, components and
interfaces.
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Razvan Stefanescu [Wed, 14 Mar 2018 15:55:56 +0000 (10:55 -0500)]
staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Razvan Stefanescu [Wed, 14 Mar 2018 15:55:55 +0000 (10:55 -0500)]
staging: fsl-dpaa2/ethsw: Add ethtool support
Add driver information, link details and hardware statistics to be
reported via ethtool -S.
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Razvan Stefanescu [Wed, 14 Mar 2018 15:55:54 +0000 (10:55 -0500)]
staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver
Introduce the DPAA2 Ethernet Switch driver, which manages Datapath Switch
(DPSW) objects discovered on the MC bus.
Suggested-by: Alexandru Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Razvan Stefanescu [Wed, 14 Mar 2018 15:55:53 +0000 (10:55 -0500)]
staging: fsl-dpaa2/ethsw: Add APIs for DPSW object
Add the command build/parse APIs for operating on DPSW objects through
the DPAA2 Management Complex.
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bogdan Purcareata [Fri, 2 Mar 2018 10:23:59 +0000 (04:23 -0600)]
staging: fsl-mc: Move DPCON out of staging
Move the source files out of staging into their final locations:
- dpcon.c goes to drivers/bus/fsl-mc/, next to the core infrastructure
- dpcon-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next
to the other internally used APIs
- dpcon.h gets merged into include/linux/fsl/mc.h, exposing the public
API
Update references in the dpaa2-eth staging driver.
DPCON stands for Data Path Concentrator - an interface between DPIO
(Data Path IO) and its users (e.g. dpaa2-eth). You can read more about
DPIO in Documentation/networking/dpaa2/overview.rst
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bogdan Purcareata [Fri, 2 Mar 2018 10:23:58 +0000 (04:23 -0600)]
staging: fsl-mc: Move DPBP out of staging
Move the source files out of staging into their final locations:
- dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure
- dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next
to the other internally used APIs
- dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public
API
Update references in the dpaa2-eth staging driver.
DPBP stands for Data Path Buffer Pool - you can read more about the
object in Documentation/networking/dpaa2/overview.rst
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 14 Mar 2018 12:12:26 +0000 (13:12 +0100)]
staging: irda: remove the irda network stack and drivers
No one has publicly stepped up to maintain this broken codebase for
devices that no one uses anymore, so let's just drop the whole thing.
If someone really wants/needs it, we can revert this and they can fix
the code up to work properly.
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
HariPrasath Elango [Wed, 14 Mar 2018 10:23:31 +0000 (15:53 +0530)]
staging: pi433: Remove comments inside code
Remove comments inbetween code as in this case.
Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Fri, 9 Mar 2018 16:49:23 +0000 (19:49 +0300)]
staging:r8188eu: Use lib80211 to support TKIP
Custom TKIP decryption replaced with lib80211 implementation.
MIC check use lib80211 too.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Fri, 9 Mar 2018 18:44:17 +0000 (10:44 -0800)]
staging: vc04_services: Remove vchiq_queue_bulk_{transmit,receive}.
These are dead code, including in the downstream Raspberry Pi tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Fri, 9 Mar 2018 18:44:16 +0000 (10:44 -0800)]
staging: vc04_services: Mark the "DT bindings" job done.
Now we just need to get the other drivers merged and finish the style
cleanups/garbage collecting so we can get out of staging.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Fri, 9 Mar 2018 18:44:15 +0000 (10:44 -0800)]
ARM: dts: bcm2835: Add VCHIQ node to the Raspberry Pi boards. (v3)
The VCHIQ firmware communication channel operates in parallel with our
other mailbox-based channel. This is the communication channel that
exposes the firmware's media decode/encode and ISP interfaces.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com> (v2)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Fri, 9 Mar 2018 18:44:14 +0000 (10:44 -0800)]
dt-bindings: soc: Add a binding for the Broadcom VCHIQ services. (v3)
The VCHIQ communication channel can be provided by BCM283x and Capri
SoCs, to communicate with the VPU-side OS services.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Fri, 9 Mar 2018 18:44:13 +0000 (10:44 -0800)]
staging: vc04_services: Remove cache-line-size property (v3)
It's been tempting to replace this with (L1) cache_line_size(), but
that's really not what the value is about. It's about coordinating
the condition for the pagelist fragment behavior between the two
sides. However, the property was not accepted for the upstream DT
binding, so we have to use the firmware's fallback value.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 14 Mar 2018 12:02:48 +0000 (13:02 +0100)]
staging: ccree: remove ccree staging driver copy
The ccree driver is now in the cryptodev tree, so remove it from
drivers/staging as it's no longer needed here.
Based on a patch from Gilad, but the mailing list didn't like it :(
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Fri, 9 Mar 2018 18:44:12 +0000 (10:44 -0800)]
staging: vc04_services: Replace "firmware" node with a compatible lookup.
This was requested by Rob Herring in DT bindings review.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ji-Hun Kim [Tue, 13 Mar 2018 06:09:15 +0000 (15:09 +0900)]
staging: rtl8723bs: core: rtw_cmd: remove unnecessary initialization
Clean up checkpatch error:
ERROR: do not initialise globals to 0
Signed-off-by: Ji-Hun Kim <ji_hun.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:59 +0000 (07:43 +0530)]
staging: wilc1000: fix line over 80 char issue in handle_scan_done()
Fix 'line over 80 characters' issue found by checkpatch.pl script in
handle_scan_done().
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:58 +0000 (07:43 +0530)]
staging: wilc1000: rename variables using camelCase in handle_rcvd_gnrl_async_info()
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:57 +0000 (07:43 +0530)]
staging: wilc1000: rename WILC_HostIf_PackStaParam to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:56 +0000 (07:43 +0530)]
staging: wilc1000: rename variables prefix using datatype 'u8'
Rename variables with datatype 'u8' in their name to follow the linux
coding style.
Renamed following variables:
u8abort_running_scan
pu8Buffer
pu8keybuf
pu8msa
u8remain_on_chan_flag
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:55 +0000 (07:43 +0530)]
staging: wilc1000: fix line over 80 character in handle_disconnect()
Refactor handle_disconnect() to avoid line over 80 characters issue
reported by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:54 +0000 (07:43 +0530)]
staging: wilc1000: fix line over 80 char in handle_connect()
Fix 'line over 80 characters' issue reported by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:53 +0000 (07:43 +0530)]
staging: wilc1000: fix line over 80 char in handle_scan()
Fix 'line over 80 character' issue reported by checkpatch.pl script in
handle_scan().
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:52 +0000 (07:43 +0530)]
staging: wilc1000: rename label 'ERRORHANDLER' to avoid uppercase name
Cleanup patch to avoid use of uppercase for label names, to follow linux
coding style.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:51 +0000 (07:43 +0530)]
staging: wilc1000: rename strConnectInfo to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 02:13:50 +0000 (07:43 +0530)]
staging: wilc1000: rename pstrHostIFconnectAttr to avoid camelCase issue
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:30 +0000 (07:02 +0530)]
staging: wilc1000: fix line over 80 char in cfg_scan_result()
Refactor cfg_scan_result() API to avoid 'line over 80 chars' issue
reported by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:29 +0000 (07:02 +0530)]
staging: wilc1000: rename pJoinParams to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:28 +0000 (07:02 +0530)]
staging: wilc1000: fix line over 80 char in mgmt_tx_cancel_wait()
Fix 'line over 80 char' issue found in checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:27 +0000 (07:02 +0530)]
staging: wilc1000: fix line over 80 char for cfg parse RX and TX function
Fix 'line over 80 characters' issue found by checkpatch.pl script. Moved
the common code from wilc_wfi_cfg_parse_tx_action() &
wilc_wfi_cfg_parse_rx_action() to new function to avoid checkpatch issue.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:26 +0000 (07:02 +0530)]
staging: wilc1000: fix line over 80 char in get_key() & set_default_key()
Fix 'line over 80 characters' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:25 +0000 (07:02 +0530)]
staging: wilc1000: fix line over 80 char in change_virtual_intf()
Fix 'line over 80 char' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:24 +0000 (07:02 +0530)]
staging: wilc1000: rename au8ScanChanList to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:23 +0000 (07:02 +0530)]
staging: wilc1000: rename CfgScanResult to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:22 +0000 (07:02 +0530)]
staging: wilc1000: rename pstrNetworkInfo to avoid camelCase
Fix 'Avoid camleCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Wed, 7 Mar 2018 01:32:21 +0000 (07:02 +0530)]
staging: wilc1000: rename strHiddenNetwork to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Samuel Thibault [Sat, 10 Mar 2018 10:56:27 +0000 (11:56 +0100)]
staging: speakup: Add unicode support to the speakup_dummy driver
This extends spk_io_ops with a synth_out_unicode which takes a u16 character
instead of just a byte, and extends spk_ttyio to implement it to emit
utf-8. spk_do_catch_up_unicode can then be introduced to benefit from
synth_out_unicode, and speakup_dummy made to use spk_do_catch_up_unicode instead
of spk_do_catch_up.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 12 Mar 2018 23:36:05 +0000 (23:36 +0000)]
staging: comedi: adl_pci6208: remove redundant initialization of 'val'
Variable 'val' is initialized with a value that is never read, it is
updated with a new value again after intitialization. Remove the
redundant initialization and move the declaration and assignment into
the scope of the for-loop.
Cleans up clang warning:
drivers/staging/comedi/drivers/adl_pci6208.c:61:15: warning: Value
stored to 'val' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Sun, 11 Mar 2018 11:11:44 +0000 (12:11 +0100)]
staging: ks7010: replace custom rotation operations in favour of the kernel ones
This patch replaces custom ROR32 and ROL32 macros for the ones included in
bitops header of the linux kernel.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Tue, 13 Mar 2018 13:05:16 +0000 (14:05 +0100)]
staging: lustre: fid: avoid false-positive uninitialized variable warning
One of Neil's recent cleanups apparently has led the code to get
to a state where gcc tracks the 'seqnr' variable just enough to
see that it is sometimes initialized in seq_client_alloc_seq(),
but not enough that it can prove this initialization to be reliable
before the use of that variable:
drivers/staging/lustre/lustre/fid/fid_request.c: In function 'seq_client_alloc_fid':
drivers/staging/lustre/lustre/fid/fid_request.c:245:22: error: 'seqnr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
The code seems to be otherwise correct, and I could not come
up with a good way to simplify it further, so this adds a fake
initialization to shut up that warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Tue, 13 Mar 2018 13:03:44 +0000 (14:03 +0100)]
staging: lustre: use module_name() macro for debug printf
We now allow lustre to be built when CONFIG_MODULES is disabled,
but that causes a build failure:
In file included from drivers/staging/lustre/include/linux/libcfs/libcfs.h:42,
from drivers/staging/lustre/lustre/obdclass/lu_object.c:44:
drivers/staging/lustre/lustre/obdclass/lu_object.c: In function 'lu_context_key_degister':
drivers/staging/lustre/lustre/obdclass/lu_object.c:1410:51: error: dereferencing pointer to incomplete type 'struct module'
This particular case can be avoided by using the module_name()
macro that was designed exactly to handle printing the name of
a module in all configurations.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 14 Mar 2018 11:32:11 +0000 (12:32 +0100)]
Merge tag 'iio-for-4.17b' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second set of new device support, features and cleanup for IIO in the 4.17 cycle
The uptick in staging cleanup is partly due to GSoC Applications
process being underway and one of Daniel's tasks being to try
cleaning up an IIO driver to move out of staging.
Naturally there is some normal staging cleanup progress in here
as well.
New device support
* Microchip mcp4018
- New driver supproting MCP4017, MCP4018 and MCP4019 digital pots.
* On Semiconductor lv0104cs
- New driver to support this ambient light sensor.
Cleanup
* axp20x_adc
- remove a !! in favour of clear ternary operator.
* ad2s1210 (staging cleanup)
- Reorganise to avoid ending a line with [
- Remove some unnecessary defines.
- Remove unsed variable.
* ad5380
- Replace magic 0 with IIO_CHAN_INFO_RAW
* ad5764
- Replace magic 0 with IIO_CHA_INFO_RAW
* ad7150 (staging cleanup)
- Align arguements with parenthesis.
* ad7152 (staging cleanup)
- Align arguements.
* ad7746 (staging cleanup)
- Align arguements.
* ad7816
- Remove pointless void pointer cast.
* ade7753
- Replace IIO_DEV_ATTR_CH_OFF with equivalent to avoid confusing
checkpatch (this macro didn't really help anyway). Also drop the
macro from the meter.h header.
* ade7754 (staging cleanup)
- Add names to funciton definition arguements.
- Align arguements with open parenthesis where possible.
* ade7758 (staging cleanup)
- Remove __func__ from dev_dbg statements as provided by dynamic
debug anyway.
- Align arguements with open parenthesis where possible.
* ade7759 (staging cleanup)
- Replace IIO_DEV_ATTR_CH_OFF with equiavalent to avoid confusing
checkpatch.
* adis16201 (staging cleanup)
- Headers in alphabetical order.
- Blank lines before returns.
* adis16209 (staging cleanup)
- Headers in alphabetical order
- Change some definition names to make them more meaningful (2 rounds
of this).
- Add explicit _REG prefix to register names to make them
obviously different from fields within those registers.
- Remove some superflous comments and group definitions better.
- Use a switch statement to make it semantically obvious that we
only have two options (rather than an unlimited 'else').
- Use sign_extent32 instead of open coding.
* adt7316 (staging cleanup)
- Move an export next to symbol.
* bmc150
- drop redundant __func__ in dynamic debug.
* ccs811
- Rename varaible to better reflect what it does.
* cros_ec
- Reduce sampling frequency before suspending to avoid preventing
suspend.
* dummy
- Correct whitespace in Kconfig.
- Add extra description in Kconfig.
* ds1803
- Remove a VLA which we always know is 2 long.
* hid-sensor-accel
- Replace magic number 0 by IIO_CHAN_INFO_RAW.
* hid-sensor-gyro
- Replace magic number 0 by IIO_CHAN_INFO_RAW.
* hid-sensor-light
- Replace magic number 0 by IIO_CHAN_INFO_RAW.
* hid-sensor-magn
- Replace magic number 0 by IIO_CHAN_INFO_RAW.
* lm3533
- Replace magic number 0 by IIO_CHAN_INFO_RAW
* mlx90632
- Squash a smatch warning - no runtime effect.
* stm32_dfsdm:
- Cleanup the dt bindings.
* sx9500
- Add GPIO ACPI mapping table to behave correctly when firmware
doesn't provide the mapping.
* tsl2x7x (staging cleanup)
- Fix the proximity sensor functionality.
- Remove platform data provided power functions. There are much
better ways to do this these days.
- Introduce some common functions to avoid various repititions.
- Stop using mutex_trylock when mutex_lock and wait a bit is fine.
- Improve error handling in various places.
- Drop some 'Camel case' (which wasn't actually strickly camel case
but was a bit odd.
- Drop some _available sysfs attributes for things that don't exist
(for particular supported parts).
Ioana Radulescu [Fri, 9 Mar 2018 18:40:56 +0000 (12:40 -0600)]
staging: fsl-dpaa2/eth: allow the driver to compile multi-arch
Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
thus allowing this driver to compile on all architectures supported
by the fsl-mc bus driver.
This was compile tested on:
- powerpc (corenet_basic_defconfig, ppc64_defconfig)
- x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
- arm64 (defconfig)
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Fri, 9 Mar 2018 18:40:55 +0000 (12:40 -0600)]
staging: fsl-dpaa2/eth: Use __leXX types where needed
One MC command structure got away with using uXX fields instead
of __leXX. Fix it.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rodrigo Siqueira [Fri, 9 Mar 2018 23:46:25 +0000 (20:46 -0300)]
staging:iio:ad2s1210: Remove old_data from ad2s1210_state
The variable old_data is a bool type, which only receives the value
'true' in the function ad2s1210_config_write and ad2s1210_config_read.
There is no other use for this variable. This patch removes old_data
from the ad2s1210_state and from all the function that use it.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 9 Mar 2018 23:46:05 +0000 (20:46 -0300)]
staging:iio:ad2s1210: Remove unused #define directive
This patch removes some #define directives not used in the code.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rodrigo Siqueira [Fri, 9 Mar 2018 23:45:50 +0000 (20:45 -0300)]
staging:iio:ad2s1210: Remove end of line with '['
This patch fixes the checkpatch.pl check:
iio/resolver/ad2s1210.c:202: CHECK: Lines should not end with a '['
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Lebreux [Thu, 8 Mar 2018 23:56:07 +0000 (18:56 -0500)]
staging:iio:ad7150: Align arguments to match open parenthesis
This fixes the following checkpatch.pl CHECK: Alignment should match
open parenthesis
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Lebreux [Thu, 8 Mar 2018 23:19:04 +0000 (18:19 -0500)]
staging:iio:ad7152: Align arguments to match open parenthesis
This patch fixes checkpatch.pl CHECK for alignment.
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Peter Rosin [Thu, 8 Mar 2018 19:58:30 +0000 (20:58 +0100)]
iio: potentiometer: mcp4018: driver for Microchip digital potentiometers
Add support for Microchip digital potentiometers and rheostats
MCP4017, MCP4018, MCP4019
They all have one wiper with 128 steps and come in 5, 10, 50 and 100 kOhm
variations.
Datasheet: http://www.microchip.com/downloads/en/DeviceDoc/22147a.pdf
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
David Veenstra [Thu, 8 Mar 2018 09:48:13 +0000 (10:48 +0100)]
Staging: iio: ad7746: Adjust arguments to match open parenthesis
This patch clears all checkpatch.pl CHECKS, about alignment not matching
open parenthesis, whenever it is possible without going beyond 80 columns.
Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
David Veenstra [Thu, 8 Mar 2018 09:47:29 +0000 (10:47 +0100)]
Staging: iio: adt7316: Move symbol export to definition
This patch clears the following checkpatch.pl warning:
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
+EXPORT_SYMBOL_GPL(adt7316_pm_ops);
Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Himanshu Jha [Thu, 8 Mar 2018 18:45:33 +0000 (00:15 +0530)]
iio: potentiometer: ds1803: Remove VLA usage
In preparation to enabling -Wvla, remove VLA usage and replace it
with fixed a fixed length array and therefore, prevent potential
stack overflow attacks.
Fixed as a part of the discussion to remove all VLAs from the kernel:
https://lkml.org/lkml/2018/3/7/621
Cc: keescook@chromium.org
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>