[PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-12-06 Thread Rodrigo Carvalho
This patch add device tree binding documentation for ADIS16240. Signed-off-by: Rodrigo Carvalho --- V6: - Update SPDX license identifier .../bindings/iio/accel/adi,adis16240.yaml | 49 +++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v6 1/2] staging: iio: accel: adis16240: enforce SPI mode on probe function

2019-12-06 Thread Rodrigo Carvalho
According to the datasheet, this driver supports only SPI mode 3, so we should enforce it on probe function. Signed-off-by: Rodrigo Carvalho --- V6: -none drivers/staging/iio/accel/adis16240.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/iio/accel/adis16240.c b

[PATCH v5 1/2] staging: iio: accel: adis16240: enforce SPI mode on probe function

2019-11-23 Thread Rodrigo Carvalho
According to the datasheet, this driver supports only SPI mode 3, so we should enforce it and call spi_setup() on probe function. Signed-off-by: Rodrigo Ribeiro Carvalho --- V5: - Add this patch to the patchset drivers/staging/iio/accel/adis16240.c | 7 +++ 1 file changed, 7 insertions

[PATCH v5 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-11-23 Thread Rodrigo Carvalho
This patch add device tree binding documentation for ADIS16240. Signed-off-by: Rodrigo Ribeiro Carvalho --- V5: - None .../bindings/iio/accel/adi,adis16240.yaml | 49 +++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/accel

[PATCH v4] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-11-22 Thread Rodrigo Carvalho
This patch add device tree binding documentation for ADIS16240. Signed-off-by: Rodrigo Ribeiro Carvalho --- V4: - Remove spi-cpha and spi-cpol in binding example, since this driver supports only one timing mode. .../bindings/iio/accel/adi,adis16240.yaml | 49 +++ 1 file

[PATCH v3] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-10-31 Thread Rodrigo Carvalho
This patch add device tree binding documentation for ADIS16240. Signed-off-by: Rodrigo Ribeiro Carvalho --- V3: - Remove spi-cpol and spi-cpha field. They don't seem necessary .../bindings/iio/accel/adi,adis16240.yaml | 51 +++ 1 file changed, 51 insertions(+) c

[PATCH v2] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-09-12 Thread Rodrigo Carvalho
This patch add device tree binding documentation for ADIS16240. Signed-off-by: Rodrigo Ribeiro Carvalho --- V2: - Remove true constant for spi-cpha and spi-cpol - Add description field for spi-cpha and spi-cpol - Add maxItems field for spi-cpha and spi-cpol .../bindings/iio/accel/adi

[PATCH v2] staging: iio: accel: adis16240: Improve readability on write_raw function

2019-08-13 Thread Rodrigo Ribeiro
Replace shift and minus operation by GENMASK macro and remove the local variables used to store intermediate data. Signed-off-by: Rodrigo Ribeiro Carvalho --- v2: - Leave switch statement instead of replace by if statement drivers/staging/iio/accel/adis16240.c | 5 + 1 file changed, 1

Re: [PATCH] staging: iio: accel: adis16240: Improve readability on write_raw function

2019-08-11 Thread Rodrigo Ribeiro
Em dom, 11 de ago de 2019 às 05:43, Jonathan Cameron escreveu: > > On Sat, 10 Aug 2019 12:00:58 -0300 > Rodrigo wrote: > > > From: Rodrigo Carvalho > > > > Improve readability by using GENMASK macro, changing switch statement > > by if statement and removin

[PATCH] staging: iio: accel: adis16240: Improve readability on write_raw function

2019-08-10 Thread Rodrigo
From: Rodrigo Carvalho Improve readability by using GENMASK macro, changing switch statement by if statement and removing unnecessary local variables. Signed-off-by: Rodrigo Ribeiro Carvalho --- drivers/staging/iio/accel/adis16240.c | 16 +++- 1 file changed, 7 insertions(+), 9

Re: [PATCH v2 06/34] drm/i915: convert put_page() to put_user_page*()

2019-08-05 Thread Rodrigo Vivi
their APIs. Later, i915_gem_userptr_put_pages() > can be simplified to use put_user_pages_dirty_lock(). Thanks for that. with this version we won't have any conflict. Ack for going through mm tree. > > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi >

[PATCH] staging: iio: adis16240: add of_match_table entry

2019-05-23 Thread Rodrigo Ribeiro
This patch adds of_match_table entry in device driver in order to enable spi fallback probing. Signed-off-by: Rodrigo Ribeiro Reviewed-by: Marcelo Schmitt --- drivers/staging/iio/accel/adis16240.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/iio/accel/adis16240.c b

Re: [PATCH] staging:iio:ad7152: Rename misspelled RESEVERD -> RESERVED

2019-02-18 Thread Rodrigo Ribeiro
Em seg, 18 de fev de 2019 às 11:46, Jonathan Cameron escreveu: > > On Thu, 14 Feb 2019 10:51:49 + > "Popa, Stefan Serban" wrote: > > > On Mi, 2019-02-13 at 22:25 -0200, Rodrigo Ribeiro wrote: > > > [External] > > > > > > > > > E

Re: [PATCH] staging:iio:ad7152: Rename misspelled RESEVERD -> RESERVED

2019-01-25 Thread Rodrigo Ribeiro
Em sex, 25 de jan de 2019 às 21:46, Rodrigo Ribeiro escreveu: > > Em sex, 25 de jan de 2019 às 06:20, Alexandru Ardelean > escreveu: > > > > On Thu, Jan 24, 2019 at 9:35 PM Rodrigo Ribeiro > > wrote: > > > > > > Remove the checkpatch.pl check: &g

Re: [PATCH] staging:iio:ad7152: Rename misspelled RESEVERD -> RESERVED

2019-01-25 Thread Rodrigo Ribeiro
Em sex, 25 de jan de 2019 às 06:20, Alexandru Ardelean escreveu: > > On Thu, Jan 24, 2019 at 9:35 PM Rodrigo Ribeiro wrote: > > > > Remove the checkpatch.pl check: > > > > CHECK: 'RESEVERD' may be misspelled - perhaps 'RESERVED'? > > Hey

[PATCH] staging:iio:ad7152: Rename misspelled RESEVERD -> RESERVED

2019-01-24 Thread Rodrigo Ribeiro
Remove the checkpatch.pl check: CHECK: 'RESEVERD' may be misspelled - perhaps 'RESERVED'? Signed-off-by: Rodrigo Ribeiro Signed-off-by: Rafael Tsuha --- This macro is not used anywhere. Should we just correct the spelling or remove the macro? drivers/staging/iio/cdc/ad7

Re: [PATCH] staging: iio: ad5933: finalized device-tree support

2018-11-23 Thread Rodrigo Siqueira
om. > To view this discussion on the web visit > https://groups.google.com/d/msgid/kernel-usp/20181123235159.hh43xnvvwsil4on2%40smtp.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- Rodrigo Siqueira https://siqueira.tech https://twitter.com/siqueirajordao

Re: [PATCH 0/3] stagging:iio:meter: Add essential IIO API structures for ADE7854

2018-04-23 Thread Rodrigo Siqueira
Hi Jonathan, Thanks for all the feedbacks and sorry for some basic mistakes, I will work on the second version based on all your comments. Best Regards Rodrigo Siqueira On 04/21, Jonathan Cameron wrote: > On Sat, 21 Apr 2018 08:54:45 -0300 > Rodrigo Siqueira wrote: > > > This p

[PATCH 3/3] stagging:iio:meter: Add ade7854_write_raw function

2018-04-21 Thread Rodrigo Siqueira
: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854.c | 60 - 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/drivers/staging/iio/meter/ade7854.c b/drivers/staging/iio/meter/ade7854.c index 242ecde75900..df19c8b4b5d7 100644 --- a/drivers/staging/iio

[PATCH 2/3] stagging:iio:meter: Add ade7854_read_raw function

2018-04-21 Thread Rodrigo Siqueira
disables the old approach for reading data. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854.c | 41 - 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/drivers/staging/iio/meter/ade7854.c b/drivers/staging/iio/meter/ade7854.c index

[PATCH 1/3] stagging:iio:meter: Add iio_chan_spec

2018-04-21 Thread Rodrigo Siqueira
This patch adds iio_chan_spec struct. Additionally, the channel adds the support for handling AIGAIN, BIGAIN, CIGAIN, NIGAIN, AVGAIN, BVGAIN, and CVGAIN. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854.c | 42 + 1 file changed, 42 insertions

[PATCH 0/3] stagging:iio:meter: Add essential IIO API structures for ADE7854

2018-04-21 Thread Rodrigo Siqueira
the write_raw function and remove the attributes used for handling the seven registers. This patchset has the contribution of John Syne, which was responsible for mapping the correct ABI name per element in the ADE7854; additionally, John provided codes that helped to shape these patches. Rodrigo

[PATCH v3 8/8] staging:iio:ade7854: Remove read_reg_* duplications

2018-03-23 Thread Rodrigo Siqueira
areas that calling the old interface by the new one. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Update commit message drivers/staging/iio/meter/ade7854-i2c.c | 33 +-- drivers/staging/iio/meter/ade7854-spi.c | 35 ++--- drivers

[PATCH v3 6/8] staging:iio:ade7854: Rework I2C read function

2018-03-23 Thread Rodrigo Siqueira
the things simple and working this patch maintain legacy interface. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Remove the use of defines that not improve the readability - Replace variable name "bytes" for "bits" - Update commit message drivers/staging/iio/meter

[PATCH v3 7/8] staging:iio:ade7854: Rework SPI read function

2018-03-23 Thread Rodrigo Siqueira
Rework read SPI function to reduce the code duplication and centralizes all the task in a single function. Signed-off-by: Rodrigo Siqueira --- Changes in v3: - Remove the use of defines that not improve the readability - Replace variable name "bytes" for "bits" - U

[PATCH v3 5/8] staging:iio:ade7854: Remove write_reg_* duplications

2018-03-23 Thread Rodrigo Siqueira
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 --- Changes in v3: - Update commit

[PATCH v3 4/8] staging:iio:ade7854: Rework SPI write function

2018-03-23 Thread Rodrigo Siqueira
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 --- Changes in v3: - Remove the use of defines that not

[PATCH v3 3/8] staging:iio:ade7854: Rework I2C write function

2018-03-23 Thread Rodrigo Siqueira
, 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 --- Changes in v3: - Remove the use of defines that not improve the readability - Replace variable name "bytes" for "bits"

[PATCH v3 0/8] Cleanup on I2C/SPI code

2018-03-23 Thread Rodrigo Siqueira
larifications related to authorship. - Adds 'fixes' tag on the first two patches message. - Removes unnecessary defines. - Updates commit messages to better describe changes. John Syne (2): staging:iio:ade7854: Fix error handling on read/write staging:iio:ade7854: Fix the wrong number o

Re: [PATCH v2 1/8] staging:iio:ade7854: Fix error handling on read/write

2018-03-19 Thread Rodrigo Siqueira
On 03/18, Jonathan Cameron wrote: > On Fri, 16 Mar 2018 19:48:33 -0300 > Rodrigo Siqueira wrote: > > > 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 function

Re: [PATCH v2 1/3] staging:iio:ad2s1210: Add channel for fclkin and fexcit

2018-03-19 Thread Rodrigo Siqueira
Hi, On 03/17, Jonathan Cameron wrote: > On Tue, 13 Mar 2018 13:05:28 -0300 > Rodrigo Siqueira wrote: > > > The ad2s1210 does not contain any channel for the fclkin and fexcit. As > > a result, it uses IIO_DEVICE_ATTR to expose this information. This patch > > adds

[PATCH v2 6/8] staging:iio:ade7854: Rework I2C read function

2018-03-16 Thread Rodrigo Siqueira
32 bits as pointed by John Syne patches. 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 Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854

[PATCH v2 8/8] staging:iio:ade7854: Remove read_reg_* duplications

2018-03-16 Thread Rodrigo Siqueira
areas that calling the old interface by the new one. During the update for use a single function, some errors handlings were updated based on the John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854-i2c.c | 37

[PATCH v2 7/8] staging:iio:ade7854: Rework SPI read function

2018-03-16 Thread Rodrigo Siqueira
Rework read SPI function to reduce the code duplication and centralizes all the task in a single function. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-spi.c | 140 +--- 1 file changed, 37 insertions(+), 103 deletions(-) diff --git a/drivers

[PATCH v2 5/8] staging:iio:ade7854: Replace many functions for one function

2018-03-16 Thread Rodrigo Siqueira
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 --- drivers/staging/iio/meter

[PATCH v2 4/8] staging:iio:ade7854: Rework SPI write function

2018-03-16 Thread Rodrigo Siqueira
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 --- drivers/staging/iio/meter/ade7854-spi.c | 108

[PATCH v2 2/8] staging:iio:ade7854: Fix the wrong number of bits to read

2018-03-16 Thread Rodrigo Siqueira
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. Finally, this patch is based on John Syne patches. Signed-off-by: Rodrigo Siqueira

[PATCH v2 3/8] staging:iio:ade7854: Rework I2C write function

2018-03-16 Thread Rodrigo Siqueira
, 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 --- drivers/staging/iio/meter/ade7854-i2c.c | 96 - drivers/staging/iio/meter/ade7854.h | 7 +++ 2 files

[PATCH v2 1/8] staging:iio:ade7854: Fix error handling on read/write

2018-03-16 Thread Rodrigo Siqueira
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. This patch is an adaptation of the John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers

[PATCH v2 0/8] staging:iio:ade7854: Cleanup on I2C/SPI code

2018-03-16 Thread Rodrigo Siqueira
s two commits at the beginning of the patchset. First, fixes bugs related to wrong verification in read/write I2C operations. Second, adjust the incorrect amount of data read. - Removes unnecessary code in read/write functions for SPI and I2C during the rework. Rodrig

Re: [PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-16 Thread Rodrigo Siqueira
On 03/16, Dan Carpenter wrote: > Generally, it's better to fix the bug in the existing code, and then > do the cleanup later. That way the fixes can be backported to stable > kernels more easily. Hummm... the backport argue make a lot of sense for me. I will generate a v2 with the bug fixes in th

Re: [PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-16 Thread Rodrigo Siqueira
On 03/16, Dan Carpenter wrote: > You're right that there is a bug but this is not the right fix. > > The ade7854_i2c_write_reg_32() function returns 6 on success which makes > no sense. It should be zero or negative error codes. All the write_reg > functions in drivers/staging/iio/meter/ade7854-

Re: [PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-15 Thread Rodrigo Siqueira
On 03/15, Dan Carpenter wrote: > On Wed, Mar 14, 2018 at 03:12:18PM -0300, Rodrigo Siqueira wrote: > > There is some improper error handling for IRQ and device register. This > > patch adds a proper verification. The IRQ correction was extracted from > > John Syne patches. &

Re: [PATCH 1/7] staging:iio:ade7854: Rework I2C write function

2018-03-15 Thread Rodrigo Siqueira
Hi, I will fixes all of these things here and in the other patches and send a v2. Thanks for the review. On 03/15, Dan Carpenter wrote: > On Wed, Mar 14, 2018 at 03:10:18PM -0300, Rodrigo Siqueira wrote: > > The write operation using I2C has many code duplications and four >

[PATCH 7/7] staging:iio:ade7854: Add proper error handling condition

2018-03-14 Thread Rodrigo Siqueira
There is some improper error handling for IRQ and device register. This patch adds a proper verification. The IRQ correction was extracted from John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854.c | 4 ++-- 1 file changed, 2

[PATCH 6/7] staging:iio:ade7854: Remove read_reg_* duplications

2018-03-14 Thread Rodrigo Siqueira
areas that calling the old interface by the new one. During the update for use a single function, some errors handlings were updated based on the John Syne patches. Signed-off-by: Rodrigo Siqueira Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854-i2c.c | 53

[PATCH 5/7] staging:iio:ade7854: Rework SPI read function

2018-03-14 Thread Rodrigo Siqueira
Rework read SPI function to reduce the code duplication and centralizes all the task in a single function. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7854-spi.c | 132 ++-- 1 file changed, 41 insertions(+), 91 deletions(-) diff --git a/drivers

[PATCH 2/7] staging:iio:ade7854: Rework SPI write function

2018-03-14 Thread Rodrigo Siqueira
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 --- drivers/staging/iio/meter/ade7854-spi.c | 100

[PATCH 3/7] staging:iio:ade7854: Replace many functions for one function

2018-03-14 Thread Rodrigo Siqueira
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 --- drivers/staging/iio/meter

[PATCH 4/7] staging:iio:ade7854: Rework I2C read function

2018-03-14 Thread Rodrigo Siqueira
32 bits as pointed by John Syne patches. 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 Signed-off-by: John Syne --- drivers/staging/iio/meter/ade7854

[PATCH 1/7] staging:iio:ade7854: Rework I2C write function

2018-03-14 Thread Rodrigo Siqueira
, 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 --- drivers/staging/iio/meter/ade7854-i2c.c | 89 +++-- drivers/staging/iio/meter/ade7854.h | 7 +++ 2 files

[PATCH 0/7] staging:iio:ade7854: Cleanup on I2C/SPI code

2018-03-14 Thread Rodrigo Siqueira
g and interest to help to update the code [1]. As a result, this patchset represents the first work effort to update the meter module in the staging. 1 - https://marc.info/?l=linux-iio&m=152046885922153&w=2 Rodrigo Siqueira (7): staging:iio:ade7854: Rework I2C write function stagin

[PATCH v2 3/3] staging:iio:ad2s1210: Add write_raw to handle frequency

2018-03-13 Thread Rodrigo Siqueira
The write interface of AD2S1210 utilizes IIO_DEVICE_ATTR, which violate the official IIO ABI. This patch, add the write_raw function responsible for handling the fclkin and fexcit channel; also it removes the use of IIO_DEVICE_ATTR for fclkin and fexcit. Signed-off-by: Rodrigo Siqueira

[PATCH v2 2/3] staging:iio:ad2s1210: Add frequency handler in read_raw

2018-03-13 Thread Rodrigo Siqueira
Read data from fclkin and fexcit does not utilize the ad2s1210_read_raw function. This patch, append the required handler in the ad2s1210_read_raw to return the correct value. Also, this patch removes the legacy code related to the read function Signed-off-by: Rodrigo Siqueira --- drivers

[PATCH v2 1/3] staging:iio:ad2s1210: Add channel for fclkin and fexcit

2018-03-13 Thread Rodrigo Siqueira
The ad2s1210 does not contain any channel for the fclkin and fexcit. As a result, it uses IIO_DEVICE_ATTR to expose this information. This patch adds one channel for fclkin and another for fexcit. It also adds an enum to easily address the correct channel. Signed-off-by: Rodrigo Siqueira

[PATCH v2 0/3] staging:iio:ad2s1210: Rework read/write operation for fclkin and fexin

2018-03-13 Thread Rodrigo Siqueira
label. Rodrigo Siqueira (3): staging:iio:ad2s1210: Add channel for fclkin and fexcit staging:iio:ad2s1210: Add frequency handler in read_raw staging:iio:ad2s1210: Add write_raw to handle frequency drivers/staging/iio/resolver/ad2s1210.c | 191 +++- 1 file changed

Re: [PATCH 3/3] staging:iio:ad2s1210: Add write_raw to handle frequency

2018-03-13 Thread Rodrigo Siqueira
On 03/13, Dan Carpenter wrote: > On Tue, Mar 13, 2018 at 10:06:29AM -0300, Rodrigo Siqueira wrote: > > On 03/13, Dan Carpenter wrote: > > > > > Ah... I see why you did the ERROR_MESSAGE define, to get around the 80 > > > character limit. Don't do that.

Re: [PATCH 3/3] staging:iio:ad2s1210: Add write_raw to handle frequency

2018-03-13 Thread Rodrigo Siqueira
On 03/13, Dan Carpenter wrote: > On Mon, Mar 12, 2018 at 03:21:52PM -0300, Rodrigo Siqueira wrote: > > The write interface of AD2S1210 utilizes IIO_DEVICE_ATTR, which violate > > the official IIO ABI. This patch, add the write_raw function responsible > > for handling the fclk

[PATCH 3/3] staging:iio:ad2s1210: Add write_raw to handle frequency

2018-03-12 Thread Rodrigo Siqueira
The write interface of AD2S1210 utilizes IIO_DEVICE_ATTR, which violate the official IIO ABI. This patch, add the write_raw function responsible for handling the fclkin and fexcit channel; also it removes the use of IIO_DEVICE_ATTR for fclkin and fexcit. Signed-off-by: Rodrigo Siqueira

[PATCH 1/3] staging:iio:ad2s1210: Add channel for fclkin and fexcit

2018-03-12 Thread Rodrigo Siqueira
The ad2s1210 does not contain any channel for the fclkin and fexcit. As a result, it uses IIO_DEVICE_ATTR to expose this information. This patch adds one channel for fclkin and another for fexcit. It also adds an enum to easily address the correct channel. Signed-off-by: Rodrigo Siqueira

[PATCH 0/3] staging:iio:ad2s1210: Rework read/write operation for fclkin and fexin

2018-03-12 Thread Rodrigo Siqueira
, this patchset uses parts of the original code for handling frequency configuration as an attempt to avoid problems. Rodrigo Siqueira (3): staging:iio:ad2s1210: Add channel for fclkin and fexcit staging:iio:ad2s1210: Add frequency handler in read_raw staging:iio:ad2s1210: Add write_raw to

[PATCH 2/3] staging:iio:ad2s1210: Add frequency handler in read_raw

2018-03-12 Thread Rodrigo Siqueira
Read data from fclkin and fexcit does not utilize the ad2s1210_read_raw function. This patch, append the required handler in the ad2s1210_read_raw to return the correct value. Also, this patch removes the legacy code related to the read function Signed-off-by: Rodrigo Siqueira --- drivers

Re: [PATCH 4/4] staging:iio:ad2s1210: Add comments/documentation

2018-03-12 Thread Rodrigo Siqueira
On 03/10, Jonathan Cameron wrote: > On Fri, 9 Mar 2018 20:46:40 -0300 > Rodrigo Siqueira wrote: > > > The original code of AD2S1210 does not have documentation for structs > > and register configurations; this difficult the code comprehension. This > > patch adds str

[PATCH 4/4] staging:iio:ad2s1210: Add comments/documentation

2018-03-09 Thread Rodrigo Siqueira
. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/resolver/ad2s1210.c | 32 drivers/staging/iio/resolver/ad2s1210.h | 9 - 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio

[PATCH 2/4] staging:iio:ad2s1210: Remove unused #define directive

2018-03-09 Thread Rodrigo Siqueira
This patch removes some #define directives not used in the code. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/resolver/ad2s1210.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index

[PATCH 3/4] staging:iio:ad2s1210: Remove old_data from ad2s1210_state

2018-03-09 Thread Rodrigo Siqueira
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-b

[PATCH 0/4] staging:iio:ad2s1210: Driver cleanup

2018-03-09 Thread Rodrigo Siqueira
This patchset removes some unused #define directive and variables. Additionally, it fixes two checkpatch problems. Finally, the last patch adds struct documentation and comments to some part of the code. All of the changes have the intention to improve the readability of new updates. Rodrigo

[PATCH 1/4] staging:iio:ad2s1210: Remove end of line with '['

2018-03-09 Thread Rodrigo Siqueira
This patch fixes the checkpatch.pl check: iio/resolver/ad2s1210.c:202: CHECK: Lines should not end with a '[' Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/resolver/ad2s1210.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ii

Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-08 Thread Rodrigo Siqueira
On 03/07, Jonathan Cameron wrote: > On Tue, 6 Mar 2018 21:43:47 -0300 > Rodrigo Siqueira wrote: > > > The macro IIO_DEV_ATTR_CH_OFF is a wrapper for IIO_DEVICE_ATTR, with a > > tiny change in the name definition. This extra macro does not improve > > the readab

[PATCH v2 3/3] staging:iio:meter: Aligns open parenthesis

2018-03-06 Thread Rodrigo Siqueira
staging/iio/meter/ade7854-spi.c:97: CHECK: Alignment should match open parenthesis staging/iio/meter/ade7854-spi.c:125: CHECK: Alignment should match open parenthesis ... Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7758_trigger.c | 6 ++--- drivers/staging/iio/meter/ade7854

[PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-06 Thread Rodrigo Siqueira
Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7753.c | 18 ++ drivers/staging/iio/meter/ade7759.c | 18 ++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter/ade7753

[PATCH v2 2/3] staging:iio:meter: Remove unused macro IIO_DEV_ATTR_CH_OFF

2018-03-06 Thread Rodrigo Siqueira
This patch removes the macro IIO_DEV_ATTR_CH_OFF. The macro IIO_DEV_ATTR_CH_OFF is not required, due to the replace of it by the direct use of IIO_DEVICE_ATTR in files staging/iio/meter/ade7759.c and staging/iio/meter/ade7753.c. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter

[PATCH v2 0/3] staging:iio:meter: Checkpatch cleanup for meter

2018-03-06 Thread Rodrigo Siqueira
parenthesis in Patch 3. After apply this patch series, meter going to be checkpatch Rodrigo Siqueira (3): staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR staging:iio:meter: Remove unused macro IIO_DEV_ATTR_CH_OFF staging:iio:meter: Aligns open parenthesis drivers/staging

Re: [PATCH 3/3] staging:iio:meter: Aligns open parenthesis

2018-03-06 Thread Rodrigo Siqueira
Hi On 03/06, Dan Carpenter wrote: > On Tue, Mar 06, 2018 at 09:26:07AM -0300, Rodrigo Siqueira wrote: > > @@ -63,7 +63,7 @@ int ade7758_probe_trigger(struct iio_dev *indio_dev) > > int ret; > > > > st->trig

[PATCH 3/3] staging:iio:meter: Aligns open parenthesis

2018-03-06 Thread Rodrigo Siqueira
staging/iio/meter/ade7854-spi.c:97: CHECK: Alignment should match open parenthesis staging/iio/meter/ade7854-spi.c:125: CHECK: Alignment should match open parenthesis ... Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7758_trigger.c | 4 +-- drivers/staging/iio/meter/ade7854-spi.c

[PATCH 2/3] staging:iio:meter: Remove unused macro IIO_DEV_ATTR_CH_OFF

2018-03-06 Thread Rodrigo Siqueira
This patch removes the macro IIO_DEV_ATTR_CH_OFF. The macro IIO_DEV_ATTR_CH_OFF is not required, due to the replace of it by the direct use of IIO_DEVICE_ATTR in files staging/iio/meter/ade7759.c and staging/iio/meter/ade7753.c. Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter

[PATCH 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR

2018-03-06 Thread Rodrigo Siqueira
Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/meter/ade7753.c | 18 ++ drivers/staging/iio/meter/ade7759.c | 18 ++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter/ade7753

[PATCH 0/3] staging:iio:meter: Checkpatch cleanup for meter

2018-03-06 Thread Rodrigo Siqueira
going to be checkpatch Rodrigo Siqueira (3): staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR staging:iio:meter: Remove unused macro IIO_DEV_ATTR_CH_OFF staging:iio:meter: Aligns open parenthesis drivers/staging/iio/meter/ade7753.c | 18 +++-- drivers

Re: [PATCH v3] staging:iio:meter: Add name to function definition arguments

2018-03-02 Thread Rodrigo Siqueira
On 02/24, Jonathan Cameron wrote: > On Wed, 21 Feb 2018 16:54:35 -0300 > Rodrigo Siqueira wrote: > > > This patch fixes the checkpatch.pl warning: > > > > drivers/staging/iio/meter/ade7854.h:157: WARNING: function definition > > argument 'struct device

Re: [PATCH v3] staging:iio:meter: Add name to function definition arguments

2018-02-24 Thread Rodrigo Siqueira
On 02/24, Jonathan Cameron wrote: > On Wed, 21 Feb 2018 16:54:35 -0300 > Rodrigo Siqueira wrote: > > > This patch fixes the checkpatch.pl warning: > > > > drivers/staging/iio/meter/ade7854.h:157: WARNING: function definition > > argument 'struct device

[PATCH v3] staging:iio:meter: Add name to function definition arguments

2018-02-21 Thread Rodrigo Siqueira
reason, It also renames all arguments in function definitions. Signed-off-by: Rodrigo Siqueira --- Changes in v2: - Make the commit message clearer. - Use the same arguments name across signatures and definitions. Changes in v3: - Fix name in the email header. drivers/staging/iio/meter

Re: [PATCH v2] staging:iio:meter: Add name to function definition arguments

2018-02-20 Thread Rodrigo Siqueira
On 02/20, Dan Carpenter wrote: > > On Mon, Feb 19, 2018 at 01:28:32PM -0300, rodrigosiqueira wrote: > ^^^ > This looks good, but you need to fix your from email header. Thanks for the review, and the feedback related to the email header. I al

Re: [PATCH] staging: iio/meter: add name to function definition arguments

2018-02-19 Thread Rodrigo Siqueira
Hi Jonathan, > On Fri, 16 Feb 2018 11:16:58 -0200 > Rodrigo Siqueira wrote: > > > Hi Daniel > > > > > Hi Rodrigo, > > > > > > I think this is a nice finding. One comment inline: > > > > > > On Vi, 2018-02-16 at 10:50 -0200, r

Re: [PATCH] staging: iio/meter: add name to function definition arguments

2018-02-16 Thread Rodrigo Siqueira
Hi Daniel > Hi Rodrigo, > > I think this is a nice finding. One comment inline: > > On Vi, 2018-02-16 at 10:50 -0200, rodrigosiqueira wrote: > > This patch fixes the checkpatch.pl warning: > > > > drivers/staging/iio/meter/ade7854.h:157: WARNING: function defin

[PATCH] staging: wlan-ng: Fixing coding style warning

2017-12-08 Thread Rodrigo Zaiden
Removes following warnings found by checkpatch.pl script: WARNING: line over 80 characters Signed-off-by: Rodrigo Zaiden --- drivers/staging/wlan-ng/p80211netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers