public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Chinea <carlos.chinea@nokia.com>
To: "ext Sjur Brændeland" <sjur.brandeland@stericsson.com>
Cc: sjurbren@gmail.com, Andras Domokos <andras.domokos@nokia.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [RFC PATCHv5 4/7] HSI: hsi_char: Add HSI char device driver
Date: Thu, 23 Jun 2011 12:12:58 +0300	[thread overview]
Message-ID: <1308820378.27256.2773.camel@groo> (raw)
In-Reply-To: <1308771464-15980-1-git-send-email-sjur.brandeland@stericsson.com>

Hi,

On Wed, 2011-06-22 at 21:37 +0200, ext Sjur Brændeland wrote:
> Hi Carlos,
> 
> ...
> >+static ssize_t hsc_read(struct file *file, char __user *buf, size_t len,
> >+						loff_t *ppos __maybe_unused)
> >+{
> ...
> >+	ret = hsi_async_read(channel->cl, msg);
> >+
> >+	ret = wait_event_interruptible(channel->rx_wait,
> >+					!list_empty(&channel->rx_msgs_queue));
> ...
> 
> >+}
> >+
> >+static ssize_t hsc_write(struct file *file, const char __user *buf, size_t len,
> >+						loff_t *ppos __maybe_unused)
> >+{
> >+	ret = hsi_async_write(channel->cl, msg);
> >+	if (ret < 0)
> >+		goto out;
> >+
> >+	ret = wait_event_interruptible(channel->tx_wait,
> >+					!list_empty(&channel->tx_msgs_queue));
> 
> I would really like to see support for non-blocking read/write operation here.
> 

Non-blocking support will not be supported in hsi_char.

> ...
> >+
> >+static const struct file_operations hsc_fops = {
> >+	.owner		= THIS_MODULE,
> >+	.read		= hsc_read,
> >+	.write		= hsc_write,
> >+	.unlocked_ioctl	= hsc_ioctl,
> >+	.open		= hsc_open,
> >+	.release	= hsc_release,
> >+};
> 
> No poll?

We did have some "kind" of support for poll in previous versions, but we
did not honor properly the poll expected behavior, as we always need to
"block" waiting for the complete callback to be called. At least for
reads this was an issue.

However to compensate this, we are planning to add AIO support in the
future, which maps a lot better into the hsi behavior.

> Currently we do bulk read/write operations upon modem-crash or firmware upload,
> and would perfeer to be able do asynchronous IO (select/poll) in order to
> receive other system events or timeouts during HSI bulk transfers.
> 


Br,
-- 
Carlos Chinea <carlos.chinea@nokia.com>

  reply	other threads:[~2011-06-23  9:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 13:38 [RFC PATCHv5 0/7] HSI framework and drivers Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 1/7] HSI: hsi: Introducing HSI framework Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 2/7] HSI: omap_ssi: Introducing OMAP SSI driver Carlos Chinea
2011-06-13 13:21   ` Tony Lindgren
2011-06-14 12:09     ` Carlos Chinea
2011-06-13 20:21   ` Kevin Hilman
2011-06-14 12:12     ` Carlos Chinea
2011-06-15 15:37       ` Kevin Hilman
2011-06-10 13:38 ` [RFC PATCHv5 3/7] HSI: omap_ssi: Add OMAP SSI to the kernel configuration Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 4/7] HSI: hsi_char: Add HSI char device driver Carlos Chinea
2011-06-22 19:37   ` Sjur Brændeland
2011-06-23  9:12     ` Carlos Chinea [this message]
2011-06-10 13:38 ` [RFC PATCHv5 5/7] HSI: hsi_char: Add HSI char device kernel configuration Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 6/7] HSI: Add HSI API documentation Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 7/7] HSI: hsi_char: Update ioctl-number.txt Carlos Chinea
2011-06-14  9:35 ` [RFC PATCHv5 0/7] HSI framework and drivers Alan Cox
2011-06-15  9:27   ` Andras Domokos
2011-06-22 19:11 ` [RFC PATCHv5 1/7] HSI: hsi: Introducing HSI framework Sjur Brændeland
2011-06-22 19:25   ` Linus Walleij
2011-06-23 13:08   ` Carlos Chinea
2011-06-28 13:05     ` Sjur BRENDELAND
2011-07-22 10:43       ` Carlos Chinea
2011-07-22 11:01         ` Felipe Balbi
2011-07-22 11:51           ` Carlos Chinea
2011-07-22 12:05             ` Felipe Balbi
2011-07-22 13:02               ` Carlos Chinea
2011-07-24 21:56               ` Sjur Brændeland
2011-07-25  9:17                 ` Carlos Chinea
2011-10-20 12:57 ` [RFC PATCHv5 0/7] HSI framework and drivers Sebastian Reichel
2011-10-21  9:54   ` Linus Walleij
2011-10-21 10:28     ` Carlos Chinea
2011-10-21 12:19       ` Linus Walleij
2011-10-21 13:36       ` Alan Cox

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=1308820378.27256.2773.camel@groo \
    --to=carlos.chinea@nokia.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andras.domokos@nokia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sjur.brandeland@stericsson.com \
    --cc=sjurbren@gmail.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