]> git.karo-electronics.de Git - linux-beck.git/commit
greybus: spi: add device_type field to device config
authorRui Miguel Silva <rui.silva@linaro.org>
Tue, 2 Feb 2016 14:23:16 +0000 (14:23 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 6 Feb 2016 00:50:20 +0000 (16:50 -0800)
commit0273038df61349868d368dd9254eb629425a3378
treebe087359de04e60161becd5b176b3b3b7fb5c26e
parent9d4bb6c9183f1283158bbb00ebf65ec4cf18ee33
greybus: spi: add device_type field to device config

Add device_type field in device config operation to get the type of
device and try to expose less the kernel internal over greybus.
This include the spidev, spi-nor will fetch the correct nor id over
jede and a modalias that will have the previous behavior (name will set
the driver to be loaded).

As at it, fix a trivial error path and return immediately.

Tested: using gbsim and confirming that a spidev and mtd device were
created.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/kernel_ver.h
drivers/staging/greybus/spi.c