iio: distance: srf08: add driver ABI documentation
Andreas Klinger
maintainerPATCH v3 3/3 iio: distance: srf08: add driver ABI documentation
Add sysfs-bus-iio-distance-srf08 for individual attributes of the driver, especially:
- sensitivity which the device documentation calls gain for amplifying the signal
- max_range for limiting the maximum distance for expected echos and therefore limiting the time waiting for telegrams
--- .../ABI/testing/sysfs-bus-iio-distance-srf08 | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-distance-srf08
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +27 -0
@@ -0,0 +1,27 @@ +What /sys/bus/iio/devices/iio:deviceX/in_distance_raw +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Get the current distance in meters between the sensor and + the first object recognized + +What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Show or set the gain boost of the amp, from 0-31 range. + default 31 + +What /sys/bus/iio/devices/iio:deviceX/sensor_max_range +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Show or set the maximum range between the sensor and the + first object echoed in millimeters. + This setting limits the time the driver is waiting for a + echo. + Can be set between 43 and 11008 in a grid of 43 mm. + default 6020
Signature · 9 lines
2.1.4 -- -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerQuoted 19 lines · Andreas Klinger
Add sysfs-bus-iio-distance-srf08 for individual attributes of the driver, especially:
- sensitivity which the device documentation calls gain for amplifying the signal
-max_rangefor limiting the maximum distance for expected echos and therefore limiting the time waiting for telegramsSigned-off-by Andreas Klinger <ak-n176/[email protected]>--- .../ABI/testing/sysfs-bus-iio-distance-srf08 | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-distance-srf08Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +0
-0
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 line 7
Quoted 7 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +7
-0@@ -0,0 +1,27 @@ +What /sys/bus/iio/devices/iio:deviceX/in_distance_raw +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Get the current distance in meters between the sensor and + the first object recognized
Generally no need to document what are effectively standard elements. Just leads to the possibility of disagreements in the docs! Still no harm here really.
Quoted 10 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +10
-0+ +What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Show or set the gain boost of the amp, from 0-31 range. + default 31 + +What /sys/bus/iio/devices/iio:deviceX/sensor_max_range
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 line 27
Quoted 10 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +10
-0+Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Show or set the maximum range between the sensor and the + first object echoed in millimeters. + This setting limits the time the driver is waiting for a + echo. + Can be set between 43 and 11008 in a grid of 43 mm. + default 6020
This needs to be in the same units as the range - so m.
I'm not 100% sure this is the best ABI we can do for this. However, supporting this as a legacy abi if we come up with something more general will be a very small burden, so lets not stall the driver on this!
Jonathan
Quoted 1 line
Andreas Klinger
maintainerHi Jonathan,
see question below.
Andreas
Jonathan Cameron <[email protected]> schrieb am Sun, 22. Jan 13:41:
Quoted 43 lines · Andreas Klinger
Quoted 19 lines
Add sysfs-bus-iio-distance-srf08 for individual attributes of the driver, especially:
- sensitivity which the device documentation calls gain for amplifying the signal
-max_rangefor limiting the maximum distance for expected echos and therefore limiting the time waiting for telegramsSigned-off-by Andreas Klinger <[email protected]>--- .../ABI/testing/sysfs-bus-iio-distance-srf08 | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-distance-srf08Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +0
-0Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 line 7
Quoted 7 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +7
-0@@ -0,0 +1,27 @@ +What /sys/bus/iio/devices/iio:deviceX/in_distance_raw +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Get the current distance in meters between the sensor and + the first object recognizedGenerally no need to document what are effectively standard elements. Just leads to the possibility of disagreements in the docs! Still no harm here really.
Quoted 13 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +13
-0+ +What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Show or set the gain boost of the amp, from 0-31 range. + default 31 + +What /sys/bus/iio/devices/iio:deviceX/sensor_max_range +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected]
Quoted 8 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 line 27
Quoted 7 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +7
-0+Description: + Show or set the maximum range between the sensor and the + first object echoed in millimeters. + This setting limits the time the driver is waiting for a + echo. + Can be set between 43 and 11008 in a grid of 43 mm. + default 6020This needs to be in the same units as the range - so m.
Just to clarify:
There should be a floating point number be passed to the driver and being parsed there, e. g.:
0.043 or 6.020
right?
Or should this number be passed using the scale attribute like the raw value does? So that the scale is used by both the value itself and the attribute.
Quoted 11 lines
I'm not 100% sure this is the best ABI we can do for this. However, supporting this as a legacy abi if we come up with something more general will be a very small burden, so lets not stall the driver on this!
Jonathan
Quoted 1 line
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerQuoted 60 lines · Andreas Klinger
Hi Jonathan,
see question below.
Andreas
Jonathan Cameron <[email protected]> schrieb am Sun, 22. Jan 13:41:
Quoted 43 lines · Andreas Klinger
Quoted 19 lines
Add sysfs-bus-iio-distance-srf08 for individual attributes of the driver, especially:
- sensitivity which the device documentation calls gain for amplifying the signal
-max_rangefor limiting the maximum distance for expected echos and therefore limiting the time waiting for telegramsSigned-off-by Andreas Klinger <ak-n176/[email protected]>--- .../ABI/testing/sysfs-bus-iio-distance-srf08 | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-distance-srf08Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +0
-0Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 line 7
Quoted 7 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +7
-0@@ -0,0 +1,27 @@ +What /sys/bus/iio/devices/iio:deviceX/in_distance_raw +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Get the current distance in meters between the sensor and + the first object recognizedGenerally no need to document what are effectively standard elements. Just leads to the possibility of disagreements in the docs! Still no harm here really.
Quoted 13 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +13
-0+ +What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected] +Description: + Show or set the gain boost of the amp, from 0-31 range. + default 31 + +What /sys/bus/iio/devices/iio:deviceX/sensor_max_range +Date: January 2017 +KernelVersion: 4.11 +Contact: [email protected]Quoted 8 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 line 27
Quoted 7 lines
Documentation/ABI/testing/sysfs-bus-iio-distance-srf08 new file +7
-0+Description: + Show or set the maximum range between the sensor and the + first object echoed in millimeters. + This setting limits the time the driver is waiting for a + echo. + Can be set between 43 and 11008 in a grid of 43 mm. + default 6020This needs to be in the same units as the range - so m.
Quoted 5 lines
Just to clarify:
There should be a floating point number be passed to the driver and being parsed there, e. g.:
0.043 or 6.020
right?
That's fine. Just use the core functions that are already in place for this in your own parsing. iio_str_to_fixpoint should do the job for you.
It may seem fiddly but however carefully we pick a base unit we never allow enough range to represent everything that turns up in the future. Hence the trickery with 'fixed point' values where we can redefine the two parts.
Quoted 3 lines
Or should this number be passed using the scale attribute like the raw value does? So that the scale is used by both the value itself and the attribute.
Interesting point. I'm trying to think of an equivalent where the unit is shared like this. The event attributes (thresholds) do use scale, but they aren't really the same thing...
I think if we wanted to do that we'd need to call it something that made it clear. More than possible that we'll get a colour sensor down the line with a max range or something silly like that (focusing optics perhaps?) - so may not always be obvious.
Could stick a _raw on the end of it.
Anyone else reading this and have any thoughts?
Jonathan
Quoted 13 lines
Quoted 12 lines
I'm not 100% sure this is the best ABI we can do for this. However, supporting this as a legacy abi if we come up with something more general will be a very small burden, so lets not stall the driver on this!
Jonathan
Quoted 1 line
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html