Re: is there a struct uart_driver like struct i2c_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx

Web: http://ts.fujitsu.com
Company details: http://ts.fujitsu.com/imprint

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux