Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1552927 > unrolled thread
| Started by | Rob Herring <robh@kernel.org> |
|---|---|
| First post | 2017-01-06 17:30 +0100 |
| Last post | 2017-01-14 04:00 +0100 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 8/9] serdev: add a tty port controller driver Rob Herring <robh@kernel.org> - 2017-01-06 17:30 +0100
Re: [PATCH 8/9] serdev: add a tty port controller driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-07 15:20 +0100
Re: [PATCH 8/9] serdev: add a tty port controller driver Rob Herring <robh@kernel.org> - 2017-01-12 17:10 +0100
Re: [PATCH 8/9] serdev: add a tty port controller driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-13 16:10 +0100
Re: [PATCH 8/9] serdev: add a tty port controller driver Rob Herring <robh@kernel.org> - 2017-01-13 16:30 +0100
Re: [PATCH 8/9] serdev: add a tty port controller driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-13 17:00 +0100
Re: [PATCH 8/9] serdev: add a tty port controller driver Pavel Machek <pavel@ucw.cz> - 2017-01-10 23:10 +0100
Re: [PATCH 8/9] serdev: add a tty port controller driver Rob Herring <robh@kernel.org> - 2017-01-14 04:00 +0100
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-01-06 17:30 +0100 |
| Subject | [PATCH 8/9] serdev: add a tty port controller driver |
| Message-ID | <sWFyV-4sv-17@gated-at.bofh.it> |
Add a serdev controller driver for tty ports.
The controller is registered with serdev when tty ports are registered
with the TTY core. As the TTY core is built-in only, this has the side
effect of making serdev built-in as well.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/tty/serdev/Kconfig | 8 ++
drivers/tty/serdev/Makefile | 2 +
drivers/tty/serdev/serdev-ttyport.c | 244 ++++++++++++++++++++++++++++++++++++
include/linux/serdev.h | 20 +++
4 files changed, 274 insertions(+)
create mode 100644 drivers/tty/serdev/serdev-ttyport.c
diff --git a/drivers/tty/serdev/Kconfig b/drivers/tty/serdev/Kconfig
index 3b6ecd187bef..7eac4cc42785 100644
--- a/drivers/tty/serdev/Kconfig
+++ b/drivers/tty/serdev/Kconfig
@@ -6,3 +6,11 @@ menuconfig SERIAL_DEV_BUS
help
Core support for devices connected via a serial port.
+if SERIAL_DEV_BUS
+
+config SERIAL_DEV_CTRL_TTYPORT
+ bool "Serial device TTY port controller"
+ depends on TTY
+ depends on SERIAL_DEV_BUS=y
+
+endif
diff --git a/drivers/tty/serdev/Makefile b/drivers/tty/serdev/Makefile
index 01a9b62183f4..0cbdb9444d9d 100644
--- a/drivers/tty/serdev/Makefile
+++ b/drivers/tty/serdev/Makefile
@@ -1,3 +1,5 @@
serdev-objs := core.o
obj-$(CONFIG_SERIAL_DEV_BUS) += serdev.o
+
+obj-$(CONFIG_SERIAL_DEV_CTRL_TTYPORT) += serdev-ttyport.o
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
new file mode 100644
index 000000000000..ed6fd675ece6
--- /dev/null
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2016 Linaro Ltd., Rob Herring <robh@kernel.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/serdev.h>
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+
+#define SERPORT_BUSY 1
+#define SERPORT_ACTIVE 2
+#define SERPORT_DEAD 3
+
+struct serport {
+ struct tty_port *port;
+ struct tty_struct *tty;
+ struct tty_driver *tty_drv;
+ int tty_idx;
+ struct mutex lock;
+ unsigned long flags;
+};
+
+/*
+ * Callback functions from the tty port.
+ */
+
+static int ttyport_receive_buf(struct tty_port *port, const unsigned char *cp,
+ const unsigned char *fp, size_t count)
+{
+ struct serdev_controller *ctrl = port->client_data;
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+
+ mutex_lock(&serport->lock);
+
+ if (!test_bit(SERPORT_ACTIVE, &serport->flags))
+ goto out;
+
+ serdev_controller_receive_buf(ctrl, cp, count);
+
+out:
+ mutex_unlock(&serport->lock);
+ return count;
+}
+
+static void ttyport_write_wakeup(struct tty_port *port)
+{
+ struct serdev_controller *ctrl = port->client_data;
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+
+ clear_bit(TTY_DO_WRITE_WAKEUP, &port->tty->flags);
+
+ if (test_bit(SERPORT_ACTIVE, &serport->flags))
+ serdev_controller_write_wakeup(ctrl);
+}
+
+static const struct tty_port_client_operations client_ops = {
+ .receive_buf = ttyport_receive_buf,
+ .write_wakeup = ttyport_write_wakeup,
+};
+
+/*
+ * Callback functions from the serdev core.
+ */
+
+static int ttyport_write_buf(struct serdev_controller *ctrl, const unsigned char *data, size_t len)
+{
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+ struct tty_struct *tty = serport->tty;
+
+ set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
+ return serport->tty->ops->write(serport->tty, data, len);
+}
+
+static void ttyport_write_flush(struct serdev_controller *ctrl)
+{
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+ struct tty_struct *tty = serport->tty;
+
+ tty_driver_flush_buffer(tty);
+}
+
+static int ttyport_write_room(struct serdev_controller *ctrl)
+{
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+ struct tty_struct *tty = serport->tty;
+
+ return tty_write_room(tty);
+}
+
+
+static int ttyport_open(struct serdev_controller *ctrl)
+{
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+ struct tty_struct *tty;
+ struct ktermios ktermios;
+
+ tty = tty_init_dev(serport->tty_drv, serport->tty_idx);
+ serport->tty = tty;
+
+ serport->port->client_ops = &client_ops;
+ serport->port->client_data = ctrl;
+
+ tty->receive_room = 65536;
+
+ if (tty->ops->open)
+ tty->ops->open(serport->tty, NULL);
+ else
+ tty_port_open(serport->port, tty, NULL);
+
+ /* Bring the UART into a known 8 bits no parity hw fc state */
+ ktermios = tty->termios;
+ ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP |
+ INLCR | IGNCR | ICRNL | IXON);
+ ktermios.c_oflag &= ~OPOST;
+ ktermios.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+ ktermios.c_cflag &= ~(CSIZE | PARENB);
+ ktermios.c_cflag |= CS8;
+ ktermios.c_cflag |= CRTSCTS;
+ tty_set_termios(tty, &ktermios);
+
+ set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
+
+ mutex_lock(&serport->lock);
+ set_bit(SERPORT_ACTIVE, &serport->flags);
+ mutex_unlock(&serport->lock);
+
+ tty_unlock(serport->tty);
+ return 0;
+}
+
+static void ttyport_close(struct serdev_controller *ctrl)
+{
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+ struct tty_struct *tty = serport->tty;
+
+ mutex_lock(&serport->lock);
+
+ if (tty->ops->close)
+ tty->ops->close(tty, NULL);
+
+ tty_release_struct(tty, serport->tty_idx);
+
+ clear_bit(SERPORT_ACTIVE, &serport->flags);
+ mutex_unlock(&serport->lock);
+}
+
+static unsigned int ttyport_set_baudrate(struct serdev_controller *ctrl, unsigned int speed)
+{
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+ struct tty_struct *tty = serport->tty;
+ struct ktermios ktermios = tty->termios;
+
+ ktermios.c_cflag &= ~CBAUD;
+ tty_termios_encode_baud_rate(&ktermios, speed, speed);
+
+ /* tty_set_termios() return not checked as it is always 0 */
+ tty_set_termios(tty, &ktermios);
+ return speed;
+}
+
+static void ttyport_set_flow_control(struct serdev_controller *ctrl, bool enable)
+{
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+ struct tty_struct *tty = serport->tty;
+ struct ktermios ktermios = tty->termios;
+
+ if (enable)
+ ktermios.c_cflag |= CRTSCTS;
+ else
+ ktermios.c_cflag &= ~CRTSCTS;
+
+ tty_set_termios(tty, &ktermios);
+}
+
+struct serdev_controller_ops ctrl_ops = {
+ .write_buf = ttyport_write_buf,
+ .write_flush = ttyport_write_flush,
+ .write_room = ttyport_write_room,
+ .open = ttyport_open,
+ .close = ttyport_close,
+ .set_flow_control = ttyport_set_flow_control,
+ .set_baudrate = ttyport_set_baudrate,
+};
+
+int serdev_tty_port_register(struct tty_port *port, struct device *parent,
+ struct tty_driver *drv, int idx)
+{
+ struct serdev_controller *ctrl;
+ struct serport *serport;
+ int ret;
+
+ if (!port || !drv || !parent || !parent->of_node)
+ return -ENODEV;
+
+ ctrl = serdev_controller_alloc(parent, sizeof(struct serport));
+ if (!ctrl)
+ return -ENOMEM;
+ serport = serdev_controller_get_drvdata(ctrl);
+
+ mutex_init(&serport->lock);
+ serport->port = port;
+ serport->tty_idx = idx;
+ serport->tty_drv = drv;
+
+ ctrl->ops = &ctrl_ops;
+
+ ret = serdev_controller_add(ctrl);
+ if (ret)
+ goto err;
+
+ printk(KERN_INFO "serdev: Serial port %s\n", drv->name);
+ return 0;
+
+err:
+ serdev_controller_put(ctrl);
+ return ret;
+}
+
+void serdev_tty_port_unregister(struct tty_port *port)
+{
+ struct serdev_controller *ctrl = port->client_data;
+ struct serport *serport = serdev_controller_get_drvdata(ctrl);
+
+ if (!serport)
+ return;
+
+ serdev_controller_remove(ctrl);
+ port->client_ops = NULL;
+ port->client_data = NULL;
+ serdev_controller_put(ctrl);
+}
+
+MODULE_AUTHOR("Rob Herring <robh@kernel.org");
+MODULE_DESCRIPTION("TTY port serial bus controller");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index 4dc4ee62c2bb..d0e396744da5 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -204,4 +204,24 @@ static inline int serdev_controller_receive_buf(struct serdev_controller *ctrl,
return 0;
}
+/*
+ * serdev hooks into TTY core
+ */
+struct tty_port;
+struct tty_driver;
+
+#ifdef CONFIG_SERIAL_DEV_CTRL_TTYPORT
+int serdev_tty_port_register(struct tty_port *port, struct device *parent,
+ struct tty_driver *drv, int idx);
+void serdev_tty_port_unregister(struct tty_port *port);
+#else
+static inline int serdev_tty_port_register(struct tty_port *port,
+ struct device *parent,
+ struct tty_driver *drv, int idx)
+{
+ return -ENODEV;
+}
+static inline void serdev_tty_port_unregister(struct tty_port *port) {}
+#endif
+
#endif
--
2.10.1
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-01-07 15:20 +0100 |
| Message-ID | <sX00F-1um-1@gated-at.bofh.it> |
| In reply to | #1552927 |
On Fri, 2017-01-06 at 10:26 -0600, Rob Herring wrote:
> Add a serdev controller driver for tty ports.
>
> The controller is registered with serdev when tty ports are registered
> with the TTY core. As the TTY core is built-in only, this has the side
> effect of making serdev built-in as well.
>
>
> +if SERIAL_DEV_BUS
> +
> +config SERIAL_DEV_CTRL_TTYPORT
> + bool "Serial device TTY port controller"
> + depends on TTY
> + depends on SERIAL_DEV_BUS=y
Do you need one?
> +static int ttyport_receive_buf(struct tty_port *port, const unsigned
> char *cp,
> + const unsigned char *fp, size_t
> count)
> +{
> + struct serdev_controller *ctrl = port->client_data;
> + struct serport *serport =
> serdev_controller_get_drvdata(ctrl);
> +
> + mutex_lock(&serport->lock);
> +
> + if (!test_bit(SERPORT_ACTIVE, &serport->flags))
> + goto out;
> +
> + serdev_controller_receive_buf(ctrl, cp, count);
> +
> +out:
out_unlock: ?
> + mutex_unlock(&serport->lock);
> + return count;
> +}
> +
> +static void ttyport_write_wakeup(struct tty_port *port)
> +{
> + struct serdev_controller *ctrl = port->client_data;
> + struct serport *serport =
> serdev_controller_get_drvdata(ctrl);
> +
> + clear_bit(TTY_DO_WRITE_WAKEUP, &port->tty->flags);
This doesn't prevent to be called this function in parallel. Is it okay?
> +
> + if (test_bit(SERPORT_ACTIVE, &serport->flags))
> + serdev_controller_write_wakeup(ctrl);
> +}
> +
> +static int ttyport_write_buf(struct serdev_controller *ctrl, const
> unsigned char *data, size_t len)
> +{
> + struct serport *serport =
> serdev_controller_get_drvdata(ctrl);
> + struct tty_struct *tty = serport->tty;
> +
> + set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
> + return serport->tty->ops->write(serport->tty, data, len);
Just tty->ops->...(); ?
> +}
> +int serdev_tty_port_register(struct tty_port *port, struct device
> *parent,
> + struct tty_driver *drv, int idx)
> +{
> + struct serdev_controller *ctrl;
> + struct serport *serport;
> + int ret;
> +
> + if (!port || !drv || !parent || !parent->of_node)
And if it's ACPI? Perhaps last is redundant.
> + return -ENODEV;
> +
> + ctrl = serdev_controller_alloc(parent, sizeof(struct
> serport));
> + if (!ctrl)
> + return -ENOMEM;
> + serport = serdev_controller_get_drvdata(ctrl);
> +
> + mutex_init(&serport->lock);
> + serport->port = port;
> + serport->tty_idx = idx;
> + serport->tty_drv = drv;
> +
> + ctrl->ops = &ctrl_ops;
> +
> + ret = serdev_controller_add(ctrl);
> + if (ret)
> + goto err;
> +
> + printk(KERN_INFO "serdev: Serial port %s\n", drv->name);
Hmm... It's not a debug message, why not use pr_info()?
> + return 0;
> +
> +err:
err_controller_put: ?
> + serdev_controller_put(ctrl);
> + return ret;
> +}
> +
> +void serdev_tty_port_unregister(struct tty_port *port)
> +{
> + struct serdev_controller *ctrl = port->client_data;
> + struct serport *serport =
> serdev_controller_get_drvdata(ctrl);
> +
>
> + if (!serport)
> + return;
Same question, whose responsibility to do this?
+
> +#ifdef CONFIG_SERIAL_DEV_CTRL_TTYPORT
> +int serdev_tty_port_register(struct tty_port *port, struct device
> *parent,
> + struct tty_driver *drv, int idx);
> +void serdev_tty_port_unregister(struct tty_port *port);
> +#else
> +static inline int serdev_tty_port_register(struct tty_port *port,
> + struct device *parent,
> + struct tty_driver *drv,
> int idx)
> +{
> + return -ENODEV;
> +}
> +static inline void serdev_tty_port_unregister(struct tty_port *port)
> {}
> +#endif
Perhaps comment to see from which if this one.
> +
> #endif
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-01-12 17:10 +0100 |
| Message-ID | <sYQ6R-63x-7@gated-at.bofh.it> |
| In reply to | #1553663 |
On Sat, Jan 7, 2017 at 8:11 AM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Fri, 2017-01-06 at 10:26 -0600, Rob Herring wrote:
>> Add a serdev controller driver for tty ports.
>>
>> The controller is registered with serdev when tty ports are registered
>> with the TTY core. As the TTY core is built-in only, this has the side
>> effect of making serdev built-in as well.
>>
>>
>
>> +if SERIAL_DEV_BUS
>> +
>> +config SERIAL_DEV_CTRL_TTYPORT
>> + bool "Serial device TTY port controller"
>> + depends on TTY
>
>> + depends on SERIAL_DEV_BUS=y
>
> Do you need one?
Yes, otherwise the bus can be built as a module and this driver can
still be enabled breaking the build. I could drop supporting building
the bus as a module because as long as this is the only controller
driver, it all has to be built-in. Is there any desire/plan to make
the TTY layer buildable as a module?
>> + mutex_unlock(&serport->lock);
>> + return count;
>> +}
>> +
>> +static void ttyport_write_wakeup(struct tty_port *port)
>> +{
>> + struct serdev_controller *ctrl = port->client_data;
>> + struct serport *serport =
>> serdev_controller_get_drvdata(ctrl);
>> +
>> + clear_bit(TTY_DO_WRITE_WAKEUP, &port->tty->flags);
>
> This doesn't prevent to be called this function in parallel. Is it okay?
I believe it should be fine. This is essentially what all the wakeup
callbacks do for the ldisc based drivers.
>> +int serdev_tty_port_register(struct tty_port *port, struct device
>> *parent,
>> + struct tty_driver *drv, int idx)
>> +{
>> + struct serdev_controller *ctrl;
>> + struct serport *serport;
>> + int ret;
>> +
>> + if (!port || !drv || !parent || !parent->of_node)
>
> And if it's ACPI? Perhaps last is redundant.
Yes, fixed. We should only have the matching details in the core.
>
>> + return -ENODEV;
>> +
>> + ctrl = serdev_controller_alloc(parent, sizeof(struct
>> serport));
>> + if (!ctrl)
>> + return -ENOMEM;
>> + serport = serdev_controller_get_drvdata(ctrl);
>> +
>> + mutex_init(&serport->lock);
>> + serport->port = port;
>> + serport->tty_idx = idx;
>> + serport->tty_drv = drv;
>> +
>> + ctrl->ops = &ctrl_ops;
>> +
>> + ret = serdev_controller_add(ctrl);
>> + if (ret)
>> + goto err;
>> +
>> + printk(KERN_INFO "serdev: Serial port %s\n", drv->name);
>
> Hmm... It's not a debug message, why not use pr_info()?
Converted to dev_info().
>> + serdev_controller_put(ctrl);
>> + return ret;
>> +}
>> +
>> +void serdev_tty_port_unregister(struct tty_port *port)
>> +{
>> + struct serdev_controller *ctrl = port->client_data;
>> + struct serport *serport =
>> serdev_controller_get_drvdata(ctrl);
>> +
>>
>
>> + if (!serport)
>> + return;
>
> Same question, whose responsibility to do this?
I don't get the question. ctrl and serport can be NULL here so the
caller can call this unconditionally.
Rob
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-01-13 16:10 +0100 |
| Message-ID | <sZbEm-2pl-21@gated-at.bofh.it> |
| In reply to | #1557554 |
On Thu, 2017-01-12 at 10:01 -0600, Rob Herring wrote:
> On Sat, Jan 7, 2017 at 8:11 AM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Fri, 2017-01-06 at 10:26 -0600, Rob Herring wrote:
> > > Add a serdev controller driver for tty ports.
> > >
> > > The controller is registered with serdev when tty ports are
> > > registered
> > > with the TTY core. As the TTY core is built-in only, this has the
> > > side
> > > effect of making serdev built-in as well.
> > >
> > >
> > > +if SERIAL_DEV_BUS
> > > +
> > > +config SERIAL_DEV_CTRL_TTYPORT
> > > + bool "Serial device TTY port controller"
> > > + depends on TTY
> > > + depends on SERIAL_DEV_BUS=y
> >
> > Do you need one?
>
> Yes, otherwise the bus can be built as a module and this driver can
> still be enabled breaking the build. I could drop supporting building
> the bus as a module because as long as this is the only controller
> driver, it all has to be built-in.
Would
if SERIAL_DEV_BUS=y
work for you?
> Is there any desire/plan to make
> the TTY layer buildable as a module?
Have no idea.
> > > + serdev_controller_put(ctrl);
> > > + return ret;
> > > +}
> > > +
> > > +void serdev_tty_port_unregister(struct tty_port *port)
> > > +{
> > > + struct serdev_controller *ctrl = port->client_data;
> > > + struct serport *serport =
> > > serdev_controller_get_drvdata(ctrl);
> > > +
> > >
> > > + if (!serport)
> > > + return;
> >
> > Same question, whose responsibility to do this?
>
> I don't get the question. ctrl and serport can be NULL here so the
> caller can call this unconditionally.
Yes, you got it. And I get the answer.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-01-13 16:30 +0100 |
| Message-ID | <sZbXH-2vV-5@gated-at.bofh.it> |
| In reply to | #1558453 |
On Fri, Jan 13, 2017 at 9:04 AM, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Thu, 2017-01-12 at 10:01 -0600, Rob Herring wrote: >> On Sat, Jan 7, 2017 at 8:11 AM, Andy Shevchenko >> <andriy.shevchenko@linux.intel.com> wrote: >> > On Fri, 2017-01-06 at 10:26 -0600, Rob Herring wrote: >> > > Add a serdev controller driver for tty ports. >> > > >> > > The controller is registered with serdev when tty ports are >> > > registered >> > > with the TTY core. As the TTY core is built-in only, this has the >> > > side >> > > effect of making serdev built-in as well. >> > > >> > > >> > > +if SERIAL_DEV_BUS >> > > + >> > > +config SERIAL_DEV_CTRL_TTYPORT >> > > + bool "Serial device TTY port controller" >> > > + depends on TTY >> > > + depends on SERIAL_DEV_BUS=y >> > >> > Do you need one? >> >> Yes, otherwise the bus can be built as a module and this driver can >> still be enabled breaking the build. I could drop supporting building >> the bus as a module because as long as this is the only controller >> driver, it all has to be built-in. > > Would > > if SERIAL_DEV_BUS=y > > work for you? Yes, until we add a driver that doesn't have to be built-in. What about "depends on SERIAL_DEV_BUS != m"? That would be a bit more clear what the reason is. Rob
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-01-13 17:00 +0100 |
| Message-ID | <sZcqK-2FK-23@gated-at.bofh.it> |
| In reply to | #1558469 |
On Fri, 2017-01-13 at 09:28 -0600, Rob Herring wrote: > On Fri, Jan 13, 2017 at 9:04 AM, Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > On Thu, 2017-01-12 at 10:01 -0600, Rob Herring wrote: > > > On Sat, Jan 7, 2017 at 8:11 AM, Andy Shevchenko > > > <andriy.shevchenko@linux.intel.com> wrote: > > > > On Fri, 2017-01-06 at 10:26 -0600, Rob Herring wrote: > > > Yes, otherwise the bus can be built as a module and this driver > > > can > > > still be enabled breaking the build. I could drop supporting > > > building > > > the bus as a module because as long as this is the only controller > > > driver, it all has to be built-in. > > > > Would > > > > if SERIAL_DEV_BUS=y > > > > work for you? > > Yes, until we add a driver that doesn't have to be built-in. What > about "depends on SERIAL_DEV_BUS != m"? That would be a bit more clear > what the reason is. Ah, good point. Yes, it would also work. My concern was here is not add confusing 'depend on MENU_OPTION'. -- Andy Shevchenko <andriy.shevchenko@linux.intel.com> Intel Finland Oy
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-01-10 23:10 +0100 |
| Message-ID | <sYcM9-6Wd-25@gated-at.bofh.it> |
| In reply to | #1552927 |
[Multipart message — attachments visible in raw view] — view raw
Hi!
> +MODULE_AUTHOR("Rob Herring <robh@kernel.org");
Missing ">".
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-01-14 04:00 +0100 |
| Message-ID | <sZmJr-oM-3@gated-at.bofh.it> |
| In reply to | #1555964 |
On Tue, Jan 10, 2017 at 4:04 PM, Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
>> +MODULE_AUTHOR("Rob Herring <robh@kernel.org");
>
> Missing ">".
Actually, this I should drop because this driver can not be a module.
The bus can be though.
Rob
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web