Skip to contentSkip to conversation

drivers/fsi: Add GPIO based FSI master

PATCH Superseded [email protected] 1 participant 1 message Jan 12, 2017 FSI

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 17/18 drivers/fsi: Add GPIO based FSI master

From: Chris Bostic <[email protected]>

Implement a FSI master using GPIO. Will generate FSI protocol for read and write commands to particular addresses. Sends master command and waits for and decodes a slave response.

Includes Jeremy Kerr's original GPIO master base commit.

---

V2 - Merge fsi_master_gpio_init() into probe.

- Remove scan sysfs file creation since its now created in the core.

- Set pin initial output values at time of requesting the pins from the gpio driver.

- Assign value to master->master.dev at probe time.

- Use the get_optional gpio driver interface for all optional pins.

---
 drivers/fsi/Kconfig           |  11 +
 drivers/fsi/Makefile          |   1 +
 drivers/fsi/fsi-master-gpio.c | 530 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 542 insertions(+)
 create mode 100644 drivers/fsi/fsi-master-gpio.c
drivers/fsi/Kconfig +11 -0
index 04c1a0e..9cf8345 100644
@@ -9,4 +9,15 @@ config FSI
 	---help---
 	  FSI - the FRU Support Interface - is a simple bus for low-level
 	  access to POWER-based hardware.
+
+if FSI
+
+config FSI_MASTER_GPIO
+	tristate "GPIO-based FSI master"
+	depends on FSI && GPIOLIB
+	---help---
+	This option enables a FSI master driver using GPIO lines.
+
+endif
+
 endmenu
drivers/fsi/Makefile +1 -0
index db0e5e7..ed28ac0 100644
@@ -1,2 +1,3 @@
 
 obj-$(CONFIG_FSI) += fsi-core.o
+obj-$(CONFIG_FSI_MASTER_GPIO) += fsi-master-gpio.o
drivers/fsi/fsi-master-gpio.c new file +530 -0

530 lines not on this page · raw message

Signature · 1 line
1.8.2.2