[PATCH 4/6] staging:iio:ad2s90: Move device registration to the end of probe

2018-10-25 Thread Matheus Tavares
Previously, devm_iio_device_register was being called before the spi_setup call and the spi_device's max_speed_hz and mode assignments. This could lead to a race condition since the driver was still being set up after it was already made ready to use. To fix it, this patch moves the device registra

[PATCH 5/6] staging:iio:ad2s90: Add IIO_CHAN_INFO_SCALE to channel spec and read_raw

2018-10-25 Thread Matheus Tavares
From: Victor Colombo This patch adds the IIO_CHAN_INFO_SCALE mask to ad2s90_chan and implements the relative read behavior at ad2s90_read_raw. Signed-off-by: Victor Colombo --- drivers/staging/iio/resolver/ad2s90.c | 32 ++- 1 file changed, 22 insertions(+), 10 deletion

[PATCH 3/6] staging:iio:ad2s90: Remove always overwritten assignment

2018-10-25 Thread Matheus Tavares
This patch removes an initial assignment to the variable ret at probe, that was always overwritten. Signed-off-by: Matheus Tavares --- drivers/staging/iio/resolver/ad2s90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/resolver/ad2s90.c b/drivers/stagin

[PATCH 6/6] staging:iio:ad2s90: Check channel type at read_raw

2018-10-25 Thread Matheus Tavares
This patch adds a channel type check at the beginning of the ad2s90_read_raw function. Since ad2s90 has only one channel, it just checks if the given channel is the expected one and if not, return -EINVAL. Signed-off-by: Matheus Tavares --- drivers/staging/iio/resolver/ad2s90.c | 3 +++ 1 file c

[PATCH 1/6] staging:iio:ad2s90: Make read_raw return spi_read's error code

2018-10-25 Thread Matheus Tavares
Previously, when spi_read returned an error code inside ad2s90_read_raw, the code was ignored and IIO_VAL_INT was returned. This patch makes the function return the error code returned by spi_read when it fails. Signed-off-by: Matheus Tavares --- drivers/staging/iio/resolver/ad2s90.c | 9 ++-

[PATCH 2/6] staging:iio:ad2s90: Make probe handle spi_setup failure

2018-10-25 Thread Matheus Tavares
Previously, ad2s90_probe ignored the return code from spi_setup, not handling its possible failure. This patch makes ad2s90_probe check if the code is an error code and, if so, do the following: - Call dev_err with an appropriate error message. - Return the spi_setup's error code, aborting the exe

[PATCH 0/6] staging:iio:ad2s90: Add scale info and improve error handling

2018-10-25 Thread Matheus Tavares
This patch set adds scale info to ad2s90's single channel, improve error handling in it's functions and fix a possible race condition issue. The goal with this patch set is to address the points discussed in the mailing list in an effort to move ad2s90.c out of staging. Matheus Tavares (5): sta

[PATCH v2 1/2] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Renato Lui Geh
The ad7780 driver previously did not read the correct device output, as it read an outdated value set at initialization. It now updates its voltage on read. Signed-off-by: Renato Lui Geh --- drivers/staging/iio/adc/ad7780.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/i

[PATCH v2 2/2] staging: iio: ad7780: fix offset read value

2018-10-25 Thread Renato Lui Geh
Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET. This was fixed by assigning the correct value instead. Signed-off-by: Renato Lui Geh --- drivers/staging/iio/adc/ad7780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7780.c b/

[PATCH v2 0/2] staging: iio: ad7780: correct driver read

2018-10-25 Thread Renato Lui Geh
The purpose of this series is to correct two issues in the driver's raw read function. Changelog: * v2 - separated original patch into two patches (https://marc.info/?l=linux-iio&m=154047435605492) Renato Lui Geh (2): staging: iio: ad7780: update voltage on read staging: iio:

[PATCH 3/4] staging: wilc1000: Don't keep a copy of wiphy parameters in the driver

2018-10-25 Thread Adham.Abozaeid
host_if_drv.cfg_values is a write only member, and can be removed Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 13 - drivers/staging/wilc1000/host_interface.h | 1 - 2 files changed, 14 deletions(-) diff --git a/drivers/staging/wilc1000/host_interfa

[PATCH 1/4] staging: wilc1000: remove unused flags in handle_cfg_param()

2018-10-25 Thread Adham.Abozaeid
handle_cfg_param() receives a bit map that describes what to be changed. Some of these bits flags aren't referred to from elsewhere and can be removed. Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 216 -- drivers/staging/wilc1000/host_interfac

[PATCH 4/4] staging: wilc1000: Remove unused mutex cfg_values_lock

2018-10-25 Thread Adham.Abozaeid
After removing cfg_values member, cfg_values_lock that was used to protect it can also be removed. Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 9 - drivers/staging/wilc1000/host_interface.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/s

[PATCH 2/4] stagign: wilc1000: validate cfg parameters before scheduling the work

2018-10-25 Thread Adham.Abozaeid
Validate cfg parameters after being called by cfg80211 in set_wiphy_params before scheduling the work executed in handle_cfg_param Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 61 ++- .../staging/wilc1000/wilc_wfi_cfgoperations.c | 50

[PATCH 0/4] staging: wilc1000: validate input to set_wiphy_param and return proper errors

2018-10-25 Thread Adham.Abozaeid
Validate input parameters to set_wiphy_param before scheduling handle_cfg_param() to validate them. This way proper errors can be returned to caller. Also cleaned up unused code in handle_cfg_param. Adham Abozaeid (4): staging: wilc1000: remove unused flags in handle_cfg_param() stagign: wilc1

[PATCH 0/2] staging: vboxvideo: Remove chekpatch issues

2018-10-25 Thread Shayenne da Luz Moura
This series cleans the following checkpatch.pl issues: CHECK: Prefer kernel type 'u32' over 'uint32_t' CHECK: Avoid using bool structure members because of possible alignment issues Shayenne da Luz Moura (2): staging: vboxvideo: Change uint32_t to u32 staging: vboxvideo: Use unsigned int inst

Re: [PATCH v4] staging: iio: ad2s1210: Switch to the gpio descriptor interface

2018-10-25 Thread Nishad Kamdar
On Thu, Oct 25, 2018 at 08:43:56AM +0200, Slawomir Stepien wrote: > On paź 24, 2018 20:20, Nishad Kamdar wrote: > > Use the gpiod interface instead of the deprecated old non-descriptor > > interface. > > > > Signed-off-by: Nishad Kamdar > > --- > > Changes in v4: > > - Add spaces after { and bef

Re: [alsa-devel] [PATCH v2] staging: bcm2835-audio: interpolate audio delay

2018-10-25 Thread Kirill Marinushkin
Hello Takashi, Mike, @Takashi On 10/25/18 09:37, Takashi Iwai wrote: > Well, in the API POV, it's nothing wrong to keep hwptr sticking while > updating only delay value. It implies that the hardware chip doesn't > provide the hwptr update. Thank you for the clarification. Modifying `runtime->de

Re: [PATCH] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Lars-Peter Clausen
On 10/25/2018 04:55 PM, Himanshu Jha wrote: > On Thu, Oct 25, 2018 at 11:26:36AM -0300, Renato Lui Geh wrote: >> Hi, >> >> Thanks for the quick review. :) >> >>> But please create one patch per issue and do not put unrelated changes into >>> the same patch. >> >> Should I resend this patch as a pat

[PATCH RFC 10/11] staging: bcm2835-camera: Provide more specific probe error messages

2018-10-25 Thread Stefan Wahren
Currently there is only a catch-all info message which print the relevant error code without any context. So add more specific error messages in order to narrow down possible issues. Signed-off-by: Stefan Wahren --- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 58 +++---

[PATCH RFX 09/11] staging: bcm2835-audio: Drop DT dependency

2018-10-25 Thread Stefan Wahren
Just like the bcm2835-video make this a platform driver which is probed by vchiq. In order to change the number of channels use a module parameter instead, but use the maximum as default. Signed-off-by: Stefan Wahren --- .../staging/vc04_services/bcm2835-audio/bcm2835.c | 41 ++-

[PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration

2018-10-25 Thread Stefan Wahren
In error case platform_device_register_data would return an ERR_PTR instead of NULL. So we better check this before unregistration. Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/int

[PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end

2018-10-25 Thread Stefan Wahren
In order to have this more consistent between the vc04 services move the module information to the end of the file. Signed-off-by: Stefan Wahren --- .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c| 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drive

[PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration

2018-10-25 Thread Stefan Wahren
Since the camera driver isn't probed via DT, we need to properly setup DMA. Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c| 20 +--- 1 file ch

[PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config

2018-10-25 Thread Stefan Wahren
As per default the GPU memory config of the Raspberry Pi isn't sufficient for the camera usage. Even worse the bcm2835 camera driver doesn't provide a helpful error message in this case. So let's add a hint to point the user to the likely cause. Signed-off-by: Stefan Wahren --- drivers/staging/v

[PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading

2018-10-25 Thread Stefan Wahren
In order to make the module bcm2835-camera load automatically, we need to add a module alias. Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.") Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 + 1 file chang

[PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera

2018-10-25 Thread Stefan Wahren
Abort the probing of the camera driver in case there isn't a camera actually connected to the Raspberry Pi. This solution also avoids a NULL ptr dereference of mmal instance on driver unload. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Stefan

[PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload

2018-10-25 Thread Stefan Wahren
This patch series improves the load/unload of bcm2835 camera and audio drivers. It has been tested with Raspberry Pi 3 B and a camera module V1. This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ cache line size handling"). After Nicolas' series ("staging: vc04_servic

[PATCH RFC 08/11] staging: bcm2835-audio: use module_platform_driver() macro

2018-10-25 Thread Stefan Wahren
There is not much value behind this boilerplate, so use module_platform_driver() instead. Signed-off-by: Stefan Wahren --- .../staging/vc04_services/bcm2835-audio/bcm2835.c| 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/staging/vc04_services/b

[PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio

2018-10-25 Thread Stefan Wahren
Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") this register the audio driver as a platform device, too. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 1 file changed, 4 i

[PATCH RFC 07/11] staging: bcm2835-audio: Enable compile test

2018-10-25 Thread Stefan Wahren
Enable the compilation test for bcm2835-audio to gain more build coverage. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/bcm2835-audio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/Kconfig b/drivers/stagi

Re: [PATCH] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Himanshu Jha
On Thu, Oct 25, 2018 at 11:26:36AM -0300, Renato Lui Geh wrote: > Hi, > > Thanks for the quick review. :) > > > But please create one patch per issue and do not put unrelated changes into > > the same patch. > > Should I resend this patch as a patchset containing the two changes? Yes! "One patc

Re: [PATCH] staging: axis-fifo: Fix line over 80 characters error

2018-10-25 Thread Aleksa Zdravkovic
On Wed, Oct 24, 2018 at 11:18:17PM -0700, Joe Perches wrote: > On Thu, 2018-10-25 at 09:05 +0300, Dan Carpenter wrote: > > On Wed, Oct 24, 2018 at 05:05:53PM +0200, Aleksa Zdravkovic wrote: > > > This patch fixes the checkpatch.pl warning: > [] > > > diff --git a/drivers/staging/axis-fifo/axis-fifo

Re: [PATCH] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Renato Lui Geh
Hi, Thanks for the quick review. :) But please create one patch per issue and do not put unrelated changes into the same patch. Should I resend this patch as a patchset containing the two changes? Also your mail client seems to have replaced tabs in the patch with spaces, this means the pat

Re: [bug report] staging: vc04_services: add vchiq_pagelist_info structure

2018-10-25 Thread Michael Zoran
> On Oct 25, 2018, at 8:44 AM, Dan Carpenter wrote: > > Hello Michael Zoran, > > The patch 4807f2c0e684: "staging: vc04_services: add > vchiq_pagelist_info structure" from Nov 7, 2016, leads to the > following static checker warning: > > drivers/staging/vc04_services/interface/vchiq_arm

[bug report] staging: vc04_services: add vchiq_pagelist_info structure

2018-10-25 Thread Dan Carpenter
Hello Michael Zoran, The patch 4807f2c0e684: "staging: vc04_services: add vchiq_pagelist_info structure" from Nov 7, 2016, leads to the following static checker warning: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:440 create_pagelist() warn: overflowed symb

Re: [PATCH] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Lars-Peter Clausen
On 10/25/2018 03:32 PM, Renato Lui Geh wrote: > The ad7780 driver previously did not read the correct device output. > This patch fixes two issues. > > - The driver read an outdated value set at initialization. It now > updates its voltage on read. > - Variable val subtracted an uninitialized valu

[PATCH] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Renato Lui Geh
The ad7780 driver previously did not read the correct device output. This patch fixes two issues. - The driver read an outdated value set at initialization. It now updates its voltage on read. - Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET. This was fixed by assiging the

Re: [alsa-devel] [PATCH v2] staging: bcm2835-audio: interpolate audio delay

2018-10-25 Thread Takashi Iwai
On Thu, 25 Oct 2018 00:02:34 +0200, Kirill Marinushkin wrote: > > >> When you play sound - the pointer increments. > > > > Unfortunately, when you play sound, the pointer does not actually > > increment, for up to about 10 milliseconds. I know of no way to actually > > access the true “live” po

Re: [PATCH] staging: axis-fifo: Fix line over 80 characters error

2018-10-25 Thread Joe Perches
On Thu, 2018-10-25 at 09:05 +0300, Dan Carpenter wrote: > On Wed, Oct 24, 2018 at 05:05:53PM +0200, Aleksa Zdravkovic wrote: > > This patch fixes the checkpatch.pl warning: [] > > diff --git a/drivers/staging/axis-fifo/axis-fifo.c > > b/drivers/staging/axis-fifo/axis-fifo.c [] > > @@ -482,10 +482,