From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: Russell King <linux@arm.linux.org.uk>,
Daniel Mack <daniel@zonque.org>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
Samuel Ortiz <sameo@linux.intel.com>,
Lee Jones <lee.jones@linaro.org>, Mark Brown <broonie@kernel.org>,
Jingoo Han <jg1.han@samsung.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Andrea Adami <andrea.adami@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-input@vger.kernel.org, linux-leds@vger.kernel.org,
linux-spi@vger.kernel.org, linux-fbdev@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: [PATCH v3 09/17] spi: add locomo SPI driver
Date: Sun, 17 May 2015 19:27:49 +0300 [thread overview]
Message-ID: <1431880077-26321-10-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1431880077-26321-1-git-send-email-dbaryshkov@gmail.com>
LoCoMo chip has a built-in simple SPI controller. On Sharp SL-5500 PDDAs
it is connected to external MMC slot.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
drivers/spi/Kconfig | 10 ++
drivers/spi/Makefile | 1 +
drivers/spi/spi-locomo.c | 332 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 343 insertions(+)
create mode 100644 drivers/spi/spi-locomo.c
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 198f96b..c9e3176 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -258,6 +258,16 @@ config SPI_LM70_LLP
which interfaces to an LM70 temperature sensor using
a parallel port.
+config SPI_LOCOMO
+ tristate "Locomo SPI master"
+ depends on MFD_LOCOMO
+ help
+ This enables using the SPI controller as present in the LoCoMo
+ chips. It is probably only useful on the Sharp SL-5x00 PDA family.
+
+ On SL-5500 and SL-5000 devices this controller is used for
+ MMC/SD cards.
+
config SPI_MPC52xx
tristate "Freescale MPC52xx SPI (non-PSC) controller support"
depends on PPC_MPC52xx
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index d8cbf65..623c463 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_SPI_GPIO) += spi-gpio.o
obj-$(CONFIG_SPI_IMG_SPFI) += spi-img-spfi.o
obj-$(CONFIG_SPI_IMX) += spi-imx.o
obj-$(CONFIG_SPI_LM70_LLP) += spi-lm70llp.o
+obj-$(CONFIG_SPI_LOCOMO) += spi-locomo.o
obj-$(CONFIG_SPI_MESON_SPIFC) += spi-meson-spifc.o
obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
diff --git a/drivers/spi/spi-locomo.c b/drivers/spi/spi-locomo.c
new file mode 100644
index 0000000..bef0354
--- /dev/null
+++ b/drivers/spi/spi-locomo.c
@@ -0,0 +1,332 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * 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/delay.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/spi/spi.h>
+#include <linux/mfd/locomo.h>
+
+struct locomospi_dev {
+ struct regmap *regmap;
+
+ int clock_base;
+ int clock_div;
+ unsigned nsecs;
+
+ unsigned int save_ct;
+ unsigned int save_md;
+};
+
+static void locomospi_chipselect(struct spi_device *spi, bool enable)
+{
+ struct locomospi_dev *spidev;
+
+ dev_dbg(&spi->dev, "SPI cs: %s\n", enable ? "enable" : "disable");
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS,
+ enable ? LOCOMO_SPICT_CS : 0);
+}
+
+static u32 locomospi_txrx_word(struct spi_device *spi,
+ unsigned nsecs,
+ u32 word)
+{
+ struct locomospi_dev *spidev;
+ int wait;
+ int j;
+ unsigned int rx;
+ unsigned int r;
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ if (spidev->clock_div == DIV_64)
+ wait = 0x10000;
+ else
+ wait = 8;
+
+ for (j = 0; j < wait; j++) {
+ regmap_read(spidev->regmap, LOCOMO_SPIST, &r);
+ if (r & LOCOMO_SPI_RFW)
+ break;
+ }
+ if (j == wait)
+ dev_err_ratelimited(&spi->dev, "rfw timeout\n");
+
+ regmap_write(spidev->regmap, LOCOMO_SPITD, word);
+ ndelay(nsecs);
+
+ for (j = 0; j < wait; j++) {
+ regmap_read(spidev->regmap, LOCOMO_SPIST, &r);
+ if (r & LOCOMO_SPI_RFR)
+ break;
+ }
+ if (j == wait)
+ dev_err_ratelimited(&spi->dev, "rfr timeout\n");
+
+ regmap_read(spidev->regmap, LOCOMO_SPIRD, &rx);
+ ndelay(nsecs);
+
+ dev_dbg(&spi->dev, "SPI txrx: %02x/%02x\n", word, rx);
+
+ return rx;
+}
+
+static void locomo_spi_set_speed(struct locomospi_dev *spidev, u32 hz)
+{
+ spidev->nsecs = (1000000000/2) / hz;
+
+ if (hz >= 24576000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 22579200) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 18432000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 12288000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 11289600) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 9216000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 6144000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 5644800) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 4608000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 3072000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 2822400) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 2304000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 384000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_64;
+ } else if (hz >= 352800) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_64;
+ } else { /* set to 288 Khz */
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_64;
+ }
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XSEL | LOCOMO_SPIMD_CLKSEL |
+ LOCOMO_SPIMD_XEN,
+ 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XSEL | LOCOMO_SPIMD_CLKSEL |
+ LOCOMO_SPIMD_XEN,
+ spidev->clock_div | (spidev->clock_base << 3) |
+ LOCOMO_SPIMD_XEN);
+
+ usleep_range(300, 400);
+}
+
+static int locomo_spi_setup_transfer(struct spi_device *spi,
+ struct spi_transfer *t)
+{
+ struct locomospi_dev *spidev;
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XON,
+ LOCOMO_SPIMD_XON);
+
+ locomo_spi_set_speed(spidev, t->speed_hz);
+
+ return 0;
+}
+
+static int locomospi_transfer_one(struct spi_master *master,
+ struct spi_device *spi,
+ struct spi_transfer *t)
+{
+ struct locomospi_dev *spidev = spi_master_get_devdata(spi->master);
+ int rc;
+ unsigned count;
+ const u8 *tx = t->tx_buf;
+ u8 *rx = t->rx_buf;
+
+ rc = locomo_spi_setup_transfer(spi, t);
+ if (rc < 0)
+ return rc;
+
+ if (!t->len)
+ return 0;
+
+ for (count = t->len; likely(count > 0); count--) {
+ u8 word = 0;
+
+ if (tx)
+ word = *tx++;
+ word = locomospi_txrx_word(spi, spidev->nsecs, word);
+
+ if (rx)
+ *rx++ = word;
+ }
+
+ return 0;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int locomo_spi_suspend(struct device *dev)
+{
+ struct spi_master *master = dev_get_drvdata(dev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+ int ret;
+
+ /* Stop the queue running */
+ ret = spi_master_suspend(master);
+ if (ret) {
+ dev_warn(dev, "cannot suspend master\n");
+ return ret;
+ }
+
+ regmap_read(spidev->regmap, LOCOMO_SPICT, &spidev->save_ct);
+ regmap_write(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS);
+ regmap_read(spidev->regmap, LOCOMO_SPIMD, &spidev->save_md);
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ (CLOCK_25MHZ << 3) | DIV_64);
+
+ return 0;
+}
+
+static int locomo_spi_resume(struct device *dev)
+{
+ struct spi_master *master = dev_get_drvdata(dev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+ int ret;
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD, spidev->save_md);
+ regmap_write(spidev->regmap, LOCOMO_SPICT, spidev->save_ct);
+
+ /* Start the queue running */
+ ret = spi_master_resume(master);
+ if (ret)
+ dev_err(dev, "problem starting queue (%d)\n", ret);
+
+ return ret;
+}
+
+static SIMPLE_DEV_PM_OPS(locomo_spi_pm_ops,
+ locomo_spi_suspend, locomo_spi_resume);
+
+#define LOCOMO_SPI_PM_OPS (&locomo_spi_pm_ops)
+#else
+#define LOCOMO_SPI_PM_OPS NULL
+#endif
+
+static int locomo_spi_probe(struct platform_device *pdev)
+{
+ struct spi_master *master;
+ struct locomospi_dev *spidev;
+ int ret = -ENODEV;
+
+ master = spi_alloc_master(&pdev->dev, sizeof(struct locomospi_dev));
+ if (!master)
+ return -ENOMEM;
+
+ master->bus_num = 0;
+ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
+ master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 8);
+ master->max_speed_hz = 24576000;
+ master->num_chipselect = 1;
+ master->set_cs = locomospi_chipselect;
+ master->transfer_one = locomospi_transfer_one;
+
+ spidev = spi_master_get_devdata(master);
+
+ spidev->regmap = dev_get_regmap(pdev->dev.parent, NULL);
+ if (!spidev->regmap)
+ goto out_put;
+
+ spidev->clock_div = DIV_1;
+ spidev->clock_base = CLOCK_25MHZ;
+
+ platform_set_drvdata(pdev, master);
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ LOCOMO_SPIMD_XON);
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ LOCOMO_SPIMD_XON | LOCOMO_SPIMD_XEN |
+ (spidev->clock_base << 3) | spidev->clock_div);
+
+ regmap_write(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS |
+ LOCOMO_SPICT_CEN | LOCOMO_SPICT_RXUEN |
+ LOCOMO_SPICT_ALIGNEN);
+
+ ret = devm_spi_register_master(&pdev->dev, master);
+ if (ret) {
+ dev_err(&pdev->dev, "bitbang start failed with %d\n", ret);
+ goto out_put;
+ }
+
+ return 0;
+
+out_put:
+ spi_master_put(master);
+ return ret;
+}
+
+static int locomo_spi_remove(struct platform_device *pdev)
+{
+ struct spi_master *master = platform_get_drvdata(pdev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CEN, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD, LOCOMO_SPIMD_XEN, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD, LOCOMO_SPIMD_XON, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT,
+ LOCOMO_SPICT_CS,
+ LOCOMO_SPICT_CS);
+
+ return 0;
+}
+
+static struct platform_driver locomo_spi_driver = {
+ .probe = locomo_spi_probe,
+ .remove = locomo_spi_remove,
+ .driver = {
+ .name = "locomo-spi",
+ .pm = LOCOMO_SPI_PM_OPS,
+ },
+};
+module_platform_driver(locomo_spi_driver);
+
+MODULE_AUTHOR("Thomas Kunze thommy@tabao.de");
+MODULE_DESCRIPTION("LoCoMo SPI driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:locomo-spi");
--
2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: Russell King <linux@arm.linux.org.uk>,
Daniel Mack <daniel@zonque.org>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
Samuel Ortiz <sameo@linux.intel.com>,
Lee Jones <lee.jones@linaro.org>, Mark Brown <broonie@kernel.org>,
Jingoo Han <jg1.han@samsung.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Andrea Adami <andrea.adami@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-input@vger.kernel.org, linux-leds@vger.kernel.org,
linux-spi@vger.kernel.org, linux-fbdev@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: [PATCH v3 09/17] spi: add locomo SPI driver
Date: Sun, 17 May 2015 16:27:49 +0000 [thread overview]
Message-ID: <1431880077-26321-10-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1431880077-26321-1-git-send-email-dbaryshkov@gmail.com>
LoCoMo chip has a built-in simple SPI controller. On Sharp SL-5500 PDDAs
it is connected to external MMC slot.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
drivers/spi/Kconfig | 10 ++
drivers/spi/Makefile | 1 +
drivers/spi/spi-locomo.c | 332 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 343 insertions(+)
create mode 100644 drivers/spi/spi-locomo.c
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 198f96b..c9e3176 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -258,6 +258,16 @@ config SPI_LM70_LLP
which interfaces to an LM70 temperature sensor using
a parallel port.
+config SPI_LOCOMO
+ tristate "Locomo SPI master"
+ depends on MFD_LOCOMO
+ help
+ This enables using the SPI controller as present in the LoCoMo
+ chips. It is probably only useful on the Sharp SL-5x00 PDA family.
+
+ On SL-5500 and SL-5000 devices this controller is used for
+ MMC/SD cards.
+
config SPI_MPC52xx
tristate "Freescale MPC52xx SPI (non-PSC) controller support"
depends on PPC_MPC52xx
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index d8cbf65..623c463 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_SPI_GPIO) += spi-gpio.o
obj-$(CONFIG_SPI_IMG_SPFI) += spi-img-spfi.o
obj-$(CONFIG_SPI_IMX) += spi-imx.o
obj-$(CONFIG_SPI_LM70_LLP) += spi-lm70llp.o
+obj-$(CONFIG_SPI_LOCOMO) += spi-locomo.o
obj-$(CONFIG_SPI_MESON_SPIFC) += spi-meson-spifc.o
obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
diff --git a/drivers/spi/spi-locomo.c b/drivers/spi/spi-locomo.c
new file mode 100644
index 0000000..bef0354
--- /dev/null
+++ b/drivers/spi/spi-locomo.c
@@ -0,0 +1,332 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * 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/delay.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/spi/spi.h>
+#include <linux/mfd/locomo.h>
+
+struct locomospi_dev {
+ struct regmap *regmap;
+
+ int clock_base;
+ int clock_div;
+ unsigned nsecs;
+
+ unsigned int save_ct;
+ unsigned int save_md;
+};
+
+static void locomospi_chipselect(struct spi_device *spi, bool enable)
+{
+ struct locomospi_dev *spidev;
+
+ dev_dbg(&spi->dev, "SPI cs: %s\n", enable ? "enable" : "disable");
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS,
+ enable ? LOCOMO_SPICT_CS : 0);
+}
+
+static u32 locomospi_txrx_word(struct spi_device *spi,
+ unsigned nsecs,
+ u32 word)
+{
+ struct locomospi_dev *spidev;
+ int wait;
+ int j;
+ unsigned int rx;
+ unsigned int r;
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ if (spidev->clock_div = DIV_64)
+ wait = 0x10000;
+ else
+ wait = 8;
+
+ for (j = 0; j < wait; j++) {
+ regmap_read(spidev->regmap, LOCOMO_SPIST, &r);
+ if (r & LOCOMO_SPI_RFW)
+ break;
+ }
+ if (j = wait)
+ dev_err_ratelimited(&spi->dev, "rfw timeout\n");
+
+ regmap_write(spidev->regmap, LOCOMO_SPITD, word);
+ ndelay(nsecs);
+
+ for (j = 0; j < wait; j++) {
+ regmap_read(spidev->regmap, LOCOMO_SPIST, &r);
+ if (r & LOCOMO_SPI_RFR)
+ break;
+ }
+ if (j = wait)
+ dev_err_ratelimited(&spi->dev, "rfr timeout\n");
+
+ regmap_read(spidev->regmap, LOCOMO_SPIRD, &rx);
+ ndelay(nsecs);
+
+ dev_dbg(&spi->dev, "SPI txrx: %02x/%02x\n", word, rx);
+
+ return rx;
+}
+
+static void locomo_spi_set_speed(struct locomospi_dev *spidev, u32 hz)
+{
+ spidev->nsecs = (1000000000/2) / hz;
+
+ if (hz >= 24576000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 22579200) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 18432000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 12288000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 11289600) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 9216000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 6144000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 5644800) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 4608000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 3072000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 2822400) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 2304000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 384000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_64;
+ } else if (hz >= 352800) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_64;
+ } else { /* set to 288 Khz */
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_64;
+ }
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XSEL | LOCOMO_SPIMD_CLKSEL |
+ LOCOMO_SPIMD_XEN,
+ 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XSEL | LOCOMO_SPIMD_CLKSEL |
+ LOCOMO_SPIMD_XEN,
+ spidev->clock_div | (spidev->clock_base << 3) |
+ LOCOMO_SPIMD_XEN);
+
+ usleep_range(300, 400);
+}
+
+static int locomo_spi_setup_transfer(struct spi_device *spi,
+ struct spi_transfer *t)
+{
+ struct locomospi_dev *spidev;
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XON,
+ LOCOMO_SPIMD_XON);
+
+ locomo_spi_set_speed(spidev, t->speed_hz);
+
+ return 0;
+}
+
+static int locomospi_transfer_one(struct spi_master *master,
+ struct spi_device *spi,
+ struct spi_transfer *t)
+{
+ struct locomospi_dev *spidev = spi_master_get_devdata(spi->master);
+ int rc;
+ unsigned count;
+ const u8 *tx = t->tx_buf;
+ u8 *rx = t->rx_buf;
+
+ rc = locomo_spi_setup_transfer(spi, t);
+ if (rc < 0)
+ return rc;
+
+ if (!t->len)
+ return 0;
+
+ for (count = t->len; likely(count > 0); count--) {
+ u8 word = 0;
+
+ if (tx)
+ word = *tx++;
+ word = locomospi_txrx_word(spi, spidev->nsecs, word);
+
+ if (rx)
+ *rx++ = word;
+ }
+
+ return 0;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int locomo_spi_suspend(struct device *dev)
+{
+ struct spi_master *master = dev_get_drvdata(dev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+ int ret;
+
+ /* Stop the queue running */
+ ret = spi_master_suspend(master);
+ if (ret) {
+ dev_warn(dev, "cannot suspend master\n");
+ return ret;
+ }
+
+ regmap_read(spidev->regmap, LOCOMO_SPICT, &spidev->save_ct);
+ regmap_write(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS);
+ regmap_read(spidev->regmap, LOCOMO_SPIMD, &spidev->save_md);
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ (CLOCK_25MHZ << 3) | DIV_64);
+
+ return 0;
+}
+
+static int locomo_spi_resume(struct device *dev)
+{
+ struct spi_master *master = dev_get_drvdata(dev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+ int ret;
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD, spidev->save_md);
+ regmap_write(spidev->regmap, LOCOMO_SPICT, spidev->save_ct);
+
+ /* Start the queue running */
+ ret = spi_master_resume(master);
+ if (ret)
+ dev_err(dev, "problem starting queue (%d)\n", ret);
+
+ return ret;
+}
+
+static SIMPLE_DEV_PM_OPS(locomo_spi_pm_ops,
+ locomo_spi_suspend, locomo_spi_resume);
+
+#define LOCOMO_SPI_PM_OPS (&locomo_spi_pm_ops)
+#else
+#define LOCOMO_SPI_PM_OPS NULL
+#endif
+
+static int locomo_spi_probe(struct platform_device *pdev)
+{
+ struct spi_master *master;
+ struct locomospi_dev *spidev;
+ int ret = -ENODEV;
+
+ master = spi_alloc_master(&pdev->dev, sizeof(struct locomospi_dev));
+ if (!master)
+ return -ENOMEM;
+
+ master->bus_num = 0;
+ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
+ master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 8);
+ master->max_speed_hz = 24576000;
+ master->num_chipselect = 1;
+ master->set_cs = locomospi_chipselect;
+ master->transfer_one = locomospi_transfer_one;
+
+ spidev = spi_master_get_devdata(master);
+
+ spidev->regmap = dev_get_regmap(pdev->dev.parent, NULL);
+ if (!spidev->regmap)
+ goto out_put;
+
+ spidev->clock_div = DIV_1;
+ spidev->clock_base = CLOCK_25MHZ;
+
+ platform_set_drvdata(pdev, master);
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ LOCOMO_SPIMD_XON);
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ LOCOMO_SPIMD_XON | LOCOMO_SPIMD_XEN |
+ (spidev->clock_base << 3) | spidev->clock_div);
+
+ regmap_write(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS |
+ LOCOMO_SPICT_CEN | LOCOMO_SPICT_RXUEN |
+ LOCOMO_SPICT_ALIGNEN);
+
+ ret = devm_spi_register_master(&pdev->dev, master);
+ if (ret) {
+ dev_err(&pdev->dev, "bitbang start failed with %d\n", ret);
+ goto out_put;
+ }
+
+ return 0;
+
+out_put:
+ spi_master_put(master);
+ return ret;
+}
+
+static int locomo_spi_remove(struct platform_device *pdev)
+{
+ struct spi_master *master = platform_get_drvdata(pdev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CEN, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD, LOCOMO_SPIMD_XEN, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD, LOCOMO_SPIMD_XON, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT,
+ LOCOMO_SPICT_CS,
+ LOCOMO_SPICT_CS);
+
+ return 0;
+}
+
+static struct platform_driver locomo_spi_driver = {
+ .probe = locomo_spi_probe,
+ .remove = locomo_spi_remove,
+ .driver = {
+ .name = "locomo-spi",
+ .pm = LOCOMO_SPI_PM_OPS,
+ },
+};
+module_platform_driver(locomo_spi_driver);
+
+MODULE_AUTHOR("Thomas Kunze thommy@tabao.de");
+MODULE_DESCRIPTION("LoCoMo SPI driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:locomo-spi");
--
2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: dbaryshkov@gmail.com (Dmitry Eremin-Solenikov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 09/17] spi: add locomo SPI driver
Date: Sun, 17 May 2015 19:27:49 +0300 [thread overview]
Message-ID: <1431880077-26321-10-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1431880077-26321-1-git-send-email-dbaryshkov@gmail.com>
LoCoMo chip has a built-in simple SPI controller. On Sharp SL-5500 PDDAs
it is connected to external MMC slot.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
drivers/spi/Kconfig | 10 ++
drivers/spi/Makefile | 1 +
drivers/spi/spi-locomo.c | 332 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 343 insertions(+)
create mode 100644 drivers/spi/spi-locomo.c
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 198f96b..c9e3176 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -258,6 +258,16 @@ config SPI_LM70_LLP
which interfaces to an LM70 temperature sensor using
a parallel port.
+config SPI_LOCOMO
+ tristate "Locomo SPI master"
+ depends on MFD_LOCOMO
+ help
+ This enables using the SPI controller as present in the LoCoMo
+ chips. It is probably only useful on the Sharp SL-5x00 PDA family.
+
+ On SL-5500 and SL-5000 devices this controller is used for
+ MMC/SD cards.
+
config SPI_MPC52xx
tristate "Freescale MPC52xx SPI (non-PSC) controller support"
depends on PPC_MPC52xx
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index d8cbf65..623c463 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_SPI_GPIO) += spi-gpio.o
obj-$(CONFIG_SPI_IMG_SPFI) += spi-img-spfi.o
obj-$(CONFIG_SPI_IMX) += spi-imx.o
obj-$(CONFIG_SPI_LM70_LLP) += spi-lm70llp.o
+obj-$(CONFIG_SPI_LOCOMO) += spi-locomo.o
obj-$(CONFIG_SPI_MESON_SPIFC) += spi-meson-spifc.o
obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
diff --git a/drivers/spi/spi-locomo.c b/drivers/spi/spi-locomo.c
new file mode 100644
index 0000000..bef0354
--- /dev/null
+++ b/drivers/spi/spi-locomo.c
@@ -0,0 +1,332 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * 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/delay.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/spi/spi.h>
+#include <linux/mfd/locomo.h>
+
+struct locomospi_dev {
+ struct regmap *regmap;
+
+ int clock_base;
+ int clock_div;
+ unsigned nsecs;
+
+ unsigned int save_ct;
+ unsigned int save_md;
+};
+
+static void locomospi_chipselect(struct spi_device *spi, bool enable)
+{
+ struct locomospi_dev *spidev;
+
+ dev_dbg(&spi->dev, "SPI cs: %s\n", enable ? "enable" : "disable");
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS,
+ enable ? LOCOMO_SPICT_CS : 0);
+}
+
+static u32 locomospi_txrx_word(struct spi_device *spi,
+ unsigned nsecs,
+ u32 word)
+{
+ struct locomospi_dev *spidev;
+ int wait;
+ int j;
+ unsigned int rx;
+ unsigned int r;
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ if (spidev->clock_div == DIV_64)
+ wait = 0x10000;
+ else
+ wait = 8;
+
+ for (j = 0; j < wait; j++) {
+ regmap_read(spidev->regmap, LOCOMO_SPIST, &r);
+ if (r & LOCOMO_SPI_RFW)
+ break;
+ }
+ if (j == wait)
+ dev_err_ratelimited(&spi->dev, "rfw timeout\n");
+
+ regmap_write(spidev->regmap, LOCOMO_SPITD, word);
+ ndelay(nsecs);
+
+ for (j = 0; j < wait; j++) {
+ regmap_read(spidev->regmap, LOCOMO_SPIST, &r);
+ if (r & LOCOMO_SPI_RFR)
+ break;
+ }
+ if (j == wait)
+ dev_err_ratelimited(&spi->dev, "rfr timeout\n");
+
+ regmap_read(spidev->regmap, LOCOMO_SPIRD, &rx);
+ ndelay(nsecs);
+
+ dev_dbg(&spi->dev, "SPI txrx: %02x/%02x\n", word, rx);
+
+ return rx;
+}
+
+static void locomo_spi_set_speed(struct locomospi_dev *spidev, u32 hz)
+{
+ spidev->nsecs = (1000000000/2) / hz;
+
+ if (hz >= 24576000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 22579200) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 18432000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_1;
+ } else if (hz >= 12288000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 11289600) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 9216000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_2;
+ } else if (hz >= 6144000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 5644800) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 4608000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_4;
+ } else if (hz >= 3072000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 2822400) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 2304000) {
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_8;
+ } else if (hz >= 384000) {
+ spidev->clock_base = CLOCK_25MHZ;
+ spidev->clock_div = DIV_64;
+ } else if (hz >= 352800) {
+ spidev->clock_base = CLOCK_22MHZ;
+ spidev->clock_div = DIV_64;
+ } else { /* set to 288 Khz */
+ spidev->clock_base = CLOCK_18MHZ;
+ spidev->clock_div = DIV_64;
+ }
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XSEL | LOCOMO_SPIMD_CLKSEL |
+ LOCOMO_SPIMD_XEN,
+ 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XSEL | LOCOMO_SPIMD_CLKSEL |
+ LOCOMO_SPIMD_XEN,
+ spidev->clock_div | (spidev->clock_base << 3) |
+ LOCOMO_SPIMD_XEN);
+
+ usleep_range(300, 400);
+}
+
+static int locomo_spi_setup_transfer(struct spi_device *spi,
+ struct spi_transfer *t)
+{
+ struct locomospi_dev *spidev;
+
+ spidev = spi_master_get_devdata(spi->master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_XON,
+ LOCOMO_SPIMD_XON);
+
+ locomo_spi_set_speed(spidev, t->speed_hz);
+
+ return 0;
+}
+
+static int locomospi_transfer_one(struct spi_master *master,
+ struct spi_device *spi,
+ struct spi_transfer *t)
+{
+ struct locomospi_dev *spidev = spi_master_get_devdata(spi->master);
+ int rc;
+ unsigned count;
+ const u8 *tx = t->tx_buf;
+ u8 *rx = t->rx_buf;
+
+ rc = locomo_spi_setup_transfer(spi, t);
+ if (rc < 0)
+ return rc;
+
+ if (!t->len)
+ return 0;
+
+ for (count = t->len; likely(count > 0); count--) {
+ u8 word = 0;
+
+ if (tx)
+ word = *tx++;
+ word = locomospi_txrx_word(spi, spidev->nsecs, word);
+
+ if (rx)
+ *rx++ = word;
+ }
+
+ return 0;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int locomo_spi_suspend(struct device *dev)
+{
+ struct spi_master *master = dev_get_drvdata(dev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+ int ret;
+
+ /* Stop the queue running */
+ ret = spi_master_suspend(master);
+ if (ret) {
+ dev_warn(dev, "cannot suspend master\n");
+ return ret;
+ }
+
+ regmap_read(spidev->regmap, LOCOMO_SPICT, &spidev->save_ct);
+ regmap_write(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS);
+ regmap_read(spidev->regmap, LOCOMO_SPIMD, &spidev->save_md);
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ (CLOCK_25MHZ << 3) | DIV_64);
+
+ return 0;
+}
+
+static int locomo_spi_resume(struct device *dev)
+{
+ struct spi_master *master = dev_get_drvdata(dev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+ int ret;
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD, spidev->save_md);
+ regmap_write(spidev->regmap, LOCOMO_SPICT, spidev->save_ct);
+
+ /* Start the queue running */
+ ret = spi_master_resume(master);
+ if (ret)
+ dev_err(dev, "problem starting queue (%d)\n", ret);
+
+ return ret;
+}
+
+static SIMPLE_DEV_PM_OPS(locomo_spi_pm_ops,
+ locomo_spi_suspend, locomo_spi_resume);
+
+#define LOCOMO_SPI_PM_OPS (&locomo_spi_pm_ops)
+#else
+#define LOCOMO_SPI_PM_OPS NULL
+#endif
+
+static int locomo_spi_probe(struct platform_device *pdev)
+{
+ struct spi_master *master;
+ struct locomospi_dev *spidev;
+ int ret = -ENODEV;
+
+ master = spi_alloc_master(&pdev->dev, sizeof(struct locomospi_dev));
+ if (!master)
+ return -ENOMEM;
+
+ master->bus_num = 0;
+ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
+ master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 8);
+ master->max_speed_hz = 24576000;
+ master->num_chipselect = 1;
+ master->set_cs = locomospi_chipselect;
+ master->transfer_one = locomospi_transfer_one;
+
+ spidev = spi_master_get_devdata(master);
+
+ spidev->regmap = dev_get_regmap(pdev->dev.parent, NULL);
+ if (!spidev->regmap)
+ goto out_put;
+
+ spidev->clock_div = DIV_1;
+ spidev->clock_base = CLOCK_25MHZ;
+
+ platform_set_drvdata(pdev, master);
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ LOCOMO_SPIMD_XON);
+
+ regmap_write(spidev->regmap, LOCOMO_SPIMD,
+ LOCOMO_SPIMD_MSB1ST | LOCOMO_SPIMD_DOSTAT |
+ LOCOMO_SPIMD_RCPOL | LOCOMO_SPIMD_TCPOL |
+ LOCOMO_SPIMD_XON | LOCOMO_SPIMD_XEN |
+ (spidev->clock_base << 3) | spidev->clock_div);
+
+ regmap_write(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CS |
+ LOCOMO_SPICT_CEN | LOCOMO_SPICT_RXUEN |
+ LOCOMO_SPICT_ALIGNEN);
+
+ ret = devm_spi_register_master(&pdev->dev, master);
+ if (ret) {
+ dev_err(&pdev->dev, "bitbang start failed with %d\n", ret);
+ goto out_put;
+ }
+
+ return 0;
+
+out_put:
+ spi_master_put(master);
+ return ret;
+}
+
+static int locomo_spi_remove(struct platform_device *pdev)
+{
+ struct spi_master *master = platform_get_drvdata(pdev);
+ struct locomospi_dev *spidev = spi_master_get_devdata(master);
+
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT, LOCOMO_SPICT_CEN, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD, LOCOMO_SPIMD_XEN, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPIMD, LOCOMO_SPIMD_XON, 0);
+ regmap_update_bits(spidev->regmap, LOCOMO_SPICT,
+ LOCOMO_SPICT_CS,
+ LOCOMO_SPICT_CS);
+
+ return 0;
+}
+
+static struct platform_driver locomo_spi_driver = {
+ .probe = locomo_spi_probe,
+ .remove = locomo_spi_remove,
+ .driver = {
+ .name = "locomo-spi",
+ .pm = LOCOMO_SPI_PM_OPS,
+ },
+};
+module_platform_driver(locomo_spi_driver);
+
+MODULE_AUTHOR("Thomas Kunze thommy at tabao.de");
+MODULE_DESCRIPTION("LoCoMo SPI driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:locomo-spi");
--
2.1.4
next prev parent reply other threads:[~2015-05-17 16:27 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-17 16:27 [PATCH v3 00/17] new LoCoMo driver set Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 02/17] leds: port locomo leds driver to new locomo core Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-18 8:37 ` Jacek Anaszewski
2015-05-18 8:37 ` Jacek Anaszewski
2015-05-18 8:37 ` Jacek Anaszewski
2015-05-17 16:27 ` [PATCH v3 03/17] input: convert LoCoMo keyboard driver to use " Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-18 16:50 ` Dmitry Torokhov
2015-05-18 16:50 ` Dmitry Torokhov
2015-05-18 16:50 ` Dmitry Torokhov
[not found] ` <1431880077-26321-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-17 16:27 ` [PATCH v3 01/17] mfd: add new driver for Sharp LoCoMo Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
[not found] ` <1431880077-26321-2-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-19 10:38 ` Lee Jones
2015-05-19 10:38 ` Lee Jones
2015-05-19 11:21 ` Russell King - ARM Linux
2015-05-19 11:21 ` Russell King - ARM Linux
2015-05-19 11:21 ` Russell King - ARM Linux
2015-05-19 12:33 ` Lee Jones
2015-05-19 12:33 ` Lee Jones
2015-05-19 12:33 ` Lee Jones
2015-05-17 16:27 ` [PATCH v3 04/17] input: make LoCoMo keyboard driver support both poodle and collie Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
[not found] ` <1431880077-26321-5-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-18 16:50 ` Dmitry Torokhov
2015-05-18 16:50 ` Dmitry Torokhov
2015-05-18 16:50 ` Dmitry Torokhov
2015-05-17 16:27 ` [PATCH v3 13/17] ASoC: pxa: poodle: make use of new locomo GPIO interface Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 14/17] ARM: pxa: poodle: use new LoCoMo driver Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 17/17] ARM: drop old " Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 05/17] video: backlight: add new locomo backlight driver Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 06/17] video: lcd: add LoCoMo LCD driver Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-19 9:36 ` Lee Jones
2015-05-19 9:36 ` Lee Jones
2015-05-19 9:36 ` Lee Jones
2015-05-19 9:45 ` Dmitry Eremin-Solenikov
2015-05-19 9:45 ` Dmitry Eremin-Solenikov
2015-05-19 9:45 ` Dmitry Eremin-Solenikov
2015-05-19 12:34 ` Lee Jones
2015-05-19 12:34 ` Lee Jones
2015-05-19 12:34 ` Lee Jones
2015-05-17 16:27 ` [PATCH v3 07/17] gpio: port LoCoMo gpio support from old driver Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 08/17] gpio: locomo: implement per-pin irq handling Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov [this message]
2015-05-17 16:27 ` [PATCH v3 09/17] spi: add locomo SPI driver Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 10/17] i2c: add locomo i2c driver Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 11/17] ARM: sa1100: make collie use new locomo drivers Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 12/17] ARM: sa1100: don't preallocate IRQ space for locomo Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 15/17] ARM: pxa: poodle: " Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` [PATCH v3 16/17] video: backlight: drop old locomo bl/lcd driver Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
2015-05-17 16:27 ` Dmitry Eremin-Solenikov
-- strict thread matches above, loose matches on Subject: below --
2015-05-20 12:26 [PATCH v3 06/17] video: lcd: add LoCoMo LCD driver Jingoo Han
2015-05-20 12:26 ` Jingoo Han
2015-05-20 12:26 ` Jingoo Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431880077-26321-10-git-send-email-dbaryshkov@gmail.com \
--to=dbaryshkov@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=andrea.adami@gmail.com \
--cc=broonie@kernel.org \
--cc=cooloney@gmail.com \
--cc=daniel@zonque.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gnurou@gmail.com \
--cc=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=plagnioj@jcrosoft.com \
--cc=robert.jarzmik@free.fr \
--cc=rpurdie@rpsys.net \
--cc=sameo@linux.intel.com \
--cc=tomi.valkeinen@ti.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.