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

2018-10-26 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

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

2018-10-26 Thread Matheus Tavares
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 Signed-off-by: Matheus Tavares --- drivers/staging/iio/resolver/ad2s90.c | 32 ++- 1 file changed, 22 insertions(+),

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

2018-10-26 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 v2 4/6] staging:iio:ad2s90: Move device registration to the end of probe

2018-10-26 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

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

2018-10-26 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

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

2018-10-26 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

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

2018-10-26 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. Changes in v2: - Added

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

2018-10-26 Thread Adham.Abozaeid
On 10/26/18 2:36 AM, Dan Carpenter wrote: > On Thu, Oct 25, 2018 at 09:11:00PM +, adham.aboza...@microchip.com wrote: > > You'll need to resend these because your email from header is in the > wrong format. Also there is a typo in the subject. s/stagign/staging/. > Apologies Dan for that!

Re: [Outreachy kernel] [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-26 Thread Julia Lawall
[Adding Joe Perches] On Fri, 26 Oct 2018, Sasha Levin wrote: > On Fri, Oct 26, 2018 at 04:04:45PM -0300, Shayenne da Luz Moura wrote: > > This change was suggested by checkpath.pl. Use unsigned int with bitfield > > allocate only one bit to the boolean variable. > > > > CHECK: Avoid using bool

Re: [Outreachy kernel] [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-26 Thread Sasha Levin
On Fri, Oct 26, 2018 at 04:04:45PM -0300, Shayenne da Luz Moura wrote: This change was suggested by checkpath.pl. Use unsigned int with bitfield allocate only one bit to the boolean variable. CHECK: Avoid using bool structure members because of possible alignment issues Signed-off-by: Shayenne

[RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-26 Thread Shayenne da Luz Moura
This change was suggested by checkpath.pl. Use unsigned int with bitfield allocate only one bit to the boolean variable. CHECK: Avoid using bool structure members because of possible alignment issues Signed-off-by: Shayenne da Luz Moura --- drivers/staging/vboxvideo/vbox_drv.h| 14

[RESEND PATCH 1/2] staging: vboxvideo: Change uint32_t to u32

2018-10-26 Thread Shayenne da Luz Moura
This change was suggested by checkpath.pl. CHECK: Prefer kernel type 'u32' over 'uint32_t' Signed-off-by: Shayenne da Luz Moura --- drivers/staging/vboxvideo/vbox_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vboxvideo/vbox_mode.c

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

2018-10-26 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

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

2018-10-26 Thread Matheus Tavares Bernardino
On Fri, Oct 26, 2018 at 7:04 AM Dan Carpenter wrote: > > On Thu, Oct 25, 2018 at 09:45:11PM -0300, Matheus Tavares wrote: > > 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. > > > >

Re: [PATCH 0/7] staging: vc04_services: Some dead code removal

2018-10-26 Thread Dave Stevenson
On Thu, 18 Oct 2018 at 10:38, Stefan Wahren wrote: > > Am 18.10.2018 um 11:22 schrieb Dave Stevenson: > > On Wed, 17 Oct 2018 at 17:51, Peter Robinson wrote: > >> Drop various pieces of dead code from here and there to get rid of > >> the remaining users of VCHI_CONNECTION_T. After that

Re: [PATCH] binder: ipc namespace support for android binder

2018-10-26 Thread Todd Kjos
On Fri, Oct 26, 2018 at 2:20 AM chouryzhou(周威) wrote: > > Hi > We are working for running android in container, but we found that binder is > not isolated by ipc namespace. Since binder is a form of IPC and therefore > should > be tied to ipc namespace. With this patch, we can run more than

[RESEND PATCH] staging: mt7621-pci: dt-bindings: add dt bindings for mt7621 pcie controller

2018-10-26 Thread Sergio Paracuellos
This commit adds pci device tree bindings for the Mt7621 pci controller. This is a temporal file included in staging driver directory and will be moved to its correct location when this driver gets out of staging. Cc: Rob Herring Signed-off-by: Sergio Paracuellos --- I resend this because I

[PATCH v5 2/2] staging: iio: ad2s1210: Add device tree support.

2018-10-26 Thread Nishad Kamdar
Add device tree table for matching vendor ID and support for retrieving platform data from device tree. Signed-off-by: Nishad Kamdar --- drivers/staging/iio/resolver/ad2s1210.c | 43 - 1 file changed, 42 insertions(+), 1 deletion(-) diff --git

[PATCH v5 0/2] staging: iio: ad2s1210: Switch to the gpio descriptor interface.

2018-10-26 Thread Nishad Kamdar
Use the gpiod interface instead of the deprecated old non-descriptor Changes in v5: - Add device tree support. - Add device tree table for matching vendor ID. - Add Support for retrieving platform data from device tree. Changes in v4: - Add spaces after { and before } in gpios[]

[PATCH RFC 16/18] staging: vchiq_arm: rework probe and init functions

2018-10-26 Thread Nicolas Saenz Julienne
Some operations performed in the probe function should have been implemented in the init function. Namely class and dev region creations. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 71 --- 1 file changed, 45 insertions(+), 26

[PATCH RFC 15/18] stagning: vchiq_core: fix logic redundancy in parse_open

2018-10-26 Thread Nicolas Saenz Julienne
We update sync to reflect that the firmware version is compatible with that option. We don't need to check both of them again further down the code. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 +--- 1 file changed, 1 insertion(+),

[PATCH RFC 13/18] staging: vchiq_core: use completions instead of semaphores

2018-10-26 Thread Nicolas Saenz Julienne
It is preferred in the kernel to avoid using semaphores to wait for events as, they are optimised for the opposite situation; where the common case is that they are available and may block only occasionally. FYI see this thread: https://lkml.org/lkml/2008/4/11/323. Also completions are

[PATCH RFC 17/18] staging: vchiq_arm: fix open/release cdev functions

2018-10-26 Thread Nicolas Saenz Julienne
Both functions checked the minor number of the cdev prior running the code. This was useless since the number of devices is already limited by alloc_chrdev_region. This removes the check and reindents the code where relevant. Signed-off-by: Nicolas Saenz Julienne ---

[PATCH RFC 18/18] staging: vchiq: add more tasks to the TODO list

2018-10-26 Thread Nicolas Saenz Julienne
The more the better. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/TODO | 46 ++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/TODO

[PATCH RFC 11/18] staging: vchiq_arm: use completions instead of semaphores

2018-10-26 Thread Nicolas Saenz Julienne
It is preferred in the kernel to avoid using semaphores to wait for events, as they are optimised for the opposite situation; where the common case is that they are available and may block only occasionally. FYI see this thread: https://lkml.org/lkml/2008/4/11/323. Also completions are

[PATCH RFC 07/18] staging: vchiq-core: get rid of is_master distinction

2018-10-26 Thread Nicolas Saenz Julienne
VCHIQ bulk transfers are what most people call DMA transfers. The CPU sends a list of physical addresses to the VideoCore which then access the memory directly without the need for CPU interaction. With this setup we call the CPU the "slave" and the VideoCore the "master". There seems to be an

[PATCH RFC 06/18] staging: vchiq_arm: rework vchiq_ioc_copy_element_data

2018-10-26 Thread Nicolas Saenz Julienne
The function is passed to vchiq_core.c for it to go trough all the transfer elements (an array of pointers to data) and copy them into the actual transfer memory (contiguous memory). The logic in the function was "copy an element and return, except when the element is empty, in which case look

[PATCH RFC 08/18] staging: vchiq_core: remove unnecessary safety checks in vchiq_init_state

2018-10-26 Thread Nicolas Saenz Julienne
vchiq_init_state() checks the initial contents of slot_zero are correct. These are set in vchiq_init_slots(), using the same hard-coded defaults as the checks. Both functions are called sequentially and Video Core isn't yet aware of the slot's address. There is no way the contents of slot_zero

[PATCH RFC 01/18] staging: vchiq_core: rework vchiq_get_config

2018-10-26 Thread Nicolas Saenz Julienne
The function is overly complicated for what it's ultimately achieving. It's simply filling up a structure. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 12 .../interface/vchiq_arm/vchiq_core.c | 30 +--

[PATCH RFC 10/18] staging: vchiq_core: don't add a wmb() before remote_event_signal()

2018-10-26 Thread Nicolas Saenz Julienne
It's the first thing remote_event_signal() does. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

[PATCH RFC 00/18] staging: vchiq: remove dead code & misc fixes

2018-10-26 Thread Nicolas Saenz Julienne
Hi All, This series was written in parallel with reading and understanding the vchiq code. So excuse me for the lack of logic in the sequence of patches. It's an RFC for various reasons, first I think it's going to clash with the last Stefan's series. Also I'm not used to doing big series. The

[PATCH RFC 04/18] stagning: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list

2018-10-26 Thread Nicolas Saenz Julienne
The resulting code is way more readeable and intuitive compared to plain list_for_each. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 52 ++- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git

[PATCH RFC 03/18] staging: vchiq_shim: delete vchi_service_create

2018-10-26 Thread Nicolas Saenz Julienne
No one is using the API neither in the actual staging tree nor in the downstream tree (https://github.com/raspberrypi/linux). Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 5 --- .../interface/vchiq_arm/vchiq_shim.c | 32 ---

[PATCH RFC 02/18] staging: vchiq_arm: rework close/remove_service IOCTLS

2018-10-26 Thread Nicolas Saenz Julienne
The implementation of both IOCTLS was the same except for one function call. This joins both implementations and updates the code to avoid unneeded indentations. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 66 +++ 1 file changed, 24

[PATCH RFC 14/18] staging: vchiq_util: get rid of unneeded memory barriers

2018-10-26 Thread Nicolas Saenz Julienne
All the memory operations featured in this file modify/access memory that is only accessed by the CPU. So we can assume that all the memory barrier handling done by the completion routines is good enough for us. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_util.c

[PATCH RFC 09/18] staging: vchiq_core: do not initialize semaphores twice

2018-10-26 Thread Nicolas Saenz Julienne
vchiq_init_state() initialises a series of semaphores to then call remote_event_create() on the same semaphores, which initializes them again. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 - 1 file changed, 5 deletions(-) diff

[PATCH RFC 05/18] staging: vchiq_arm: get rid of vchi_mh.h

2018-10-26 Thread Nicolas Saenz Julienne
The concept of VCHI_MEM_HANDLE_T is introduced by this header file and was meant to be used with bulk transfers. After a quick look in vchiq_core.c it is pretty clear that it actually accomplishes nothing nor alters the bulk transfers in any way. Signed-off-by: Nicolas Saenz Julienne ---

[PATCH RFC 12/18] staging: vchiq_util: use completions instead of semaphores

2018-10-26 Thread Nicolas Saenz Julienne
It is preferred in the kernel to avoid using semaphores to wait for events, as they are optimised for the opposite situation; where the common case is that they are available and may block only occasionally. FYI see this thread: https://lkml.org/lkml/2008/4/11/323. Also completions are

[PATCH v5 1/2] staging: iio: ad2s1210: Switch to the gpio descriptor interface

2018-10-26 Thread Nishad Kamdar
Use the gpiod interface instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar --- Changes in v4: - Add spaces after { and before } in gpios[] initialization. - Check the correct pointer for error. - Align the dev_err msg to existing format in the code.

Re: [PATCH v2] staging: vboxvideo: Remove unnecessary parentheses

2018-10-26 Thread Hans de Goede
Hi, On 23-10-18 19:43, Shayenne da Luz Moura wrote: Remove unneeded parentheses around the arguments of ||. This reduces clutter and code behave in the same way. Change suggested by checkpatch.pl. vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].x2 < crtc->x' Signed-off-by:

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

2018-10-26 Thread Nicolas Saenz Julienne
Hi Stefan, On Thu, 2018-10-25 at 17:29 +0200, Stefan Wahren wrote: > 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 >

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

2018-10-26 Thread Nicolas Saenz Julienne
On Thu, 2018-10-25 at 17:29 +0200, Stefan Wahren wrote: > 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

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

2018-10-26 Thread Hans de Goede
Hi, On 25-10-18 21:40, Shayenne da Luz Moura wrote: 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

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

2018-10-26 Thread Dan Carpenter
On Thu, Oct 25, 2018 at 09:45:11PM -0300, Matheus Tavares wrote: > 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 > --- You should be adding your S-o-B here

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

2018-10-26 Thread Dan Carpenter
On Thu, Oct 25, 2018 at 09:11:00PM +, adham.aboza...@microchip.com wrote: You'll need to resend these because your email from header is in the wrong format. Also there is a typo in the subject. s/stagign/staging/. regards, dan carpenter ___

[PATCH] binder: ipc namespace support for android binder

2018-10-26 Thread 周威
Hi We are working for running android in container, but we found that binder is not isolated by ipc namespace. Since binder is a form of IPC and therefore should be tied to ipc namespace. With this patch, we can run more than one android container on one host. This patch move "binder_procs"

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

2018-10-26 Thread Dan Carpenter
On Fri, Oct 26, 2018 at 11:09:31AM +0300, Dan Carpenter wrote: > On Thu, Oct 25, 2018 at 05:29:30PM +0200, Stefan Wahren wrote: > > Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a > > platform device for the camera driver.") this register the audio driver as > > a platform

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

2018-10-26 Thread Dan Carpenter
On Thu, Oct 25, 2018 at 05:29:30PM +0200, Stefan Wahren wrote: > 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 > --- >

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

2018-10-26 Thread Dan Carpenter
On Thu, Oct 25, 2018 at 05:29:28PM +0200, Stefan Wahren wrote: > 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