All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Michael Hennerich <michael.hennerich@analog.com>,
	linux-iio@vger.kernel.org,
	device-drivers-devel@blackfin.uclinux.org, drivers@analog.com
Subject: Re: [PATCH 2/2] staging:iio:dac: Add AD5421 driver
Date: Thu, 27 Oct 2011 09:25:25 +0200	[thread overview]
Message-ID: <4EA90765.6040705@metafoo.de> (raw)
In-Reply-To: <4EA83DB1.60606@cam.ac.uk>

On 10/26/2011 07:04 PM, Jonathan Cameron wrote:
> On 10/26/11 13:01, Lars-Peter Clausen wrote:
>> [...]
>> +
>> +static const struct iio_chan_spec ad5421_channels[] = {
>> +	{
>> +		.type = IIO_CURRENT,
>> +		.indexed = 1,
>> +		.output = 1,
>> +		.channel = 0,
>> +		.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT |
>> +			IIO_CHAN_INFO_OFFSET_SHARED_BIT |
>> +			IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT |
>> +			IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT,
>> +		.scan_type = IIO_ST('u', 16, 16, 0),
>> +		.event_mask = IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) |
>> +			IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING),
>> +	},
>> +	{
> Wasn't the plan to have this set to channel -1 to avoid it appearing?
> If that doesn't work we should probably make it do so.  At a quick glance
> I can't see why it wouldn't...

hehe, that was what the hunk at bottom was about. If the binary
representation of channel is greater than 0xffff it will overwrite other
fields. I'll resend with a proper fix included in the series.

>> +		.type = IIO_TEMP,
>> +		.channel = 1,
>> +		.event_mask = IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING),
>> +	},
>> +};
>> +



  reply	other threads:[~2011-10-27  7:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26 12:01 [PATCH 1/2] staging:iio: Make write_event_value callback optional Lars-Peter Clausen
2011-10-26 12:01 ` [PATCH 2/2] staging:iio:dac: Add AD5421 driver Lars-Peter Clausen
2011-10-26 13:21   ` Lars-Peter Clausen
2011-10-26 17:04   ` Jonathan Cameron
2011-10-27  7:25     ` Lars-Peter Clausen [this message]
2011-10-26 12:02 ` [PATCH 1/2] staging:iio: Make write_event_value callback optional 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=4EA90765.6040705@metafoo.de \
    --to=lars@metafoo.de \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=drivers@analog.com \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.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.