All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	"Song, Hongyan" <hongyan.song@intel.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"jikos@kernel.org" <jikos@kernel.org>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>
Subject: Re: [PATCH 1/2] iio: Add support for linear accel
Date: Tue, 3 Jan 2017 10:49:16 +0100	[thread overview]
Message-ID: <be267c7a-9ec3-d86e-2a32-2faef3e0650f@metafoo.de> (raw)
In-Reply-To: <alpine.DEB.2.02.1701030851430.18919@pmeerw.net>

On 01/03/2017 09:04 AM, Peter Meerwald-Stadler wrote:
> Hi,
> 
>> 	 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.
> 
>>> +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.?
> 
>>> @@ -82,6 +82,7 @@ struct bus_type iio_bus_type = {
>>>  	[IIO_UVINDEX] = "uvindex",
>>>  	[IIO_ELECTRICALCONDUCTIVITY] = "electricalconductivity",
>>>  	[IIO_GRAVITY]  = "gravity",
>>> +	[IIO_LINEAR_ACCEL] = "linearaccel",
>>>  };
> 
> 
> 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.


  reply	other threads:[~2017-01-03  9:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 15:13 [PATCH 1/2] iio: Add support for linear accel Song Hongyan
2017-01-03 15:13 ` Song Hongyan
2017-01-03  7:22 ` Peter Meerwald-Stadler
2017-01-03  7:47   ` Song, Hongyan
2017-01-03  7:47     ` Song, Hongyan
     [not found]     ` <AE3E3DFA698D6144A7445C92D1D41E2F10BDBD57-0J0gbvR4kTggGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-01-03  8:04       ` Peter Meerwald-Stadler
2017-01-03  8:04         ` Peter Meerwald-Stadler
2017-01-03  9:49         ` Lars-Peter Clausen [this message]
     [not found]           ` <be267c7a-9ec3-d86e-2a32-2faef3e0650f-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2017-01-04  2:28             ` Song, Hongyan
2017-01-04  2:28               ` Song, Hongyan
     [not found] ` <1483456430-6980-1-git-send-email-hongyan.song-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-03 15:13   ` [PATCH 2/2] iio: Add linear accel sensor hid support Song Hongyan
2017-01-03 15:13     ` Song Hongyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be267c7a-9ec3-d86e-2a32-2faef3e0650f@metafoo.de \
    --to=lars@metafoo.de \
    --cc=hongyan.song@intel.com \
    --cc=jic23@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=srinivas.pandruvada@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.