Skip to contentSkip to conversation

msm: add single-wire serial bus interface (SSBI) driver

PATCH Superseded Kenneth Heitke 7 participants 15 messages Feb 24, 2011 – Feb 25, 2011 Arm Qualcomm mailing list

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover msm: add single-wire serial bus interface (SSBI) driver

These patches replace the previous patch by moving the SSBI driver from the arch/arm/mach-msm directory to drivers/msm.

The MAINTAINERS file is being updated to add the appropriate maintainer for drivers/msm.

Kenneth Heitke (2):
MAINTAINERS: Add drivers/msm to MSM subsystem
msm: add single-wire serial bus interface (SSBI) driver

 MAINTAINERS              |    1 +
 drivers/Kconfig          |    2 +
 drivers/Makefile         |    1 +
 drivers/msm/Kconfig      |   13 ++
 drivers/msm/Makefile     |    4 +
 drivers/msm/ssbi.c       |  376 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/msm_ssbi.h |   49 ++++++
 7 files changed, 446 insertions(+), 0 deletions(-)
 create mode 100644 drivers/msm/Kconfig
 create mode 100644 drivers/msm/Makefile
 create mode 100644 drivers/msm/ssbi.c
 create mode 100644 include/linux/msm_ssbi.h
Signature · 4 lines
1.7.3.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum
#1 lore raw

PATCH v2 1/2 MAINTAINERS: Add drivers/msm to MSM subsystem

---
 MAINTAINERS |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
MAINTAINERS +1 -0
index 6f99e12..e2ca70b 100644
@@ -889,6 +889,7 @@ M:	Daniel Walker <[email protected]>
 M:	Bryan Huntsman <[email protected]>
 L:	linux-arm-msm at vger.kernel.org
 F:	arch/arm/mach-msm/
+F:	drivers/msm/
 F:	drivers/video/msm/
 F:	drivers/mmc/host/msm_sdcc.c
 F:	drivers/mmc/host/msm_sdcc.h
Signature · 4 lines
1.7.3.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum
#3 lore raw

PATCH v2 2/2 msm: add single-wire serial bus interface (SSBI) driver

In reply to Kenneth Heitke

SSBI is the Qualcomm single-wire serial bus interface used to connect the MSM devices to the PMIC and other devices.

Since SSBI only supports a single slave, the driver gets the name of the slave device passed in from the board file through the master device's platform data.

SSBI registers pretty early (postcore), so that the PMIC can come up before the board init. This is useful if the board init requires the use of gpios that are connected through the PMIC.

Based on a patch by Dima Zavin <[email protected]> that can be found at:
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4

This patch adds PMIC Arbiter support for the MSM8660. The PMIC Arbiter is a hardware wrapper around the SSBI 2.0 controller that is designed to overcome concurrency issues and security limitations. A controller_type field is added to the platform data to specify the type of the SSBI controller (1.0, 2.0, or PMIC Arbiter).

---
 drivers/Kconfig          |    2 +
 drivers/Makefile         |    1 +
 drivers/msm/Kconfig      |   13 ++
 drivers/msm/Makefile     |    4 +
 drivers/msm/ssbi.c       |  376 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/msm_ssbi.h |   49 ++++++
 6 files changed, 445 insertions(+), 0 deletions(-)
 create mode 100644 drivers/msm/Kconfig
 create mode 100644 drivers/msm/Makefile
 create mode 100644 drivers/msm/ssbi.c
 create mode 100644 include/linux/msm_ssbi.h
drivers/Kconfig +2 -0
index 9bfb71f..fceeb20 100644
@@ -117,4 +117,6 @@ source "drivers/staging/Kconfig"
 source "drivers/platform/Kconfig"
 
 source "drivers/clk/Kconfig"
+
+source "drivers/msm/Kconfig"
 endmenu
drivers/Makefile +1 -0
index b423bb1..14cb94b 100644
@@ -117,3 +117,4 @@ obj-y				+= platform/
 obj-y				+= ieee802154/
 #common clk code
 obj-y				+= clk/
+obj-y				+= msm/
drivers/msm/Kconfig new file +13 -0
new file mode 100644
index 0000000..413bb65
@@ -0,0 +1,13 @@
+menu "Qualcomm MSM specific device drivers"
+	depends on ARCH_MSM
+
+config MSM_SSBI
+	bool "Qualcomm Single-wire Serial Bus Interface (SSBI)"
+	help
+	  If you say yes to this option, support will be included for the
+	  built-in SSBI interface on Qualcomm MSM family processors.
+
+	  This is required for communicating with Qualcomm PMICs and
+	  other devices that have the SSBI interface.
+
+endmenu
drivers/msm/Makefile new file +4 -0
new file mode 100644
index 0000000..ea8c1e4
@@ -0,0 +1,4 @@
+#
+# Makefile for the MSM specific device drivers.
+#
+obj-$(CONFIG_MSM_SSBI) += ssbi.o
drivers/msm/ssbi.c new file +376 -0

376 lines not on this page · raw message

include/linux/msm_ssbi.h new file +49 -0

49 lines not on this page · raw message

Signature · 4 lines
1.7.3.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum
Acked-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] MAINTAINERS: Add drivers/msm to MSM subsystem

In reply to Kenneth Heitke
Quoted 1 line · Kenneth Heitke
Quoted 27 lines
---
 MAINTAINERS |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
MAINTAINERS +1 -0
index 6f99e12..e2ca70b 100644
@@ -889,6 +889,7 @@ M:	Daniel Walker <[email protected]>
 M:	Bryan Huntsman <[email protected]>
 L:	linux-arm-msm at vger.kernel.org
 F:	arch/arm/mach-msm/
+F:	drivers/msm/
 F:	drivers/video/msm/
 F:	drivers/mmc/host/msm_sdcc.c
 F:	drivers/mmc/host/msm_sdcc.h
Signature · 9 lines
1.7.3.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
#4 lore raw
In reply to Kenneth Heitke

You have some submission problems. one is that the subject should be "drivers: msm: ..." , this patch also shouldn't go to David.

Quoted 7 lines · Kenneth Heitke

SSBI is the Qualcomm single-wire serial bus interface used to connect the MSM devices to the PMIC and other devices.

Since SSBI only supports a single slave, the driver gets the name of the slave device passed in from the board file through the master device's platform data.

Quoted 6 lines

SSBI registers pretty early (postcore), so that the PMIC can come up before the board init. This is useful if the board init requires the use of gpios that are connected through the PMIC.

Based on a patch by Dima Zavin <[email protected]> that can be found at:
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4

I don't really like links in the commit text, cause as soon as Google deletes this tree the link is worthless.

Quoted 75 lines

This patch adds PMIC Arbiter support for the MSM8660. The PMIC Arbiter is a hardware wrapper around the SSBI 2.0 controller that is designed to overcome concurrency issues and security limitations. A controller_type field is added to the platform data to specify the type of the SSBI controller (1.0, 2.0, or PMIC Arbiter).

---
 drivers/Kconfig          |    2 +
 drivers/Makefile         |    1 +
 drivers/msm/Kconfig      |   13 ++
 drivers/msm/Makefile     |    4 +
 drivers/msm/ssbi.c       |  376 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/msm_ssbi.h |   49 ++++++
 6 files changed, 445 insertions(+), 0 deletions(-)
 create mode 100644 drivers/msm/Kconfig
 create mode 100644 drivers/msm/Makefile
 create mode 100644 drivers/msm/ssbi.c
 create mode 100644 include/linux/msm_ssbi.h
drivers/Kconfig +2 -0
index 9bfb71f..fceeb20 100644
@@ -117,4 +117,6 @@ source "drivers/staging/Kconfig"
 source "drivers/platform/Kconfig"
 
 source "drivers/clk/Kconfig"
+
+source "drivers/msm/Kconfig"
 endmenu
drivers/Makefile +1 -0
index b423bb1..14cb94b 100644
@@ -117,3 +117,4 @@ obj-y				+= platform/
 obj-y				+= ieee802154/
 #common clk code
 obj-y				+= clk/
+obj-y				+= msm/
drivers/msm/Kconfig new file +13 -0
new file mode 100644
index 0000000..413bb65
@@ -0,0 +1,13 @@
+menu "Qualcomm MSM specific device drivers"
+	depends on ARCH_MSM
+
+config MSM_SSBI
+	bool "Qualcomm Single-wire Serial Bus Interface (SSBI)"
+	help
+	  If you say yes to this option, support will be included for the
+	  built-in SSBI interface on Qualcomm MSM family processors.
+
+	  This is required for communicating with Qualcomm PMICs and
+	  other devices that have the SSBI interface.
+
+endmenu
drivers/msm/Makefile new file +4 -0
new file mode 100644
index 0000000..ea8c1e4
@@ -0,0 +1,4 @@
+#
+# Makefile for the MSM specific device drivers.
+#
+obj-$(CONFIG_MSM_SSBI) += ssbi.o
drivers/msm/ssbi.c new file +0 -0
new file mode 100644
index 0000000..1fae443

drivers/msm/ssbi.c line 4

Quoted 4 lines
drivers/msm/ssbi.c new file +4 -0
@@ -0,0 +1,376 @@
+/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2010, Google Inc.
+ *
+ * Original authors: Code Aurura Forum

Spelling problem.

Quoted 217 lines
drivers/msm/ssbi.c new file +217 -0
+ * Author: Dima Zavin <[email protected]>
+ *  - Largely rewritten from original to not be an i2c driver.
+ *
+ * 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/delay.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/msm_ssbi.h>
+
+/* SSBI 2.0 controller registers */
+#define SSBI2_CMD			0x0008
+#define SSBI2_RD			0x0010
+#define SSBI2_STATUS			0x0014
+#define SSBI2_MODE2			0x001C
+
+/* SSBI_CMD fields */
+#define SSBI_CMD_RDWRN			(1 << 24)
+
+/* SSBI_STATUS fields */
+#define SSBI_STATUS_RD_READY		(1 << 2)
+#define SSBI_STATUS_READY		(1 << 1)
+#define SSBI_STATUS_MCHN_BUSY		(1 << 0)
+
+/* SSBI_MODE2 fields */
+#define SSBI_MODE2_REG_ADDR_15_8_SHFT	0x04
+#define SSBI_MODE2_REG_ADDR_15_8_MASK	(0x7f << SSBI_MODE2_REG_ADDR_15_8_SHFT)
+
+#define SET_SSBI_MODE2_REG_ADDR_15_8(MD, AD) \
+	(((MD) & 0x0F) | ((((AD) >> 8) << SSBI_MODE2_REG_ADDR_15_8_SHFT) & \
+	SSBI_MODE2_REG_ADDR_15_8_MASK))
+
+/* SSBI PMIC Arbiter command registers */
+#define SSBI_PA_CMD			0x0000
+#define SSBI_PA_RD_STATUS		0x0004
+
+/* SSBI_PA_CMD fields */
+#define SSBI_PA_CMD_RDWRN		(1 << 24)
+
+/* SSBI_PA_RD_STATUS fields */
+#define SSBI_PA_RD_STATUS_TRANS_DONE	(1 << 27)
+#define SSBI_PA_RD_STATUS_TRANS_DENIED	(1 << 26)
+
+#define SSBI_TIMEOUT_US			100
+
+struct msm_ssbi {
+	struct device		*dev;
+	struct device		*slave;
+	void __iomem		*base;
+	spinlock_t		lock;
+	enum msm_ssbi_controller_type controller_type;
+	int (*read)(struct msm_ssbi *, u16 addr, u8 *buf, int len);
+	int (*write)(struct msm_ssbi *, u16 addr, u8 *buf, int len);
+};
+
+#define to_msm_ssbi(dev)	platform_get_drvdata(to_platform_device(dev))
+
+static inline u32 ssbi_readl(struct msm_ssbi *ssbi, u32 reg)
+{
+	return readl(ssbi->base + reg);
+}
+
+static inline void ssbi_writel(struct msm_ssbi *ssbi, u32 val, u32 reg)
+{
+	writel(val, ssbi->base + reg);
+}
+
+static int ssbi_wait_mask(struct msm_ssbi *ssbi, u32 set_mask, u32 clr_mask)
+{
+	u32 timeout = SSBI_TIMEOUT_US;
+	u32 val;
+
+	while (timeout--) {
+		val = ssbi_readl(ssbi, SSBI2_STATUS);
+		if (((val & set_mask) == set_mask) && ((val & clr_mask) == 0))
+			return 0;
+		udelay(1);
+	}
+
+	dev_err(ssbi->dev, "%s: timeout (status %x set_mask %x clr_mask %x)\n",
+		__func__, ssbi_readl(ssbi, SSBI2_STATUS), set_mask, clr_mask);
+	return -ETIMEDOUT;
+}
+
+static int
+msm_ssbi_read_bytes(struct msm_ssbi *ssbi, u16 addr, u8 *buf, int len)
+{
+	u32 cmd = SSBI_CMD_RDWRN | ((addr & 0xff) << 16);
+	int ret = 0;
+
+	if (ssbi->controller_type == MSM_SBI_CTRL_SSBI2) {
+		u32 mode2 = ssbi_readl(ssbi, SSBI2_MODE2);
+		mode2 = SET_SSBI_MODE2_REG_ADDR_15_8(mode2, addr);
+		ssbi_writel(ssbi, mode2, SSBI2_MODE2);
+	}
+
+	while (len) {
+		ret = ssbi_wait_mask(ssbi, SSBI_STATUS_READY, 0);
+		if (ret)
+			goto err;
+
+		ssbi_writel(ssbi, cmd, SSBI2_CMD);
+		ret = ssbi_wait_mask(ssbi, SSBI_STATUS_RD_READY, 0);
+		if (ret)
+			goto err;
+		*buf++ = ssbi_readl(ssbi, SSBI2_RD) & 0xff;
+		len--;
+	}
+
+err:
+	return ret;
+}
+
+static int
+msm_ssbi_write_bytes(struct msm_ssbi *ssbi, u16 addr, u8 *buf, int len)
+{
+	int ret = 0;
+
+	if (ssbi->controller_type == MSM_SBI_CTRL_SSBI2) {
+		u32 mode2 = ssbi_readl(ssbi, SSBI2_MODE2);
+		mode2 = SET_SSBI_MODE2_REG_ADDR_15_8(mode2, addr);
+		ssbi_writel(ssbi, mode2, SSBI2_MODE2);
+	}
+
+	while (len) {
+		ret = ssbi_wait_mask(ssbi, SSBI_STATUS_READY, 0);
+		if (ret)
+			goto err;
+
+		ssbi_writel(ssbi, ((addr & 0xff) << 16) | *buf, SSBI2_CMD);
+		ret = ssbi_wait_mask(ssbi, 0, SSBI_STATUS_MCHN_BUSY);
+		if (ret)
+			goto err;
+		buf++;
+		len--;
+	}
+
+err:
+	return ret;
+}
+
+static inline int
+msm_ssbi_pa_transfer(struct msm_ssbi *ssbi, u32 cmd, u8 *data)
+{
+	u32 timeout = SSBI_TIMEOUT_US;
+	u32 rd_status = 0;
+
+	ssbi_writel(ssbi, cmd, SSBI_PA_CMD);
+
+	while (timeout--) {
+		rd_status = ssbi_readl(ssbi, SSBI_PA_RD_STATUS);
+
+		if (rd_status & SSBI_PA_RD_STATUS_TRANS_DENIED) {
+			dev_err(ssbi->dev, "%s: transaction denied (0x%x)\n",
+					__func__, rd_status);
+			return -EPERM;
+		}
+
+		if (rd_status & SSBI_PA_RD_STATUS_TRANS_DONE) {
+			if (data)
+				*data = rd_status & 0xff;
+			return 0;
+		}
+		udelay(1);
+	}
+
+	dev_err(ssbi->dev, "%s: timeout, status 0x%x\n", __func__, rd_status);
+	return -ETIMEDOUT;
+}
+
+static int
+msm_ssbi_pa_read_bytes(struct msm_ssbi *ssbi, u16 addr, u8 *buf, int len)
+{
+	u32 cmd;
+	int ret = 0;
+
+	cmd = SSBI_PA_CMD_RDWRN | (addr & 0x3fff) << 8;
+
+	while (len) {
+		ret = msm_ssbi_pa_transfer(ssbi, cmd, buf);
+		if (ret)
+			goto err;
+		buf++;
+		len--;
+	}
+
+err:
+	return ret;
+}
+
+static int
+msm_ssbi_pa_write_bytes(struct msm_ssbi *ssbi, u16 addr, u8 *buf, int len)
+{
+	u32 cmd;
+	int ret = 0;
+
+	while (len) {
+		cmd = (addr & 0x3fff) << 8 | *buf;
+		ret = msm_ssbi_pa_transfer(ssbi, cmd, NULL);
+		if (ret)
+			goto err;
+		buf++;
+		len--;
+	}
+
+err:

drivers/msm/ssbi.c line 232

Quoted 10 lines
drivers/msm/ssbi.c new file +10 -0
+	return ret;
+}
+
+int msm_ssbi_read(struct device *dev, u16 addr, u8 *buf, int len)
+{
+	struct msm_ssbi *ssbi = to_msm_ssbi(dev);
+	unsigned long flags;
+	int ret;
+
+	BUG_ON(ssbi->dev != dev);

Are you sure you don't just want to bail out here, cause this hangs the system when it triggers?

Quoted 23 lines
drivers/msm/ssbi.c new file +23 -0
+	spin_lock_irqsave(&ssbi->lock, flags);
+	ret = ssbi->read(ssbi, addr, buf, len);
+	spin_unlock_irqrestore(&ssbi->lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(msm_ssbi_read);
+
+int msm_ssbi_write(struct device *dev, u16 addr, u8 *buf, int len)
+{
+	struct msm_ssbi *ssbi = to_msm_ssbi(dev);
+	unsigned long flags;
+	int ret;
+
+	BUG_ON(ssbi->dev != dev);
+
+	spin_lock_irqsave(&ssbi->lock, flags);
+	ret = ssbi->write(ssbi, addr, buf, len);
+	spin_unlock_irqrestore(&ssbi->lock, flags);
+
+	return ret;
+}
+EXPORT_SYMBOL(msm_ssbi_write);

drivers/msm/ssbi.c line 266

Quoted 10 lines
drivers/msm/ssbi.c new file +10 -0
+
+static int __devinit msm_ssbi_add_slave(struct msm_ssbi *ssbi,
+				     const struct msm_ssbi_slave_info *slave)
+{
+	struct platform_device *slave_pdev;
+	int ret;
+
+	if (ssbi->slave) {
+		pr_err("%s: slave already attached??\n", __func__);
+		return -EBUSY;

You can use a pr_fmt line to add the __func__ part, look in mach-msm for examples.

Quoted 27 lines
drivers/msm/ssbi.c new file +27 -0
+	}
+
+	slave_pdev = platform_device_alloc(slave->name, -1);
+	if (!slave_pdev) {
+		pr_err("%s: cannot allocate pdev for slave '%s'", __func__,
+		       slave->name);
+		ret = -ENOMEM;
+		goto err;
+	}
+
+	slave_pdev->dev.parent = ssbi->dev;
+	slave_pdev->dev.platform_data = slave->platform_data;
+
+	ret = platform_device_add(slave_pdev);
+	if (ret) {
+		pr_err("%s: cannot add slave platform device for '%s'\n",
+		       __func__, slave->name);
+		goto err;
+	}
+
+	ssbi->slave = &slave_pdev->dev;
+	return 0;
+
+err:
+	if (slave_pdev)
+		platform_device_put(slave_pdev);
+	return ret;

drivers/msm/ssbi.c line 303

Quoted 10 lines
drivers/msm/ssbi.c new file +10 -0
+}
+
+static int __devinit msm_ssbi_probe(struct platform_device *pdev)
+{
+	const struct msm_ssbi_platform_data *pdata = pdev->dev.platform_data;
+	struct resource *mem_res;
+	struct msm_ssbi *ssbi;
+	int ret = 0;
+
+	printk(KERN_INFO "%s: %s\n", __func__, pdata->slave.name);

pr_info() ?

Daniel

#5 lore raw
Quoted 2 lines · Daniel Walker

You have some submission problems. one is that the subject should be "drivers: msm: ..." , this patch also shouldn't go to David.

Subject needs to be fixed. Patch to add drivers/msm to the maintainers file has been Acked, so this should be sent to the MSM maintainers.

David

#6 lore raw
Quoted 7 lines · David Brown
Quoted 2 lines · Daniel Walker

You have some submission problems. one is that the subject should be "drivers: msm: ..." , this patch also shouldn't go to David.

Subject needs to be fixed. Patch to add drivers/msm to the maintainers file has been Acked, so this should be sent to the MSM maintainers.

It was only acked by Nico, he's just the one who suggested it. I think Greg needs to be involved at some level ..

Daniel

#7 lore raw

On that note, should we have a "drivers/arm/msm" instead of just "drivers/msm"? Other non-msm arm sub-arches probably have the same problem and polluting drivers/ top-level for every arm-subarch maybe undesirable.

--Dima

Quoted 20 lines · Daniel Walker
Quoted 7 lines · David Brown
Quoted 2 lines · Daniel Walker

You have some submission problems. one is that the subject should be "drivers: msm: ..." , this patch also shouldn't go to David.

Subject needs to be fixed. ?Patch to add drivers/msm to the maintainers file has been Acked, so this should be sent to the MSM maintainers.

It was only acked by Nico, he's just the one who suggested it. I think Greg needs to be involved at some level ..

Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html Please read the FAQ at ?http://www.tux.org/lkml/

#8 lore raw
Quoted 4 lines · Dima Zavin

On that note, should we have a "drivers/arm/msm" instead of just "drivers/msm"? Other non-msm arm sub-arches probably have the same problem and polluting drivers/ top-level for every arm-subarch maybe undesirable.

I'm moving linux-kernel to the 'to' field, and adding Greg KH to CC.

This is about a new driver (ssbi) for the MSM chips, and where the driver for this should go. The driver is specific to MSM chips (as far as I know, the bus is only supported there). There are likely to be future msm-specific drivers, so the suggestion was to put this under drivers/msm, or possibly drivers/arm/msm.

Anyone other suggestions, or preferences for the location?

Thanks,
David Brown

#9 lore raw
Quoted 9 lines · David Brown
Quoted 4 lines · Dima Zavin

On that note, should we have a "drivers/arm/msm" instead of just "drivers/msm"? Other non-msm arm sub-arches probably have the same problem and polluting drivers/ top-level for every arm-subarch maybe undesirable.

I'm moving linux-kernel to the 'to' field, and adding Greg KH to CC.

Quoted 7 lines

This is about a new driver (ssbi) for the MSM chips, and where the driver for this should go. The driver is specific to MSM chips (as far as I know, the bus is only supported there). There are likely to be future msm-specific drivers, so the suggestion was to put this under drivers/msm, or possibly drivers/arm/msm.

Anyone other suggestions, or preferences for the location?

drivers/ssbi? What's keeping this from later moving off of the msm chips to run on others? USB started out only on one processor, as did a lot of other bus-specific drivers, before the hardware became present on other architectures. So no need to bury it under a msm specific location.

Hope this helps,

greg k-h

#10 lore raw
Quoted 5 lines · Greg KH

drivers/ssbi? What's keeping this from later moving off of the msm chips to run on others? USB started out only on one processor, as did a lot of other bus-specific drivers, before the hardware became present on other architectures. So no need to bury it under a msm specific location.

Not sure if anything is stopping it from moving off of MSM chips, but it doesn't seem very likely. There are too many similar interfaces that are standard that others would be likely to use. For the most part, it is the bus to communicate between the MSM and it's specialized peripherals.

We can still put it there, but it will likely be the only driver ever in the directory.

David

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#11 lore raw
Quoted 8 lines · David Brown
Quoted 5 lines · Greg KH

drivers/ssbi? What's keeping this from later moving off of the msm chips to run on others? USB started out only on one processor, as did a lot of other bus-specific drivers, before the hardware became present on other architectures. So no need to bury it under a msm specific location.

Quoted 8 lines

Not sure if anything is stopping it from moving off of MSM chips, but it doesn't seem very likely. There are too many similar interfaces that are standard that others would be likely to use. For the most part, it is the bus to communicate between the MSM and it's specialized peripherals.

We can still put it there, but it will likely be the only driver ever in the directory.

Ah, so it's just one driver? Then how about drivers/platform/msm/ ?

thanks,

greg k-h

#12 lore raw
Quoted 15 lines · Greg KH
Quoted 14 lines · David Brown
Quoted 5 lines · Greg KH

drivers/ssbi? What's keeping this from later moving off of the msm chips to run on others? USB started out only on one processor, as did a lot of other bus-specific drivers, before the hardware became present on other architectures. So no need to bury it under a msm specific location.

Not sure if anything is stopping it from moving off of MSM chips, but it doesn't seem very likely. There are too many similar interfaces that are standard that others would be likely to use. For the most part, it is the bus to communicate between the MSM and it's specialized peripherals.

Quoted 4 lines
Quoted 2 lines

We can still put it there, but it will likely be the only driver ever in the directory.

Ah, so it's just one driver? Then how about drivers/platform/msm/ ?

I like it. It keeps drivers from getting cluttered. Plus x86 is getting lonely in there.

Ken, in addition to addressing the comments made so far and any others that come in, let's put this under drivers/platform/msm.

Thanks,
David

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#13 lore raw
In reply to Daniel Walker
Quoted 5 lines · Daniel Walker
Quoted 2 lines

Based on a patch by Dima Zavin <[email protected]> that can be found at:
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4

I don't really like links in the commit text, cause as soon as Google deletes this tree the link is worthless.

I'm not sure how to better convey the information. The tree is at least on kernel.org, and there's good useful information there that works now. Links in commit text seem fairly common.

I think it is helpful to demonstrate that Ken is trying to be diligent about indicating where the code comes from.

Thanks,
David

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#14 lore raw
Quoted 8 lines · David Brown
Quoted 5 lines · Daniel Walker
Quoted 2 lines

Based on a patch by Dima Zavin <[email protected]> that can be found at:
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4

I don't really like links in the commit text, cause as soon as Google deletes this tree the link is worthless.

Quoted 6 lines

I'm not sure how to better convey the information. ?The tree is at least on kernel.org, and there's good useful information there that works now. ?Links in commit text seem fairly common.

I think it is helpful to demonstrate that Ken is trying to be diligent about indicating where the code comes from.

We do also keep older branches around, since this is how we publish kernel sources when we ship devices. So while I can't be sure these links will work *forever*, barring mishap they should exist for quite a while.

Brian