* Re: [Q] i2c-taos-evm bus driver [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902152F0E-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> @ 2010-02-09 8:16 ` Jean Delvare 2010-02-09 16:38 ` H Hartley Sweeten 0 siblings, 1 reply; 5+ messages in thread From: Jean Delvare @ 2010-02-09 8:16 UTC (permalink / raw) To: H Hartley Sweeten; +Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Linux I2C [-- Attachment #1: Type: text/plain, Size: 1650 bytes --] Hi Hartley, Please send i2c-specific questions to the linux-i2c list, as specified in MAINTAINERS. On Mon, 8 Feb 2010 18:15:26 -0500, H Hartley Sweeten wrote: > Is the i2c-taos-evm bus driver broken? No, it works reasonably fine. I was using it myself no later than one month ago. Out of curiosity, with which exact evaluation module do you plan to use it? > The Documentation says to use the following to tell the kernel that > the device is on the first serial port: > > # inputattach --taos-evm /dev/ttyS0 > > When I try that I get: > > inputattach: invalid mode > > I checked the source for inputattach on my system (Debian 5.0) and > --taos-evm is missing. And I have not been able to locate a newer > version of the user-space utility. > > Should this driver be marked broken? No. What is broken is input-utils' upstream. I tried submitting patches 2.5 years ago: http://sourceforge.net/tracker/?group_id=3063&atid=303063 As you can see, nobody took care of them. Apparently I then did not even bother sending the one adding support for the TAOS EVM. The patch in question is still applied to the openSUSE version of the input-utils package. If you have access to the openSUSE build system, you can see it here: https://build.opensuse.org/package/view_file?file=input-utils-add-taos-evm-support.patch&package=input-utils&project=openSUSE%3A11.0 In case you don't, I'm attaching it too. I might add it to the patch tracking system on sourceforge too. Not that I really expect upstream to pick it in a timely manner, but at least other distributions would see it and may decide to include it. Hope that helps, -- Jean Delvare [-- Attachment #2: input-utils-add-taos-evm-support.patch --] [-- Type: text/x-patch, Size: 1113 bytes --] --- inputattach.c | 6 ++++++ 1 file changed, 6 insertions(+) --- utils.orig/inputattach.c 2007-06-22 10:25:32.000000000 +0200 +++ utils/inputattach.c 2008-05-11 15:41:57.000000000 +0200 @@ -376,6 +376,9 @@ struct input_types input_types[] = { { "--elo4002", "-elo6b", B9600, CS8 | CRTSCTS, SERIO_ELO, 1, 0, 0, NULL }, { "--elo271-140", "-elo4b", B9600, CS8 | CRTSCTS, SERIO_ELO, 2, 0, 0, NULL }, { "--elo261-280", "-elo3b", B9600, CS8 | CRTSCTS, SERIO_ELO, 3, 0, 0, NULL }, +#ifdef SERIO_TAOSEVM +{ "--taos-evm", "-taos", B1200, CS8, SERIO_TAOSEVM, 0, 0, 0, NULL }, +#endif { "--dump", "-dump", B2400, CS8, 0, 0, 0, 0, dump_init }, { "", "", 0, 0 } @@ -421,6 +424,9 @@ int main(int argc, char **argv) puts(" --elo4002 -elo6b Elo touchscreen (legacy 6-byte protocol)"); puts(" --elo271-140 -elo4b Elo touchscreen (legacy 4-byte protocol)"); puts(" --elo261-280 -elo3b Elo touchscreen (legacy 3-byte protocol)"); +#ifdef SERIO_TAOSEVM + puts(" --taos-evm -taos TAOS evaluation module"); +#endif puts(""); return 1; } ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Q] i2c-taos-evm bus driver 2010-02-09 8:16 ` [Q] i2c-taos-evm bus driver Jean Delvare @ 2010-02-09 16:38 ` H Hartley Sweeten [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902152FBE-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: H Hartley Sweeten @ 2010-02-09 16:38 UTC (permalink / raw) To: Jean Delvare; +Cc: linux-kernel, Linux I2C On Tuesday, February 09, 2010 1:17 AM, Jean Delvare wrote: > Hi Hartley, Hello > Please send i2c-specific questions to the linux-i2c list, as specified > in MAINTAINERS. Sorry about that. > On Mon, 8 Feb 2010 18:15:26 -0500, H Hartley Sweeten wrote: >> Is the i2c-taos-evm bus driver broken? > > No, it works reasonably fine. I was using it myself no later than one > month ago. Out of curiosity, with which exact evaluation module do you > plan to use it? I'm not actually... I am trying to figure out how a serio driver actually gets "hooked" to a serial port. The i2c-taos-evm driver looked simple enough to play with in order to figure it out. I was trying to follow the Documentation in order to use it and ran into the issue below. >> The Documentation says to use the following to tell the kernel that >> the device is on the first serial port: >> >> # inputattach --taos-evm /dev/ttyS0 >> >> When I try that I get: >> >> inputattach: invalid mode >> >> I checked the source for inputattach on my system (Debian 5.0) and >> --taos-evm is missing. And I have not been able to locate a newer >> version of the user-space utility. >> >> Should this driver be marked broken? > > No. What is broken is input-utils' upstream. I tried submitting patches > 2.5 years ago: > http://sourceforge.net/tracker/?group_id=3063&atid=303063 > > As you can see, nobody took care of them. Apparently I then did not > even bother sending the one adding support for the TAOS EVM. Yeah. I did a bit of searching yesterday and it appears the user space tools development went stale around the end of the 2.4 - start of the 2.6 kernel. > The patch in question is still applied to the openSUSE version of the > input-utils package. If you have access to the openSUSE build system, > you can see it here: > https://build.opensuse.org/package/view_file?file=input-utils-add-taos-evm-support.patch&package=input-utils&project=openSUSE%3A11.0 > In case you don't, I'm attaching it too. I might add it to the patch > tracking system on sourceforge too. Not that I really expect upstream > to pick it in a timely manner, but at least other distributions would > see it and may decide to include it. > > Hope that helps, That helps. Thanks. Do you know if there is a way to make the connection in kernel? Also, do you know if there is any information on the serio stuff available anywhere? Other than just reading the kernel source I have not been able to locate anything. Thanks for the reply, Hartley ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <BD79186B4FD85F4B8E60E381CAEE190902152FBE-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org>]
* Re: [Q] i2c-taos-evm bus driver [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902152FBE-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> @ 2010-02-09 20:42 ` Jean Delvare [not found] ` <20100209214252.2a01f010-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Jean Delvare @ 2010-02-09 20:42 UTC (permalink / raw) To: H Hartley Sweeten Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Linux I2C, Dmitry Torokhov Hi Hartley, On Tue, 9 Feb 2010 11:38:37 -0500, H Hartley Sweeten wrote: > On Tuesday, February 09, 2010 1:17 AM, Jean Delvare wrote: > > No, it works reasonably fine. I was using it myself no later than one > > month ago. Out of curiosity, with which exact evaluation module do you > > plan to use it? > > I'm not actually... > > I am trying to figure out how a serio driver actually gets "hooked" to a > serial port. The i2c-taos-evm driver looked simple enough to play with > in order to figure it out. I was trying to follow the Documentation in > order to use it and ran into the issue below. OK... but please keep in mind that you won't be able to use this driver without supported hardware. The driver will not bind to the serial port if it doesn't detect a supported device. > (...) > Do you know if there is a way to make the connection in kernel? I suppose this is possible from a pure code perspective, but I can't see why one would want to do that. The kernel has no idea what is connected to the serial ports: devices on the serial port can't be reliably nor safely probed. This is why we rely on user-space to declare which device is connected to which port, based on the assumption that the user knows what he or she is doing. > Also, do you know if there is any information on the serio stuff > available anywhere? Other than just reading the kernel source I > have not been able to locate anything. I seem to remember I hit the exact same problem back when I wrote the i2c-taos-evm driver. I ended up reading the source code of other serial device drivers and used them as an example. It was enough to get things to work, but I won't claim I understood all of serio... just enough to do what I needed back then. Maybe Dmitry Torokhov (Cc'd) will be more helpful than me. -- Jean Delvare ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20100209214252.2a01f010-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>]
* RE: [Q] i2c-taos-evm bus driver [not found] ` <20100209214252.2a01f010-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> @ 2010-02-11 17:12 ` H Hartley Sweeten [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902153420-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: H Hartley Sweeten @ 2010-02-11 17:12 UTC (permalink / raw) To: Jean Delvare Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Linux I2C, Dmitry Torokhov On Tuesday, February 09, 2010 1:43 PM, Jean Delvare wrote: > Hi Hartley, Hello. > On Tue, 9 Feb 2010 11:38:37 -0500, H Hartley Sweeten wrote: >> On Tuesday, February 09, 2010 1:17 AM, Jean Delvare wrote: >>> No, it works reasonably fine. I was using it myself no later than one >>> month ago. Out of curiosity, with which exact evaluation module do you >>> plan to use it? >> >> I'm not actually... >> >> I am trying to figure out how a serio driver actually gets "hooked" to a >> serial port. The i2c-taos-evm driver looked simple enough to play with >> in order to figure it out. I was trying to follow the Documentation in >> order to use it and ran into the issue below. > > OK... but please keep in mind that you won't be able to use this driver > without supported hardware. The driver will not bind to the serial port > if it doesn't detect a supported device. That's what I am trying to figure out. Now that I know the baud rate and port setting from your patch to inputattach.c I was just going to dummy something up to one of my serial ports. I really don't need the i2c-taos-evm driver to "work" I just want to figure out how the serio connection is made. It still seems strange to me that a user space application is needed to connect two kernel drivers together. Actually three if you include the serio "bridge". I assume the actual connection between the drivers is something like this: some_tty_driver <--> serio <--> i2c-taos-evm >> (...) >> Do you know if there is a way to make the connection in kernel? > I suppose this is possible from a pure code perspective, but I can't > see why one would want to do that. The kernel has no idea what is > connected to the serial ports: devices on the serial port can't be > reliably nor safely probed. This is why we rely on user-space to > declare which device is connected to which port, based on the > assumption that the user knows what he or she is doing. My intention is to do this in an embedded system. The serial port I am using will always be connected to the target device. I am just Trying to figure out a way to make the kernel driver connection. >> Also, do you know if there is any information on the serio stuff >> available anywhere? Other than just reading the kernel source I >> have not been able to locate anything. > > I seem to remember I hit the exact same problem back when I wrote the > i2c-taos-evm driver. I ended up reading the source code of other serial > device drivers and used them as an example. It was enough to get things > to work, but I won't claim I understood all of serio... just enough to > do what I needed back then. > > Maybe Dmitry Torokhov (Cc'd) will be more helpful than me. Hopefully... There seems to be a real lack of information available. Thanks for the reply, Hartley ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <BD79186B4FD85F4B8E60E381CAEE190902153420-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org>]
* Re: [Q] i2c-taos-evm bus driver [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902153420-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> @ 2010-02-11 17:43 ` Dmitry Torokhov 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Torokhov @ 2010-02-11 17:43 UTC (permalink / raw) To: H Hartley Sweeten Cc: Jean Delvare, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Linux I2C On Thu, Feb 11, 2010 at 12:12:51PM -0500, H Hartley Sweeten wrote: > On Tuesday, February 09, 2010 1:43 PM, Jean Delvare wrote: > > Hi Hartley, > > Hello. > > > On Tue, 9 Feb 2010 11:38:37 -0500, H Hartley Sweeten wrote: > >> On Tuesday, February 09, 2010 1:17 AM, Jean Delvare wrote: > >>> No, it works reasonably fine. I was using it myself no later than one > >>> month ago. Out of curiosity, with which exact evaluation module do you > >>> plan to use it? > >> > >> I'm not actually... > >> > >> I am trying to figure out how a serio driver actually gets "hooked" to a > >> serial port. The i2c-taos-evm driver looked simple enough to play with > >> in order to figure it out. I was trying to follow the Documentation in > >> order to use it and ran into the issue below. > > > > OK... but please keep in mind that you won't be able to use this driver > > without supported hardware. The driver will not bind to the serial port > > if it doesn't detect a supported device. > > That's what I am trying to figure out. > > Now that I know the baud rate and port setting from your patch to inputattach.c > I was just going to dummy something up to one of my serial ports. I really > don't need the i2c-taos-evm driver to "work" I just want to figure out how > the serio connection is made. > > It still seems strange to me that a user space application is needed to connect > two kernel drivers together. Actually three if you include the serio "bridge". > I assume the actual connection between the drivers is something like this: It is much easier to initialize device from userspace instead of putting all this code into the kernel, it simplifies interrupt handler and the overlall driver structure. None of these are hotpluggable so there is no issue with running a program at startup. BTW, several drivers do do autopropbe (like sunkbd) but most rely on inputattach to prepare port and device. > > some_tty_driver <--> serio <--> i2c-taos-evm > Yep, this is correct. > >> (...) > >> Do you know if there is a way to make the connection in kernel? > > > I suppose this is possible from a pure code perspective, but I can't > > see why one would want to do that. The kernel has no idea what is > > connected to the serial ports: devices on the serial port can't be > > reliably nor safely probed. This is why we rely on user-space to > > declare which device is connected to which port, based on the > > assumption that the user knows what he or she is doing. > > My intention is to do this in an embedded system. The serial port > I am using will always be connected to the target device. I am just > Trying to figure out a way to make the kernel driver connection. Just have your driver bind to SERIO_ANY and have it query the device. You still need to create serio of proper type (with input attach or see drivers/serial/sunzilog.c for example of creating dedicated serio port). > > >> Also, do you know if there is any information on the serio stuff > >> available anywhere? Other than just reading the kernel source I > >> have not been able to locate anything. > > > > I seem to remember I hit the exact same problem back when I wrote > > the i2c-taos-evm driver. I ended up reading the source code of other > > serial device drivers and used them as an example. It was enough to > > get things to work, but I won't claim I understood all of serio... > > just enough to do what I needed back then. > > > > Maybe Dmitry Torokhov (Cc'd) will be more helpful than me. > > Hopefully... There seems to be a real lack of information available. > Neither Vojtech nor I had time to document serio. Patches are always welcome of course ;) -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-11 17:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <BD79186B4FD85F4B8E60E381CAEE190902152F0E@mi8nycmail19.Mi8.com> [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902152F0E-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> 2010-02-09 8:16 ` [Q] i2c-taos-evm bus driver Jean Delvare 2010-02-09 16:38 ` H Hartley Sweeten [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902152FBE-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> 2010-02-09 20:42 ` Jean Delvare [not found] ` <20100209214252.2a01f010-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> 2010-02-11 17:12 ` H Hartley Sweeten [not found] ` <BD79186B4FD85F4B8E60E381CAEE190902153420-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org> 2010-02-11 17:43 ` Dmitry Torokhov
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 NNTP newsgroup(s).