From: Lars-Peter Clausen <lars@metafoo.de>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Octavian Purdila <octavian.purdila@intel.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v2 3/6] iio: Add support for indicating fixed watermarks
Date: Wed, 14 Oct 2015 17:13:00 +0200 [thread overview]
Message-ID: <561E70FC.4010206@metafoo.de> (raw)
In-Reply-To: <CAEnQRZBaVnf4NGHAwmFigWNnirAgNsczSQTfUGAY4fcvn3Edyg@mail.gmail.com>
On 10/14/2015 04:04 PM, Daniel Baluta wrote:
> On Tue, Oct 13, 2015 at 7:05 PM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>> For buffers which have a fixed wake-up watermark the watermark attribute
>> should be read-only. Add a new FIXED_WATERMARK flag to the
>> struct iio_buffer_access_funcs, which can be set by a buffer
>> implementation.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>> drivers/iio/industrialio-buffer.c | 5 +++++
>> include/linux/iio/buffer.h | 8 ++++++++
>> 2 files changed, 13 insertions(+)
>>
>> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
>> index 5f2c8c8..98a6447 100644
>> --- a/drivers/iio/industrialio-buffer.c
>> +++ b/drivers/iio/industrialio-buffer.c
>> @@ -998,6 +998,8 @@ static DEVICE_ATTR(enable, S_IRUGO | S_IWUSR,
>> iio_buffer_show_enable, iio_buffer_store_enable);
>> static DEVICE_ATTR(watermark, S_IRUGO | S_IWUSR,
>> iio_buffer_show_watermark, iio_buffer_store_watermark);
>> +static struct device_attribute dev_attr_watermark_ro = __ATTR(watermark,
>> + S_IRUGO, iio_buffer_show_watermark, NULL);
>
> I think we can use DEVICE_ATTR_RO here.
The problem is that this will generate a variable with the name
dev_attr_watermark, which we already have for the rw version. So there would
be a name conflict.
Thanks for the review,
- Lars
next prev parent reply other threads:[~2015-10-14 15:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 16:05 [PATCH v2 0/6] iio: Add DMA buffer support Lars-Peter Clausen
2015-10-13 16:05 ` [PATCH v2 1/6] iio: Set device watermark based on watermark of all attached buffers Lars-Peter Clausen
2015-10-13 16:05 ` [PATCH v2 2/6] iio:iio_buffer_init(): Only set watermark if not already set Lars-Peter Clausen
2015-10-13 16:05 ` [PATCH v2 3/6] iio: Add support for indicating fixed watermarks Lars-Peter Clausen
2015-10-14 14:04 ` Daniel Baluta
2015-10-14 15:13 ` Lars-Peter Clausen [this message]
2015-10-14 15:14 ` Daniel Baluta
2015-10-13 16:05 ` [PATCH v2 4/6] iio: Add buffer enable/disable callbacks Lars-Peter Clausen
2015-10-13 16:05 ` [PATCH v2 5/6] iio: Add generic DMA buffer infrastructure Lars-Peter Clausen
2015-10-13 16:05 ` [PATCH v2 6/6] iio: Add a DMAengine framework based buffer Lars-Peter Clausen
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=561E70FC.4010206@metafoo.de \
--to=lars@metafoo.de \
--cc=daniel.baluta@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--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 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.