* custom serial driver node not created @ 2022-05-18 11:41 Belisko Marek 2022-05-18 11:59 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Belisko Marek @ 2022-05-18 11:41 UTC (permalink / raw) To: linux-serial Hello, I'm writing serial tty driver (it's SPI/UART converter) and I get inspired by this driver: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/tty/serial/sc16is7xx.c I have driver probed and also added port to driver which I see in console: [ 2616.826105] spi0.0: ttyTX0 at I/O 0x1 (irq = 0, base_baud = 9375) is a test_driver so I should see it in /dev/ttyTX0 but it seems node is not created. Udev is running on a platform. Any ideas what can cause this? Thanks and regards, marek -- as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: custom serial driver node not created 2022-05-18 11:41 custom serial driver node not created Belisko Marek @ 2022-05-18 11:59 ` Greg KH 2022-05-18 12:24 ` Belisko Marek 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2022-05-18 11:59 UTC (permalink / raw) To: Belisko Marek; +Cc: linux-serial On Wed, May 18, 2022 at 01:41:18PM +0200, Belisko Marek wrote: > Hello, > > I'm writing serial tty driver (it's SPI/UART converter) and I get > inspired by this driver: > https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/tty/serial/sc16is7xx.c > > I have driver probed and also added port to driver which I see in console: > [ 2616.826105] spi0.0: ttyTX0 at I/O 0x1 (irq = 0, base_baud = 9375) > is a test_driver > > so I should see it in /dev/ttyTX0 but it seems node is not created. > Udev is running on a platform. > Any ideas what can cause this? Without seeing the code itself, it's almost impossible to guess. Also note that udev does not create device nodes (hasn't for over a decade). devtmpfs in the kernel does that, udev just helps with managing the permissions of created nodes if needed. And why did you pick the ttyTX name? That's already reserved for that driver, you should use a new one, right? And what hardware are you writing this driver for that we don't already have a driver for it? thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: custom serial driver node not created 2022-05-18 11:59 ` Greg KH @ 2022-05-18 12:24 ` Belisko Marek 2022-05-18 12:42 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Belisko Marek @ 2022-05-18 12:24 UTC (permalink / raw) To: Greg KH; +Cc: linux-serial On Wed, May 18, 2022 at 1:59 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Wed, May 18, 2022 at 01:41:18PM +0200, Belisko Marek wrote: > > Hello, > > > > I'm writing serial tty driver (it's SPI/UART converter) and I get > > inspired by this driver: > > https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/tty/serial/sc16is7xx.c > > > > I have driver probed and also added port to driver which I see in console: > > [ 2616.826105] spi0.0: ttyTX0 at I/O 0x1 (irq = 0, base_baud = 9375) > > is a test_driver > > > > so I should see it in /dev/ttyTX0 but it seems node is not created. > > Udev is running on a platform. > > Any ideas what can cause this? > > Without seeing the code itself, it's almost impossible to guess. > > Also note that udev does not create device nodes (hasn't for over a > decade). devtmpfs in the kernel does that, udev just helps with > managing the permissions of created nodes if needed. OK thanks for clarification. > > And why did you pick the ttyTX name? That's already reserved for that > driver, you should use a new one, right? I've should used also others like ttyTEST but result was same. > > And what hardware are you writing this driver for that we don't already > have a driver for it? I'm writing a driver for the following model: Linux CPU is connected with SPI with another CPU (Cortex M3) and this other CPU performs UART handling based on data which comes over SPI. I would like to expose Cortex M3 UARTS on linux as tty ports so it will act as standar serial device. Code can be found here: https://pastebin.com/6qpUw2Jt Thanks, marek > > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: custom serial driver node not created 2022-05-18 12:24 ` Belisko Marek @ 2022-05-18 12:42 ` Greg KH 2022-05-18 12:47 ` Belisko Marek 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2022-05-18 12:42 UTC (permalink / raw) To: Belisko Marek; +Cc: linux-serial On Wed, May 18, 2022 at 02:24:43PM +0200, Belisko Marek wrote: > On Wed, May 18, 2022 at 1:59 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > > > On Wed, May 18, 2022 at 01:41:18PM +0200, Belisko Marek wrote: > > > Hello, > > > > > > I'm writing serial tty driver (it's SPI/UART converter) and I get > > > inspired by this driver: > > > https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/tty/serial/sc16is7xx.c > > > > > > I have driver probed and also added port to driver which I see in console: > > > [ 2616.826105] spi0.0: ttyTX0 at I/O 0x1 (irq = 0, base_baud = 9375) > > > is a test_driver > > > > > > so I should see it in /dev/ttyTX0 but it seems node is not created. > > > Udev is running on a platform. > > > Any ideas what can cause this? > > > > Without seeing the code itself, it's almost impossible to guess. > > > > Also note that udev does not create device nodes (hasn't for over a > > decade). devtmpfs in the kernel does that, udev just helps with > > managing the permissions of created nodes if needed. > OK thanks for clarification. > > > > And why did you pick the ttyTX name? That's already reserved for that > > driver, you should use a new one, right? > I've should used also others like ttyTEST but result was same. > > > > And what hardware are you writing this driver for that we don't already > > have a driver for it? > I'm writing a driver for the following model: Linux CPU is connected > with SPI with another CPU (Cortex M3) and this other CPU performs UART > handling based on data which comes over SPI. I would like to expose > Cortex M3 UARTS on linux as tty ports so it will act as standar serial > device. > > Code can be found here: https://pastebin.com/6qpUw2Jt Are you sure that your test_probe() call is really being called? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: custom serial driver node not created 2022-05-18 12:42 ` Greg KH @ 2022-05-18 12:47 ` Belisko Marek 0 siblings, 0 replies; 5+ messages in thread From: Belisko Marek @ 2022-05-18 12:47 UTC (permalink / raw) To: Greg KH; +Cc: linux-serial On Wed, May 18, 2022 at 2:42 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Wed, May 18, 2022 at 02:24:43PM +0200, Belisko Marek wrote: > > On Wed, May 18, 2022 at 1:59 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > > > > > On Wed, May 18, 2022 at 01:41:18PM +0200, Belisko Marek wrote: > > > > Hello, > > > > > > > > I'm writing serial tty driver (it's SPI/UART converter) and I get > > > > inspired by this driver: > > > > https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/tty/serial/sc16is7xx.c > > > > > > > > I have driver probed and also added port to driver which I see in console: > > > > [ 2616.826105] spi0.0: ttyTX0 at I/O 0x1 (irq = 0, base_baud = 9375) > > > > is a test_driver > > > > > > > > so I should see it in /dev/ttyTX0 but it seems node is not created. > > > > Udev is running on a platform. > > > > Any ideas what can cause this? > > > > > > Without seeing the code itself, it's almost impossible to guess. > > > > > > Also note that udev does not create device nodes (hasn't for over a > > > decade). devtmpfs in the kernel does that, udev just helps with > > > managing the permissions of created nodes if needed. > > OK thanks for clarification. > > > > > > And why did you pick the ttyTX name? That's already reserved for that > > > driver, you should use a new one, right? > > I've should used also others like ttyTEST but result was same. > > > > > > And what hardware are you writing this driver for that we don't already > > > have a driver for it? > > I'm writing a driver for the following model: Linux CPU is connected > > with SPI with another CPU (Cortex M3) and this other CPU performs UART > > handling based on data which comes over SPI. I would like to expose > > Cortex M3 UARTS on linux as tty ports so it will act as standar serial > > device. > > > > Code can be found here: https://pastebin.com/6qpUw2Jt > > Are you sure that your test_probe() call is really being called? Of course I've added tons of debugging to the driver and it is probed. As I mentioned in first topic I see this printout: [ 2616.826105] spi0.0: ttyTX0 at I/O 0x1 (irq = 0, base_baud = 9375) is a test_driver which came from uart_report_port() foom serial_core.c > marek -- as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-18 12:48 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-05-18 11:41 custom serial driver node not created Belisko Marek 2022-05-18 11:59 ` Greg KH 2022-05-18 12:24 ` Belisko Marek 2022-05-18 12:42 ` Greg KH 2022-05-18 12:47 ` Belisko Marek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox