From: Cestonaro Thilo <thilo.cestonaro@ts.fujitsu.com>
To: Greg KH <greg@kroah.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: is there a struct uart_driver like struct i2c_driver
Date: Tue, 19 Aug 2014 14:45:47 +0200 [thread overview]
Message-ID: <53F346FB.5020101@ts.fujitsu.com> (raw)
In-Reply-To: <20140819123923.GA7791@kroah.com>
On 19.08.2014 14:39, Greg KH wrote:
> On Tue, Aug 19, 2014 at 02:25:57PM +0200, Cestonaro Thilo wrote:
>>> You might want to step back and describe what you are wanting to do in
>>> the first place before wanting to add a new line discipline.
>>>
>>>
>> Ok.
>> Imagine you have two chips, one is the cpu and the other one is a device
>> which needs to be configured, accessed, talked to via uart.
>> The both chips are hardwired via uart.
>> Now I want to communicate from the kernel module with the device.
> Why within the kernel? Why not do the communication from userspace?
Cause it's a rtc, and I don't know of a way to have a /dev/rtc from
userspace
>
>> let the device be a RTC Device which has a UART interface.
> How do you talk to this UART? Through a "normal" serial chip that the
> kernel already has a driver for, or through some other hardware control
> interface?
Jup, via normal serial chip.
>
>> And I don't want to rewrite all the uart device stuff of the cpu uart
>> device.
> What do you mean by this?
As it is via a normal serial chip, one option would be to write a
sperate driver which includes all the register stuff from the original
serial chip module.
But this, I don't want to do.
>
>> As a i2c client doesn't implement master_xfer or whatever the transfer
>> methods are called in the i2c controller module.
>> It just does a i2c->write(reg, value) and I need something equivalent
>> like uart->send(data, len); and uart->handle_recieved =
>> my_recieved_data_handler;
> Do that in userspace :)
Is there a way to have a HW Clock support from userland?
> thanks,
>
> greg k-h
>
>
--
With best regards
Thilo Cestonaro
FTS PSO PM&D CCD E EPC
Fujitsu Technology Solutions GmbH
Buergermeister-Ulrich-Str. 100
86199 Augsburg
Germany
Tel.: +49 (0)821 804 2328
Fax: +49 (0)821 804 82328
E-mail: thilo.cestonaro@ts.fujitsu.com
Web: http://ts.fujitsu.com
Company details: http://ts.fujitsu.com/imprint
next prev parent reply other threads:[~2014-08-19 12:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 9:54 is there a struct uart_driver like struct i2c_driver Cestonaro Thilo
2014-08-18 10:53 ` Greg KH
2014-08-18 11:11 ` Cestonaro Thilo
2014-08-18 11:19 ` Cestonaro Thilo
2014-08-18 13:43 ` Cestonaro Thilo
2014-08-18 13:50 ` Greg KH
2014-08-18 14:56 ` Cestonaro Thilo
2014-08-18 15:07 ` Greg KH
2014-08-19 12:25 ` Cestonaro Thilo
2014-08-19 12:39 ` Greg KH
2014-08-19 12:45 ` Cestonaro Thilo [this message]
2014-08-25 14:57 ` Greg KH
2014-08-18 16:19 ` Grant Edwards
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=53F346FB.5020101@ts.fujitsu.com \
--to=thilo.cestonaro@ts.fujitsu.com \
--cc=greg@kroah.com \
--cc=linux-serial@vger.kernel.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.