public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hilber <peter.hilber@opensynergy.com>
To: Jyoti Bhayana <jbhayana@google.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Rob Herring <robh@kernel.org>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	<linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Enrico Granata <egranata@google.com>,
	Mikhail Golubev <mikhail.golubev@opensynergy.com>,
	Igor Skalkin <Igor.Skalkin@opensynergy.com>,
	Ankit Arora <ankitarora@google.com>,
	Guru Nagarajan <gurunagarajan@google.com>,
	kernel test robot <lkp@intel.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v7 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors
Date: Thu, 11 Mar 2021 10:55:48 +0100	[thread overview]
Message-ID: <695b1680-9e5a-89bd-bd3b-e794200587dc@opensynergy.com> (raw)
In-Reply-To: <CA+=V6c1y_zhqinG4zvxCX5hPM9hNH-9_7ESmHJ87c80RFTBWfA@mail.gmail.com>

On 10.03.21 18:19, Jyoti Bhayana wrote:
> Hi Peter,
> 
> As already discussed with ARM, the spec clearly mentions that it has
> to be uppercase and not case insensitive. So this patch is consistent
> with the specs and changing it with means that the spec would need to
> change as well. Therefore, there is no need for another version of the
> patch
> 
> "A NULL terminated UTF-8 format string with the sensor axis name, of
> up to 16 bytes. It is recommended that the name ends with ‘_’ followed
> by the axis of the sensor in uppercase.
> For example, the name for the x-axis of a triaxial accelerometer could
> be “acc_X” or “_X"
> 

My understanding of the part of the spec quoted above is different: The
spec only makes a recommendation and does allow additional or even
contradictory sensor axis naming schemes. So the change to the
implementation only would in principle be possible (disregarding
integration timeline constraints).

Best regards,

Peter

> Thanks,
> Jyoti
> 
> On Wed, Mar 10, 2021 at 3:16 AM Peter Hilber
> <peter.hilber@opensynergy.com> wrote:
>>
>> On 10.03.21 00:12, Jyoti Bhayana wrote:
>>> This change provides ARM SCMI Protocol based IIO device.
>>> This driver provides support for Accelerometer and Gyroscope using
>>> SCMI Sensor Protocol extensions added in the SCMIv3.0 ARM specification
>>>
>>
>> [snip]
>>
>>> +
>>> +static int scmi_iio_get_chan_modifier(const char *name,
>>> +                                   enum iio_modifier *modifier)
>>> +{
>>> +     char *pch, mod;
>>> +
>>> +     if (!name)
>>> +             return -EINVAL;
>>> +
>>> +     pch = strrchr(name, '_');
>>> +     if (!pch)
>>> +             return -EINVAL;
>>> +
>>> +     mod = *(pch + 1);
>>> +     switch (mod) {
>>> +     case 'X':
>>> +             *modifier = IIO_MOD_X;
>>> +             return 0;
>>> +     case 'Y':
>>> +             *modifier = IIO_MOD_Y;
>>> +             return 0;
>>> +     case 'Z':
>>> +             *modifier = IIO_MOD_Z;
>>> +             return 0;
>>> +     default:
>>> +             return -EINVAL;
>>> +     }
>>> +}
>>> +
>>
>> Hi Jyoti,
>>
>> could you still change the above code to also accept lower case 'x',
>> 'y', 'z'?
>>
>> Supporting lower case as well would establish compatibility with the
>> lower case naming conventions used for IIO channels. By this change,
>> channels could be forwarded without name changes (as long as they fit
>> into the name field). I'm sorry to notice this only now.
>>
>> Best regards,
>>
>> Peter
>>
> 



  reply	other threads:[~2021-03-11  9:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 23:12 [PATCH v7 0/1] Adding support for IIO SCMI based sensors Jyoti Bhayana
2021-03-09 23:12 ` [PATCH v7 1/1] iio/scmi: Adding support for IIO SCMI Based Sensors Jyoti Bhayana
2021-03-10 11:15   ` Peter Hilber
2021-03-10 17:19     ` Jyoti Bhayana
2021-03-11  9:55       ` Peter Hilber [this message]
2021-03-11 21:08   ` Jonathan Cameron
2021-03-12 12:16     ` Jonathan Cameron
2021-03-12 13:31       ` Cristian Marussi
2021-03-12 17:54         ` Jyoti Bhayana
2021-03-13 17:11           ` Jonathan Cameron
2021-03-13 19:55             ` Jyoti Bhayana
2021-03-14 15:40               ` Jonathan Cameron
2021-03-14 18:47                 ` Jyoti Bhayana
2021-03-16 13:13                   ` Cristian Marussi
2021-03-16 17:53                     ` Jyoti Bhayana
2021-03-15 13:41                 ` Sudeep Holla

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=695b1680-9e5a-89bd-bd3b-e794200587dc@opensynergy.com \
    --to=peter.hilber@opensynergy.com \
    --cc=Igor.Skalkin@opensynergy.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=ankitarora@google.com \
    --cc=cristian.marussi@arm.com \
    --cc=davem@davemloft.net \
    --cc=egranata@google.com \
    --cc=gurunagarajan@google.com \
    --cc=jbhayana@google.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mikhail.golubev@opensynergy.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh@kernel.org \
    --cc=sudeep.holla@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox