* MFD device driver on top of UART/RS232
@ 2015-11-16 16:24 Andrey Vostrikov
2015-11-17 7:53 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Andrey Vostrikov @ 2015-11-16 16:24 UTC (permalink / raw
To: linux-serial, linux-embedded
Hi,
I have an embedded system with microcontroller connected via UART/RS232 port. This microcontroller implements several low-level functions that need to be exposed as device drivers in other subsystems (watchdog, LEDs, HWMON, firmware read/write).
I checked many drivers implemented in the kernel, searched through mail list archives and it looks like there are three different ways to solve this task:
A) most of the devices that are connected using UART have user space program that configures and manages it (either directly or with help of dedicated line discipline, SLIP, SL-CAN, etc)
B) serio - mostly used for input devices
C) direct use of UART port taking control from serial_core.
The best match I have found so far is MFD driver for Atmel Microcontroller on iPaq h3xxx (drivers/mfd/ipaq-micro.c) that follows concept "C)"
Is this a good enough example to use for this task? This platform is a legacy one so I am confused a little if new driver will fit nicely into the mainline.
It would be great if someone could point me to another example to follow or advise better way to implement MFD driver without user space involvement.
Best regards,
Andrey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MFD device driver on top of UART/RS232
2015-11-16 16:24 MFD device driver on top of UART/RS232 Andrey Vostrikov
@ 2015-11-17 7:53 ` Sascha Hauer
2015-11-17 12:45 ` Andrey Vostrikov
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2015-11-17 7:53 UTC (permalink / raw
To: Andrey Vostrikov; +Cc: linux-serial, linux-embedded, NeilBrown
Hi Andrey,
+Cc NeilBrown <neil@brown.name>
On Mon, Nov 16, 2015 at 07:24:58PM +0300, Andrey Vostrikov wrote:
> Hi,
>
> I have an embedded system with microcontroller connected via
> UART/RS232 port. This microcontroller implements several low-level
> functions that need to be exposed as device drivers in other
> subsystems (watchdog, LEDs, HWMON, firmware read/write).
>
> I checked many drivers implemented in the kernel, searched through
> mail list archives and it looks like there are three different ways to
> solve this task:
> A) most of the devices that are connected using UART have user space
> program that configures and manages it (either directly or with help
> of dedicated line discipline, SLIP, SL-CAN, etc)
> B) serio - mostly used for input devices
> C) direct use of UART port taking control from serial_core.
>
> The best match I have found so far is MFD driver for Atmel
> Microcontroller on iPaq h3xxx (drivers/mfd/ipaq-micro.c) that follows
> concept "C)"
There's also D) TTY slave device support: https://lkml.org/lkml/2015/3/18/40
Unfortunately this hasn't made it to mainline yet and it seems the
parties lost interest after some lengthy discussion of device tree phandles
vs. subnodes, but I think this is what you're looking for.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MFD device driver on top of UART/RS232
2015-11-17 7:53 ` Sascha Hauer
@ 2015-11-17 12:45 ` Andrey Vostrikov
2015-11-17 14:16 ` H. Nikolaus Schaller
0 siblings, 1 reply; 4+ messages in thread
From: Andrey Vostrikov @ 2015-11-17 12:45 UTC (permalink / raw
To: Sascha Hauer; +Cc: linux-serial, linux-embedded, NeilBrown, hns
Hi Sascha,
Sascha Hauer wrote:
> Hi Andrey,
>
> +Cc NeilBrown <neil@brown.name>
>
> On Mon, Nov 16, 2015 at 07:24:58PM +0300, Andrey Vostrikov wrote:
>> Hi,
>>
>> I have an embedded system with microcontroller connected via
>> UART/RS232 port. This microcontroller implements several low-level
>> functions that need to be exposed as device drivers in other
>> subsystems (watchdog, LEDs, HWMON, firmware read/write).
>>
>> I checked many drivers implemented in the kernel, searched through
>> mail list archives and it looks like there are three different ways to
>> solve this task:
>> A) most of the devices that are connected using UART have user space
>> program that configures and manages it (either directly or with help
>> of dedicated line discipline, SLIP, SL-CAN, etc)
>> B) serio - mostly used for input devices
>> C) direct use of UART port taking control from serial_core.
>>
>> The best match I have found so far is MFD driver for Atmel
>> Microcontroller on iPaq h3xxx (drivers/mfd/ipaq-micro.c) that follows
>> concept "C)"
>
> There's also D) TTY slave device support: https://lkml.org/lkml/2015/3/18/40
>
> Unfortunately this hasn't made it to mainline yet and it seems the
> parties lost interest after some lengthy discussion of device tree phandles
> vs. subnodes, but I think this is what you're looking for.
Thank you for pointing out to another option. Looks like it was developed a little further and was submitted as patch by "H. Nikolaus Schaller",
https://lkml.org/lkml/2015/10/16/729
But I see no further traces of it.
Cc'ed Nikolaus, may be he could comment on state of UART slave patch.
Best regards,
Andrey
>
> Sascha
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MFD device driver on top of UART/RS232
2015-11-17 12:45 ` Andrey Vostrikov
@ 2015-11-17 14:16 ` H. Nikolaus Schaller
0 siblings, 0 replies; 4+ messages in thread
From: H. Nikolaus Schaller @ 2015-11-17 14:16 UTC (permalink / raw
To: Andrey Vostrikov
Cc: Sascha Hauer, linux-serial, linux-embedded, NeilBrown,
Marek Belisko
Hi Andrey,
Am 17.11.2015 um 13:45 schrieb Andrey Vostrikov <av.linux.dev@gmail.com>:
> Hi Sascha,
>
> Sascha Hauer wrote:
>> Hi Andrey,
>>
>> +Cc NeilBrown <neil@brown.name>
>>
>> On Mon, Nov 16, 2015 at 07:24:58PM +0300, Andrey Vostrikov wrote:
>>> Hi,
>>>
>>> I have an embedded system with microcontroller connected via
>>> UART/RS232 port. This microcontroller implements several low-level
>>> functions that need to be exposed as device drivers in other
>>> subsystems (watchdog, LEDs, HWMON, firmware read/write).
>>>
>>> I checked many drivers implemented in the kernel, searched through
>>> mail list archives and it looks like there are three different ways to
>>> solve this task:
>>> A) most of the devices that are connected using UART have user space
>>> program that configures and manages it (either directly or with help
>>> of dedicated line discipline, SLIP, SL-CAN, etc)
>>> B) serio - mostly used for input devices
>>> C) direct use of UART port taking control from serial_core.
>>>
>>> The best match I have found so far is MFD driver for Atmel
>>> Microcontroller on iPaq h3xxx (drivers/mfd/ipaq-micro.c) that follows
>>> concept "C)"
>>
>> There's also D) TTY slave device support: https://lkml.org/lkml/2015/3/18/40
>>
>> Unfortunately this hasn't made it to mainline yet and it seems the
>> parties lost interest after some lengthy discussion of device tree phandles
>> vs. subnodes, but I think this is what you're looking for.
>
> Thank you for pointing out to another option. Looks like it was developed a little further and was submitted as patch by "H. Nikolaus Schaller",
> https://lkml.org/lkml/2015/10/16/729
>
> But I see no further traces of it.
Well, I was still missing a technical discussion of our proposals and a real
evaluation of the benefits of subnode vs. phandle. In my view it was very
ideologic and it was not an exchange of arguments.
> Cc'ed Nikolaus, may be he could comment on state of UART slave patch.
And we are currently working on a compromise. So that the DT developer can
simply choose if he prefers subnode or phandle. And the driver is capable of
handling both. This is not yet finished, so we have not yet submitted an update.
BR,
Nikolaus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-17 14:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 16:24 MFD device driver on top of UART/RS232 Andrey Vostrikov
2015-11-17 7:53 ` Sascha Hauer
2015-11-17 12:45 ` Andrey Vostrikov
2015-11-17 14:16 ` H. Nikolaus Schaller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).