Thread (1 message) 1 message, 1 author, 2017-01-04

RE: [PATCH 1/2] iio: Add support for linear accel

From: Song, Hongyan <hidden>
Date: 2017-01-04 02:28:23
Also in: linux-iio

Hi Lars & Peter,

-----Original Message-----
From: Lars-Peter Clausen [mailto:lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org] 
Sent: Tuesday, January 3, 2017 5:49 PM
To: Peter Meerwald-Stadler <redacted>; Song, Hongyan <redacted>
Cc: linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org; jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org; Pandruvada, Srinivas <redacted>
Subject: Re: [PATCH 1/2] iio: Add support for linear accel

On 01/03/2017 09:04 AM, Peter Meerwald-Stadler wrote:
Hi,
quoted
	 I checked and find that iio device name is usually named to be with underline if it has more than one word, so I assigned to be " linear_accel_3d".
 I think the device property node named to be "in_linear_accel_x_raw" is better than " in_linearaccel_x_raw" Just follow the former coding style.
"linearaccel" is only a name which specify IIO type 
[IIO_LINEAR_ACCEL] I name [IIO_LINEAR_ACCEL] to be "linearaccel" just follow the history code style in " iio_chan_type_name_spec[]" which do not have any underline.
quoted
quoted
+What:		/sys/bus/iio/devices/iio:deviceX/in_linear_accel_x_raw
+What:		/sys/bus/iio/devices/iio:deviceX/in_linear_accel_y_raw
+What:		/sys/bus/iio/devices/iio:deviceX/in_linear_accel_z_raw
I think this would be in_linearaccel_x_raw, etc.?
quoted
quoted
@@ -82,6 +82,7 @@ struct bus_type iio_bus_type = {
 	[IIO_UVINDEX] = "uvindex",
 	[IIO_ELECTRICALCONDUCTIVITY] = "electricalconductivity",
 	[IIO_GRAVITY]  = "gravity",
+	[IIO_LINEAR_ACCEL] = "linearaccel",
 };
quoted
linearaccel vs. linear_accel is a matter of taste, I have no 
preference; nevertheless, the documentation should match what IIO 
outputs
We use underscores as the field separator in the channel name. Having a underscore as part of a field adds ambiguity and makes it a lot  >
harder to machine parse it. It's already complicated enough as it is. We should avoid adding types with underscores in them.
Thanks for your advice, I will update the patch.

BR
Song Hongyan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help