linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
To: Peter Meerwald <pmeerw@pmeerw.net>,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: jic23@kernel.org, pali.rohar@gmail.com, pavel@ucw.cz,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ivaylo Dimitrov <freemangordon@abv.bg>
Subject: Re: [PATCH] iio: tsl2563: Initialize channels
Date: Sun, 12 Jan 2014 23:08:20 +0200	[thread overview]
Message-ID: <52D30444.5070800@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.01.1401122150210.9334@pmeerw.net>

On 12.01.2014 22:55, Peter Meerwald wrote:
>
> I think the fix should rather be
>
> 	if (chan->channel2 == IIO_MOD_LIGHT_BOTH)
> 		chip->calib0 = calib_from_sysfs(val);
> 	else if (chan->channel2 == IIO_MOD_LIGHT_IR)
> 		chip->calib1 = calib_from_sysfs(val);
> 	else
> 		return -EINVAL;
>
> since only the INTENSITY channels have a CALIBSCALE info
>
> the light channel incorrectly sets .indexed = 1 and .channel = 0 which
> should be unnecessary since there is only one IIO_LIGHT channel
>
> regards, p.
>

I thought so when I was preparing the patch, but unfortunately couldn't 
find any documentation for iio subsystem structs and defines, besides 
what is in the header files (and it is not very descriptive), so I took 
the easy route.

However, I'll send a new patch with the above (and a little more) changes.

Thanks,
Ivo

  reply	other threads:[~2014-01-12 21:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 19:54 [PATCH] iio: tsl2563: Initialize channels Ivaylo Dimitrov
2014-01-12 20:55 ` Peter Meerwald
2014-01-12 21:08   ` Ivaylo Dimitrov [this message]
2014-01-12 21:41     ` Jonathan Cameron
2014-01-13 17:24       ` [PATCH] iio: tsl2563: Use the correct channel2 member Ivaylo Dimitrov
2014-01-13 21:25         ` Peter Meerwald
2014-01-18 11:37           ` Jonathan Cameron
2014-01-18 11:38             ` Jonathan Cameron

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=52D30444.5070800@gmail.com \
    --to=ivo.g.dimitrov.75@gmail.com \
    --cc=freemangordon@abv.bg \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).