From: Samuel Ortiz <sameo@linux.intel.com>
To: Sundar Iyer <sundar.iyer@stericsson.com>
Cc: linux-arm-kernel@lists.infradead.org, dmitry.torokhov@gmail.com,
ben-linux@fluff.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/20] mfd/ab8500: remove spi support
Date: Thu, 9 Dec 2010 15:29:12 +0100 [thread overview]
Message-ID: <20101209142912.GM8884@sortiz-mobl> (raw)
In-Reply-To: <1291388753-14662-2-git-send-email-sundar.iyer@stericsson.com>
Hi Sundar,
On Fri, Dec 03, 2010 at 08:35:34PM +0530, Sundar Iyer wrote:
> Since the Ab8500 v1.0, the SPI support is deprecated on the HW.
I'm fine with that, but you really don't want to be able to support pre 1.0
devices ?
Cheers,
Samuel.
> Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
> ---
> drivers/mfd/Kconfig | 8 +-
> drivers/mfd/Makefile | 2 +-
> drivers/mfd/ab8500-spi.c | 143 ----------------------------------------------
> 3 files changed, 5 insertions(+), 148 deletions(-)
> delete mode 100644 drivers/mfd/ab8500-spi.c
>
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 3a7b891..c856aa7 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -496,13 +496,13 @@ config EZX_PCAP
>
> config AB8500_CORE
> bool "ST-Ericsson AB8500 Mixed Signal Power Management chip"
> - depends on GENERIC_HARDIRQS && ABX500_CORE && SPI_MASTER && ARCH_U8500
> + depends on GENERIC_HARDIRQS && ABX500_CORE && ARCH_U8500
> select MFD_CORE
> help
> Select this option to enable access to AB8500 power management
> - chip. This connects to U8500 either on the SSP/SPI bus
> - or the I2C bus via PRCMU. It also adds the irq_chip
> - parts for handling the Mixed Signal chip events.
> + chip. This connects to U8500 either on the SSP/SPI bus (deprecated
> + since hardware version v1.0) or the I2C bus via PRCMU. It also adds
> + the irq_chip parts for handling the Mixed Signal chip events.
> This chip embeds various other multimedia funtionalities as well.
>
> config AB8500_I2C_CORE
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index 04a7226..67c8bcb 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -70,7 +70,7 @@ obj-$(CONFIG_ABX500_CORE) += abx500-core.o
> obj-$(CONFIG_AB3100_CORE) += ab3100-core.o
> obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o
> obj-$(CONFIG_AB3550_CORE) += ab3550-core.o
> -obj-$(CONFIG_AB8500_CORE) += ab8500-core.o ab8500-spi.o
> +obj-$(CONFIG_AB8500_CORE) += ab8500-core.o
> obj-$(CONFIG_AB8500_I2C_CORE) += ab8500-i2c.o
> obj-$(CONFIG_AB8500_DEBUG) += ab8500-debugfs.o
> obj-$(CONFIG_MFD_TIMBERDALE) += timberdale.o
> diff --git a/drivers/mfd/ab8500-spi.c b/drivers/mfd/ab8500-spi.c
> deleted file mode 100644
> index b165342..0000000
> --- a/drivers/mfd/ab8500-spi.c
> +++ /dev/null
> @@ -1,143 +0,0 @@
> -/*
> - * Copyright (C) ST-Ericsson SA 2010
> - *
> - * License Terms: GNU General Public License v2
> - * Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> - */
> -
> -#include <linux/kernel.h>
> -#include <linux/slab.h>
> -#include <linux/init.h>
> -#include <linux/module.h>
> -#include <linux/platform_device.h>
> -#include <linux/spi/spi.h>
> -#include <linux/mfd/ab8500.h>
> -
> -/*
> - * This funtion writes to any AB8500 registers using
> - * SPI protocol & before it writes it packs the data
> - * in the below 24 bit frame format
> - *
> - * *|------------------------------------|
> - * *| 23|22...18|17.......10|9|8|7......0|
> - * *| r/w bank adr data |
> - * * ------------------------------------
> - *
> - * This function shouldn't be called from interrupt
> - * context
> - */
> -static int ab8500_spi_write(struct ab8500 *ab8500, u16 addr, u8 data)
> -{
> - struct spi_device *spi = container_of(ab8500->dev, struct spi_device,
> - dev);
> - unsigned long spi_data = addr << 10 | data;
> - struct spi_transfer xfer;
> - struct spi_message msg;
> -
> - ab8500->tx_buf[0] = spi_data;
> - ab8500->rx_buf[0] = 0;
> -
> - xfer.tx_buf = ab8500->tx_buf;
> - xfer.rx_buf = NULL;
> - xfer.len = sizeof(unsigned long);
> -
> - spi_message_init(&msg);
> - spi_message_add_tail(&xfer, &msg);
> -
> - return spi_sync(spi, &msg);
> -}
> -
> -static int ab8500_spi_read(struct ab8500 *ab8500, u16 addr)
> -{
> - struct spi_device *spi = container_of(ab8500->dev, struct spi_device,
> - dev);
> - unsigned long spi_data = 1 << 23 | addr << 10;
> - struct spi_transfer xfer;
> - struct spi_message msg;
> - int ret;
> -
> - ab8500->tx_buf[0] = spi_data;
> - ab8500->rx_buf[0] = 0;
> -
> - xfer.tx_buf = ab8500->tx_buf;
> - xfer.rx_buf = ab8500->rx_buf;
> - xfer.len = sizeof(unsigned long);
> -
> - spi_message_init(&msg);
> - spi_message_add_tail(&xfer, &msg);
> -
> - ret = spi_sync(spi, &msg);
> - if (!ret)
> - /*
> - * Only the 8 lowermost bytes are
> - * defined with value, the rest may
> - * vary depending on chip/board noise.
> - */
> - ret = ab8500->rx_buf[0] & 0xFFU;
> -
> - return ret;
> -}
> -
> -static int __devinit ab8500_spi_probe(struct spi_device *spi)
> -{
> - struct ab8500 *ab8500;
> - int ret;
> -
> - spi->bits_per_word = 24;
> - ret = spi_setup(spi);
> - if (ret < 0)
> - return ret;
> -
> - ab8500 = kzalloc(sizeof *ab8500, GFP_KERNEL);
> - if (!ab8500)
> - return -ENOMEM;
> -
> - ab8500->dev = &spi->dev;
> - ab8500->irq = spi->irq;
> -
> - ab8500->read = ab8500_spi_read;
> - ab8500->write = ab8500_spi_write;
> -
> - spi_set_drvdata(spi, ab8500);
> -
> - ret = ab8500_init(ab8500);
> - if (ret)
> - kfree(ab8500);
> -
> - return ret;
> -}
> -
> -static int __devexit ab8500_spi_remove(struct spi_device *spi)
> -{
> - struct ab8500 *ab8500 = spi_get_drvdata(spi);
> -
> - ab8500_exit(ab8500);
> - kfree(ab8500);
> -
> - return 0;
> -}
> -
> -static struct spi_driver ab8500_spi_driver = {
> - .driver = {
> - .name = "ab8500-spi",
> - .owner = THIS_MODULE,
> - },
> - .probe = ab8500_spi_probe,
> - .remove = __devexit_p(ab8500_spi_remove)
> -};
> -
> -static int __init ab8500_spi_init(void)
> -{
> - return spi_register_driver(&ab8500_spi_driver);
> -}
> -subsys_initcall(ab8500_spi_init);
> -
> -static void __exit ab8500_spi_exit(void)
> -{
> - spi_unregister_driver(&ab8500_spi_driver);
> -}
> -module_exit(ab8500_spi_exit);
> -
> -MODULE_AUTHOR("Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com");
> -MODULE_DESCRIPTION("AB8500 SPI");
> -MODULE_LICENSE("GPL v2");
> --
> 1.7.2.dirty
>
--
Intel Open Source Technology Centre
http://oss.intel.com/
next prev parent reply other threads:[~2010-12-09 14:29 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 15:05 [PATCH 00/20] ux500: platform data, TC3589x keypad driver Sundar Iyer
2010-12-03 15:05 ` [PATCH 01/20] mfd/ab8500: remove spi support Sundar Iyer
2010-12-09 14:29 ` Samuel Ortiz [this message]
2010-12-03 15:05 ` [PATCH 02/20] mach-ux500: deprecate spi support for ab8500 Sundar Iyer
2010-12-03 15:05 ` [PATCH 03/20] mach-ux500: move keymaps to new file Sundar Iyer
2010-12-19 20:53 ` Linus Walleij
2010-12-03 15:05 ` [PATCH 04/20] nomadik-gpio: allow sleep mode dir/pull to differ from normal mode Sundar Iyer
2010-12-03 15:05 ` [PATCH 05/20] mach-ux500: add STMPE1601 platform data Sundar Iyer
2010-12-19 20:54 ` Linus Walleij
2010-12-03 15:05 ` [PATCH 06/20] mfd/tc35892: rename tc35892 header to tc3589x Sundar Iyer
2010-12-09 15:41 ` Samuel Ortiz
2010-12-03 15:05 ` [PATCH 07/20] mfd/tc35892: rename tc35892 core driver " Sundar Iyer
2010-12-09 15:42 ` Samuel Ortiz
2010-12-03 15:05 ` [PATCH 08/20] mfd/tc3589x: rename tc35892 structs/registers to tc359x Sundar Iyer
2010-12-09 15:45 ` Samuel Ortiz
2010-12-03 15:05 ` [PATCH 09/20] mfd/tc3589x: add block identifier for multiple child devices Sundar Iyer
2010-12-09 15:48 ` Samuel Ortiz
2010-12-03 15:05 ` [PATCH 10/20] input/tc3589x: add tc3589x keypad support Sundar Iyer
2010-12-05 18:38 ` Trilok Soni
2010-12-03 15:05 ` [PATCH 11/20] mfd/tc3589x: fix random interrupt misses Sundar Iyer
2010-12-09 15:49 ` Samuel Ortiz
2010-12-03 15:05 ` [PATCH 12/20] mfd/tc3589x: undo gpio module reset during chip init Sundar Iyer
2010-12-09 15:50 ` Samuel Ortiz
2010-12-03 15:05 ` [PATCH 13/20] mfd/tc3589x: add suspend/resume support Sundar Iyer
2010-12-09 17:03 ` Samuel Ortiz
2010-12-10 4:32 ` Sundar R IYER
2010-12-03 15:05 ` [PATCH 14/20] plat-nomadik/gpio: add expander gpio pins enumeration Sundar Iyer
2010-12-03 15:05 ` [PATCH 15/20] mach-ux500: add touchscreen interfaces platform data Sundar Iyer
2010-12-03 15:05 ` [PATCH 16/20] i2c/nomadik: add adapter name for updated sanity checkings Sundar Iyer
2010-12-03 15:05 ` [PATCH 17/20] mach-ux500: add TC35893 keypad platform data Sundar Iyer
2010-12-03 15:05 ` [PATCH 18/20] mach-ux500: explicit enable MTU TCR in the kernel Sundar Iyer
2010-12-03 15:05 ` [PATCH 19/20] mach-ux500: clean up checkpatch spits Sundar Iyer
2010-12-03 15:05 ` [PATCH 20/20] i2c/nomadik: some checkpatch warnings Sundar Iyer
2010-12-19 21:03 ` [PATCH 00/20] ux500: platform data, TC3589x keypad driver Linus Walleij
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=20101209142912.GM8884@sortiz-mobl \
--to=sameo@linux.intel.com \
--cc=ben-linux@fluff.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sundar.iyer@stericsson.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).