All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hilber <peter.hilber@opensynergy.com>
To: Jyoti Bhayana <jbhayana@google.com>,
	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>
Cc: <linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>,
	<cristian.marussi@arm.com>, <sudeep.holla@arm.com>,
	<egranata@google.com>, <mikhail.golubev@opensynergy.com>,
	<Igor.Skalkin@opensynergy.com>, <ankitarora@google.com>,
	<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: Wed, 10 Mar 2021 12:15:58 +0100	[thread overview]
Message-ID: <0b9483ca-6f61-cc13-34e6-7f8c31c4c626@opensynergy.com> (raw)
In-Reply-To: <20210309231259.78050-2-jbhayana@google.com>

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-10 11:26 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 [this message]
2021-03-10 17:19     ` Jyoti Bhayana
2021-03-11  9:55       ` Peter Hilber
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=0b9483ca-6f61-cc13-34e6-7f8c31c4c626@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 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.