linux-stable/drivers/staging/greybus
Vaibhav Hiremath 921dbe52b4 greybus: arche-platform: Add support for SPI bus sharing for Mihi
In case of Mihi, SPI bus is shared between APB1 and APB2
SPI ROMs, so their FW flashing must be sequential and
arche-platform driver should make sure that they are mutual
exclusive in nature.

So this patch adds certain restrictions to the user of the
arche-platform driver,

 - User can no longer flash APB1 and APB2 SPI ROM in parallel
 - SPI bus becomes an resource, so user must claim it by moving
   respective APB device into FW_FLASHING mode and release it
   by exiting FW_FLASHING mode. User can exit FW_FLASHING mode by
   switching to any other modes (ACTIVE, OFF, STANDBY).
 - If APB1 is in FW_FLASHING mode, APB2 can no longer enter into
   FW_FLASHING mode. User will get -EBUSY.

Having said that, while APB1 is into FW_FLASHING mode,
APB2 can independently boot from its own SPI ROM.

Testing Done: Tested by simulating usecase on EVT2.
 - Made sure that APB1 and APB2 FW_FLASHING mode is mutual exclusive
   in nature. Confirmed that an attempt on second device return -EBUSY.
 - Added simulating code, where printed state of dummy gpio for
   spi-en and verified that it shows right pin status for both APBs

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-03 15:45:08 +02:00
..
Documentation greybus: Documentation/sysfs: replace Ara references 2016-07-28 07:30:13 -07:00
scripts greybus: checkpatch.pl: Mark --no-tree as default option 2016-04-02 19:44:30 -07:00
tools greybus: loopback_test: Add -f argument to cancel all tests 2016-07-20 11:23:03 -07:00
.gitignore greybus: tools: Add tools directory to greybus repo and add loopback 2015-12-17 18:17:07 -08:00
arche-apb-ctrl.c greybus: arche-platform: Add support for SPI bus sharing for Mihi 2016-08-03 15:45:08 +02:00
arche-platform.c greybus: arche-platform: Add support for SPI bus sharing for Mihi 2016-08-03 15:45:08 +02:00
arche_platform.h greybus: timesync: Add timesync core driver 2016-06-06 20:37:47 -07:00
audio_apbridgea.c greybus: audio: apbridgea: Remove GET_TX/RX_DELAY message types 2016-08-03 10:59:13 +02:00
audio_apbridgea.h greybus: audio: apbridgea: Remove GET_TX/RX_DELAY message types 2016-08-03 10:59:13 +02:00
audio_codec.c greybus: audio: Avoid using ARA keyword 2016-07-22 10:26:01 -07:00
audio_codec.h greybus: audio: Remove GET_TX/RX_DELAY message types 2016-08-03 10:59:13 +02:00
audio_gb.c greybus: audio: Remove GET_TX/RX_DELAY message types 2016-08-03 10:59:13 +02:00
audio_manager.c greybus: audio: gb_manager: Use valid argument while removing ida allocated id. 2016-05-18 16:33:31 -07:00
audio_manager.h greybus: audio_manager: Split device type into i/p & o/p devices 2016-04-05 09:39:22 -04:00
audio_manager_module.c greybus: audio_manager: Split device type into i/p & o/p devices 2016-04-05 09:39:22 -04:00
audio_manager_private.h greybus: audio: Add Audio Manager 2016-01-13 16:12:56 -08:00
audio_manager_sysfs.c greybus: audio_manager: Split device type into i/p & o/p devices 2016-04-05 09:39:22 -04:00
audio_module.c greybus: audio: add runtime pm support 2016-07-14 16:53:55 -05:00
audio_topology.c greybus: audio: add runtime pm to enumerated control and DAPM widget 2016-07-26 20:58:37 -07:00
authentication.c greybus: firmware: Add runtime PM support 2016-07-26 15:29:00 -07:00
bootrom.c greybus: replace Ara references 2016-07-28 07:30:13 -07:00
bundle.c greybus: bundle: add runtime pm support 2016-07-14 16:53:55 -05:00
bundle.h greybus: bundle: add runtime pm support 2016-07-14 16:53:55 -05:00
camera.c greybus: camera: Rename debug and metadata mbus formats 2016-07-27 17:26:52 -07:00
connection.c greybus: connection: fix offloaded-connection ping cport id 2016-08-03 15:42:38 +02:00
connection.h greybus: connection: add support for high-priority connections 2016-06-24 16:22:30 -07:00
control.c greybus: control: remove some braces 2016-08-03 15:42:38 +02:00
control.h greybus: control: suppress bundle_activate() for bootrom 2016-07-21 16:36:48 -07:00
core.c greybus: pm: add error handling to bundle activation 2016-07-21 18:54:11 -07:00
debugfs.c greybus: core: add device prefix to error messages 2016-02-11 21:44:17 -08:00
devices greybus: devices: endpoint description of device 2014-09-13 17:31:27 -07:00
es2.c greybus: es2: rename USB vendor-request timeout define 2016-08-03 15:42:38 +02:00
firmware.h greybus: firmware.h: rename TFTF firmware filenames 2016-07-21 16:33:25 -07:00
fw-core.c greybus: interface: Add quirk for no PM for S2 Loader 2016-07-26 15:29:00 -07:00
fw-download.c greybus: move all firmware prefix strings to one place 2016-07-20 10:29:07 -07:00
fw-management.c greybus: firmware: Add 'status' byte to backend fw version response 2016-07-26 16:16:15 -07:00
gb-camera.h greybus: camera: Update CSI config parameters 2016-07-17 10:31:21 +09:00
gbphy.c greybus: gbphy: add gbphy runtime pm support 2016-07-14 16:53:55 -05:00
gbphy.h greybus: gbphy: add gbphy runtime pm support 2016-07-14 16:53:55 -05:00
gpio.c greybus: gpio: Add runtime_pm suppourt 2016-07-14 16:53:55 -05:00
greybus.h greybus: interface: add runtime pm support 2016-07-14 16:53:55 -05:00
greybus_authentication.h greybus: Add Component Authentication Protocol support 2016-07-06 17:51:32 -05:00
greybus_firmware.h greybus: firmware: Add 'status' byte to backend fw version response 2016-07-26 16:16:15 -07:00
greybus_id.h greybus: Use BIT(2) for GREYBUS_ID_MATCH_CLASS 2016-06-09 17:28:02 -07:00
greybus_manifest.h greybus: Add Component Authentication Protocol support 2016-07-06 17:51:32 -05:00
greybus_protocols.h greybus: es2: clean up ARPC symbol names 2016-08-03 15:42:38 +02:00
greybus_trace.h greybus: tracing: drop "greybus" prefix 2016-06-09 12:12:43 -07:00
hd.c greybus: hd: arche-platform: implement greybus shutdown 2016-07-16 07:58:52 +09:00
hd.h greybus: hd: arche-platform: implement greybus shutdown 2016-07-16 07:58:52 +09:00
hid.c greybus: HID: Add runtime pm support 2016-07-22 15:25:18 -07:00
i2c.c greybus: i2c: add runtime pm support 2016-07-14 16:53:55 -05:00
interface.c greybus: interface: delete control device upon enable failure 2016-08-03 10:52:20 +02:00
interface.h greybus: replace Ara references 2016-07-28 07:30:13 -07:00
kernel_ver.h greybus: power_supply: convert greybus properties to power supply properties 2016-07-16 07:55:41 +09:00
LICENSE greybus: Initial commit 2014-08-11 15:29:23 +08:00
light.c greybus: light: Initialize mutex before using it 2016-06-29 16:37:17 -07:00
log.c greybus: add support for the log protocol 2016-06-24 15:46:52 -07:00
loopback.c greybus: loopback: add runtime pm support 2016-07-14 16:53:55 -05:00
Makefile greybus: Add Component Authentication Protocol support 2016-07-06 17:51:32 -05:00
manifest.c greybus: manifest: Disallow reuse of control cport 2016-06-15 23:57:20 -07:00
manifest.h greybus: manifest: Use interface descriptor instead of module descriptor to get information 2015-04-06 12:05:58 +02:00
module.c greybus: interface: prevent reactivation during removal 2016-07-20 10:16:54 -07:00
module.h greybus: core: add module abstraction 2016-04-25 11:08:30 -07:00
operation.c greybus: operation: clean up request handler 2016-07-26 14:53:19 -07:00
operation.h greybus: operation: add helper for creating core operations 2016-05-27 12:21:16 -07:00
power_supply.c greybus: power_supply: convert greybus properties to power supply properties 2016-07-16 07:55:41 +09:00
pwm.c greybus: pwm: Add runtime_pm support 2016-07-14 16:53:55 -05:00
raw.c greybus: raw: use hexadecimal notation for request types 2016-03-03 10:02:48 -08:00
README greybus: update README with info on how to build and contact me. 2014-08-11 15:44:51 +08:00
sdio.c greybus: sdio: add switch voltage operation 2016-07-19 16:38:24 -07:00
spi.c greybus: spilib: make spilib independent of gbphy 2016-07-21 19:03:05 -07:00
spilib.c greybus: spilib: make spilib independent of gbphy 2016-07-21 19:03:05 -07:00
spilib.h greybus: spilib: make spilib independent of gbphy 2016-07-21 19:03:05 -07:00
svc.c greybus: svc_watchdog: Add sysfs file to change the behavior of bite 2016-07-26 20:58:37 -07:00
svc.h greybus: svc_watchdog: Add sysfs file to change the behavior of bite 2016-07-26 20:58:37 -07:00
svc_watchdog.c greybus: svc_watchdog: use schedule_delayed_work helper 2016-08-03 10:59:13 +02:00
timesync.c greybus: timesync: Printout strobe count on sync failure 2016-08-03 10:59:13 +02:00
timesync.h greybus: timesync: Add gb_timesync_frame_time_to_timespec() 2016-06-06 20:50:08 -07:00
timesync_platform.c greybus: timesync: Add timesync core driver 2016-06-06 20:37:47 -07:00
uart.c greybus: uart: Add runtime pm support 2016-07-14 16:53:55 -05:00
usb.c greybus: gbphy: Remove protocol specific version handling 2016-05-31 22:02:58 -07:00
vibrator.c greybus: vibrator: integrate runtime pm 2016-07-22 14:06:39 -07:00

Greybus kernel code

To build against the running kernel (odds are you don't want this):
	make

To build against a specific kernel source tree (odds are you want this):
	KERNELDIR=/home/some/random/place make

Any questions / concerns about this code base, please email:
	Greg Kroah-Hartman <greg@kroah.com>