Move the iio driver for the ad2s1200 and ad2s1205 resolver-to-digital
converter out of staging, into mainline iio subsystems.
Signed-off-by: David Veenstra
---
drivers/iio/Kconfig | 1 +
drivers/iio/Makefile| 1 +
drivers/iio/resolver/Kconfig
The sysfs iio ABI states radians per second is expected as the unit for
angular velocity, but the 12-bit angular velocity register has
revolution per seconds as its unit. So a scaling factor of approximately
2 * Pi is added to the angular velocity channel.
Signed-off-by: David Veenstra
A scaling factor of approximately 2 * Pi / (2^12 -1) is added,
to scale the 12-bits angular position to radians.
A return type of IIO_VAL_INT_PLUS_NANO is used, so that the scale of
both the angle channel and angular velocity channel has 7 significant
digits.
Signed-off-by: David Veenstra
Add David Veenstra as a copyright holders and as an author,
for all of the staging clean ups of the ad2s1200 driver.
Signed-off-by: David Veenstra
---
Changes in v4:
- Introduced in this version.
drivers/staging/iio/resolver/ad2s1200.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a
Add documentation for the device tree bindings of the AD2S1200 resolver.
Signed-off-by: David Veenstra
---
Changes in v4:
- Added vendor prefix to gpio function name.
- Added unit address.
- Changed commit subject to be more inline with other dt-bindings
commit .
.../bindings/iio
Add device tree table for matching with the vendor ID.
Signed-off-by: David Veenstra
---
Changes in v4:
- Introduced in this version.
drivers/staging/iio/resolver/ad2s1200.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging
Remove usage of platform data, and replace it with device tree
facilities.
Signed-off-by: David Veenstra
---
Changes in v4:
- Added vendor prefix to gpio function names.
drivers/staging/iio/resolver/ad2s1200.c | 32 -
1 file changed, 15 insertions(+), 17 deletions
The legacy, integer based gpio API is replaced with the modern
descriptor based API.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers
documentation for device tree binding
6. Move driver to main line.
Changes in v4:
- Some new minor code style fix ups.
- Move spi setup to before iio device registration.
- Add vendor prefix to gpios function name, and dt docs.
- Add device tree table
- Add copyright.
Best regards,
David Veenstra
The spi should be set up before the device is registered as an iio
device.
This patch moves the setup to before the device registration.
Signed-off-by: David Veenstra
---
Changes in v4:
- Introduced in this version.
drivers/staging/iio/resolver/ad2s1200.c | 13 +++--
1 file changed
Remove 2 initializations which are unneeded, because the
initialized values are never used.
Signed-off-by: David Veenstra
---
Changes in v4:
- Introduced in this version.
drivers/staging/iio/resolver/ad2s1200.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Add missing kernel docs to the ad2s1200 driver state.
Signed-off-by: David Veenstra
---
Changes in v4:
- Simplified explanation of lock.
drivers/staging/iio/resolver/ad2s1200.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers
Remove unneeded newline in license, as it does not improve readability.
Signed-off-by: David Veenstra
---
Changes in v4:
- Introduced in this version.
drivers/staging/iio/resolver/ad2s1200.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers
Move the iio driver for the ad2s1200 and ad2s1205 resolver-to-digital
converter out of staging, into mainline iio subsystems.
Signed-off-by: David Veenstra
---
Changes in v3:
- Add mention of ad2s1205 in commit message.
drivers/iio/Kconfig | 1 +
drivers/iio/Makefile
A scaling factor of approximately 2 * Pi / (2^12 -1) is added,
to scale the 12-bits angular position to radians.
A return type of IIO_VAL_INT_PLUS_NANO is used, so that the scale of
both the angle channel and angular velocity channel has 7 significant
digits.
Signed-off-by: David Veenstra
Add documentation for the added device tree bindings.
Signed-off-by: David Veenstra
---
Changes in v3:
- Documentation is added to Documentation/devicetree/bindings/iio/resolver
instead of staging directory.
- Add mention to ad2s1205 device.
.../devicetree/bindings/iio/resolver/ad2s1200
d-off-by: David Veenstra
---
Changes in v3:
- Remove axis modifier on in_angle.
Documentation/ABI/testing/sysfs-bus-iio | 9 +
1 file changed, 9 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio
b/Documentation/ABI/testing/sysfs-bus-iio
index 6a5f34b4d5b9..240287e2343
The legacy, integer based gpio API is replaced with the modern
descriptor based API.
Signed-off-by: David Veenstra
---
Changes in v3:
- This patch no longer deals with dt bindings. See the next
patch.
drivers/staging/iio/resolver/ad2s1200.c | 15 ---
1 file changed, 8
Remove usage of platform data, and replace it with device tree
facilities.
Signed-off-by: David Veenstra
---
Changes in v3:
- Introduced in this version.
drivers/staging/iio/resolver/ad2s1200.c | 32 +++-
1 file changed, 15 insertions(+), 17 deletions(-)
diff
The sysfs iio ABI states radians per second is expected as the unit for
angular velocity, but the 12-bit angular velocity register has rps
as its unit. So a scaling factor of approximately 2 * Pi is
added to the angular velocity channel.
Signed-off-by: David Veenstra
---
Changes in v3:
- A
Add missing kernel docs to the ad2s1200 driver state.
Signed-off-by: David Veenstra
---
Changes in v3:
- Added more explanation to mutex lock.
drivers/staging/iio/resolver/ad2s1200.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b
expressions that use be16_to_cpup.
Signed-off-by: David Veenstra
---
Changes in v3:
- change type of rx to __be16.
- remove unneeded variable vel.
- remove unneeded type cast to s16 (patch line 79).
drivers/staging/iio/resolver/ad2s1200.c | 11 ---
1 file changed, 4 insertions(+), 7
folder.
- Change return type of scale for angle and angular velocity channel.
- Remove axis modifier from documentation of angle channel.
- Add missing references to ad2s1205.
Best regards,
David Veenstra
[1] https://marc.info/?l=linux-iio&m=152137920426820&w=2
[2] https://marc.info/?l=lin
A fractional scaling factor of approximately 2 * Pi / (2^12 -1) is added,
to scale the 12-bits angular position to radians.
Signed-off-by: David Veenstra
---
Changes in v2:
- This patch replaces the patch that changed the
the channel for angular position to inclination
channel
Move the iio driver for the ad2s1200 resolver-to-digital
converter out of staging, into mainline iio subsystems.
Signed-off-by: David Veenstra
---
Changes in v2:
- Added commit message.
- Also move device tree binding documentation out of staging.
- Disabled move detection
The legacy, integer based gpio API is replaced with the descriptor
based API.
For compatibility, it is first tried to use the platform data to
request the gpio's. Otherwise, it looks for the "sample" and "rdvel"
gpio function.
Signed-off-by: David Veenstra
---
dri
d-off-by: David Veenstra
---
Change in v2:
- Introduces in this version.
Documentation/ABI/testing/sysfs-bus-iio | 11 +++
1 file changed, 11 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio
b/Documentation/ABI/testing/sysfs-bus-iio
index 6a5f34b4d5b9..8ad0e55f99e
Add documentation for the added device tree bindings.
Signed-off-by: David Veenstra
---
Changes in v2:
- Introduced in this version.
.../bindings/staging/iio/resolver/ad2s1200.txt | 16
1 file changed, 16 insertions(+)
create mode 100644
Documentation/devicetree
expressions that use be16_to_cpup.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
index 0a5fc9917e32..11ed9c7332e6
scaling factor of
the angle channel.
Signed-off-by: David Veenstra
---
Changes in v2:
- Move explanation of Pi approximation to top of switch statement,
as this will also be relevant to angle channel.
- Replaced 33102 / 2 with 16551 on line 84.
drivers/staging/iio/resolver/ad2s1200.c
Add variable to hold &spi->dev in ad2s1200_probe. This value is repeatedly
used in ad2s1200_probe.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2
Add missing kernel docs to the ad2s1200 driver state.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
index 357fe3c382b3
Add blank lines to improve readability.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
index b6c3a3c8f7fe..357fe3c382b3 100644
Reorders the variable declarations to prefer a reverse Christmas tree
order to improve readability.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b
This patches removes unneeded slab.h header.
Signed-off-by: David Veenstra
---
Changes in v2:
- Introduced in this version.
drivers/staging/iio/resolver/ad2s1200.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver
This patches sorts all the includes in alphabetic order.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
Hennerich opinion. Since Michael didn't weigh in,
I have left this how it was.
Best regards,
David Veenstra
[1] https://marc.info/?l=linux-iio&m=152137920426820&w=2
[2] https://marc.info/?l=linux-iio&m=152181140619243&w=2
David Veenstra (13):
staging: iio: ad2s1200: Remove unnee
Signed-off-by: David Veenstra
---
drivers/iio/Kconfig | 1 +
drivers/iio/Makefile | 1 +
drivers/iio/resolver/Kconfig | 17 +
drivers/iio/resolver/Makefile | 5 +
drivers/{staging => }/
The sysfs iio ABI states that a unit of radians per second is
expected, but the 12-bit angular velocity register has rps as its unit.
So a fractional scaling factor of approximately 2 * Pi is added to the
angular velocity channel.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver
the ABI.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
index 4b97a106012c..937676bcc0d4 100644
--- a/drivers
The legacy, integer based gpio ABI is replaced with the descriptor
based ABI.
For compatibility, it is first tried to use the platform data to
request the gpio's. Otherwise, it looks for the "sample" and "rdvel"
gpio function.
Signed-off-by: David Veenstra
---
dri
After a successful spi transaction, a udelay(1) is needed.
This doesn't happen for the default case of the switch statement
in ad2s1200_read_raw. This patch makes sure that it does.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 8 +---
1 file chang
expressions that use be16_to_cpup.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
index eceb86e952de..e0e7c88368ed
Add missing kernel docs to the ad2s1200 driver state.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
index 20df16b7852b
Add variable to hold &spi->dev in ad2s1200_probe. This value is repeatedly
used in ad2s1200_probe.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2
Add blank lines to improve readability.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200.c
index 94d0a66532fd..20df16b7852b 100644
Reorders the variable declarations to prefer a reverse Christmas tree
order to improve readability.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b
This patches sorts all the includes in alphabetic order.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200
conveniant format and has semantics similar to that of angular
position.
David Veenstra (11):
staging: iio: ad2s1200: Sort includes alphabetically
staging: iio: ad2s1200: Reverse Christmas tree order
staging: iio: ad2s1200: Add blank lines
staging: iio: ad2s1200: Add kernel docs to driver state
Reorders the variable declarations to prefer a reverse Christmas tree
order to improve readability.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b
This patches sorts all the includes in alphabetic order.
Signed-off-by: David Veenstra
---
drivers/staging/iio/resolver/ad2s1200.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1200.c
b/drivers/staging/iio/resolver/ad2s1200
likely to be a cubersome format for users of the ABI interface. Finally,
there is in_incli which seems to be meant for any kind of inclination,
given in degrees. In my opinion in_incli is the best choice, as
it has a conveniant format and has semantics similar to that of angular
position.
David
52 matches
Mail list logo