]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: ifx6x60: Convert to GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Mar 2020 08:31:31 +0000 (09:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 09:03:54 +0000 (10:03 +0100)
commit07ee94d5910881241d92555e2596b77fcf84ac8d
treea77b1a9c8578868f6fe6420a7240ee869331fb07
parent7ad6a80f2f3f9b4c6a381524e9642c0bf1e14baa
tty: serial: ifx6x60: Convert to GPIO descriptors

This driver for the Intel MID never seems to have been properly
integrated upstream: the platform data in <linux/spi/ifx_modem.h>
is not used anywhere in the kernel and haven't been since it was
merged into the kernel in 2010.

There might be out-of-tree users, so I don't want to delete the
driver, but I will refactor it to use GPIO descriptors, which
means that out-of-tree users will need to adapt.

There are several examples in the kernel of how to provide the
resources necessary for using GPIO descriptors to pass in the
GPIO lines, for the MID platform in particular, it will suffice
to inspect the code in files like:
arch/x86/platform/intel-mid/device_libs/platform_bt.c

This refactoring transfers all GPIOs in the driver, including
a hard-coded "PMU reset" in the driver to use GPIO descriptors
instead.

The following named GPIO descriptors need to be supplied:
- reset
- power
- mrdy
- srdy
- rst_out
- pmu_reset

Cc: Russ Gorby <russ.gorby@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200311083131.693908-2-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/ifx6x60.c
drivers/tty/serial/ifx6x60.h
include/linux/spi/ifx_modem.h