Searched hist:c39dfebc7798956fd2140ae6321786ff35da30c3 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/tty/serial/ |
H A D | atmel_serial.c | diff f4a8ab04ddde078a9e9906e1ca8d6821ac91e717 Fri Feb 26 04:15:04 CST 2016 Romain Izard <romain.izard.pro@gmail.com> tty/serial: at91: restore dynamic driver binding
In commit c39dfebc7798956fd2140ae6321786ff35da30c3, the modular support code for atmel_serial was removed, as the driver cannot be built as a module. Because no use case was proposed, the dynamic driver binding support was removed as well.
The atmel_serial driver can manage up to 7 serial controllers, which are multiplexed with other functions. For example, in the Atmel SAMA5D2, the Flexcom controllers can work as USART, SPI or I2C controllers, and on all Atmel devices serial lines can be reconfigured as GPIOs.
My use case uses GPIOs to transfer a firmware update using a custom protocol on the lines used as a serial port during the normal life of the device. If it is not possible to unbind the atmel_serial driver, the GPIO lines remain reserved and prevent this case from working.
This patch reinstates the atmel_serial_remove function, and fixes it as it failed to clear the "clk" field on removal, triggering an oops when a device was bound again after being unbound.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> diff 041497eb721ddbdc1e690316976dd8ba7bc136a2 Thu Dec 17 09:05:46 CST 2015 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/tty/serial: delete unused MODULE_DEVICE_TABLE from atmel_serial.c
In commit c39dfebc7798956fd2140ae6321786ff35da30c3 ("drivers/tty/serial: make serial/atmel_serial.c explicitly non-modular") we removed the code relating to modular support since it currently only supports built in.
However, when redoing my build coverage for mips allmodconfig, which sets CONFIG_OF, I noticed a remaining line that needs to be removed, else we will get a build failure for an undefined module macro.
Unfortunately this didn't appear for any of the other arch I tested more frequently, such as ARM.
Since MODULE_DEVICE_TABLE is a no-op for non-modular code, we can just remove the offending line.
Fixes: c39dfebc7798 ("drivers/tty/serial: make serial/atmel_serial.c explicitly non-modular") Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Jiri Slaby <jslaby@suse.com> Reported-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> diff c39dfebc7798956fd2140ae6321786ff35da30c3 Sun Oct 18 17:21:16 CDT 2015 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/tty/serial: make serial/atmel_serial.c explicitly non-modular
The Kconfig currently controlling compilation of this code is:
drivers/tty/serial/Kconfig:config SERIAL_ATMEL drivers/tty/serial/Kconfig: bool "AT91 / AT32 on-chip serial port support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only.
We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers.
Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit.
We don't replace module.h with init.h since the file already has that.
We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.
Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-serial@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|