All of lore.kernel.org
 help / color / mirror / Atom feed
From: pranjas@gmail.com (Pranay Srivastava)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Building a software serial driver
Date: Tue, 24 Jun 2014 21:27:46 +0530	[thread overview]
Message-ID: <CA+aCy1ES2HZhge_mHywfMnRbyiSOgL_pE9P6m+4XmBnpzMXOAw@mail.gmail.com> (raw)
In-Reply-To: <1711614.F0xdPCU7vs@leda.milkyway.hackerbots.net>

Hi Torrie,

On Tue, Jun 24, 2014 at 6:26 PM, Torrie Fischer
<tdfischer@hackerbots.net> wrote:
> Hi, Pranay.
>
> Thanks for having a look.
>
> On Tuesday, June 24, 2014 13:42:35 Pranay Srivastava wrote:
>>
>> I looked at uart_register code, it seems there's no read callback so
>> that's why you are getting that -EIO.
>
> From what I understand, I'm supposed to set up the interrupts needed in the
> startup function which is called when the device is opened. This never happens
> though, as adding a printk results in no output.

I think this might be causing it, if you see tty_open then it has a call to ,

tty_open_current_tty , this seems to be the only one which I think is
not making the driver being looked up and hence no uport->open

so in case there's an already a tty attached to current then i think
it isn't opening
a new one. Maybe you need to detach this tty? Not so sure I'll look
again what can be done.

>
>> I think you can put this call in your start_tx since uart_start is
>> calling port->start_tx at the end so i guess you should be good there.
>
> I suspect that start_tx is not getting called since adding a printk in my
> start_tx function doesn't result in any output.
>
>>
>> I don't have much idea how will you read from it though.
>
> I'm able to read from it by waiting for a rising edge interrupt and then bit-
> banging the GPIO line in userspace, though at a slow baud that is unusable. I
> need 9600 to read from my device :)

Ok good!. I don't have much idea about GPIO. While searching I found
there's a GPIO library for Raspi. I don't know how much help that
would be but i
guess you don't want to use it.


-- 
        ---P.K.S

  reply	other threads:[~2014-06-24 15:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 18:15 Building a software serial driver Torrie Fischer
2014-06-24  8:12 ` Pranay Srivastava
2014-06-24 12:56   ` Torrie Fischer
2014-06-24 15:57     ` Pranay Srivastava [this message]
2014-06-24 18:19       ` Torrie Fischer
2014-06-25  5:56         ` Pranay Srivastava

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=CA+aCy1ES2HZhge_mHywfMnRbyiSOgL_pE9P6m+4XmBnpzMXOAw@mail.gmail.com \
    --to=pranjas@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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.