aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-01-02 04:24:50 -0500
committerIngo Molnar <mingo@kernel.org>2017-01-05 03:03:29 -0500
commit159d3726db12b3476bc59ea0ab0a702103d466b5 (patch)
tree8972e4efa01f3030f704d2361c3dea969f775dd7
parent754c73cf4d2463022b2c9ae208026bf22564ed06 (diff)
x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev'
The current implementation supports only Intel Merrifield platforms. Don't mess with the rest of the Intel MID family by not registering device with wrong properties. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20170102092450.87229-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/platform/intel-mid/device_libs/Makefile2
-rw-r--r--arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c (renamed from arch/x86/platform/intel-mid/device_libs/platform_spidev.c)4
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/platform/intel-mid/device_libs/Makefile b/arch/x86/platform/intel-mid/device_libs/Makefile
index 61b5ed2b7d40..90e4f2a6625b 100644
--- a/arch/x86/platform/intel-mid/device_libs/Makefile
+++ b/arch/x86/platform/intel-mid/device_libs/Makefile
@@ -15,7 +15,7 @@ obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER_BUTTON)) += platform_msic_power_btn.o
15obj-$(subst m,y,$(CONFIG_GPIO_INTEL_PMIC)) += platform_pmic_gpio.o 15obj-$(subst m,y,$(CONFIG_GPIO_INTEL_PMIC)) += platform_pmic_gpio.o
16obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o 16obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o
17# SPI Devices 17# SPI Devices
18obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_spidev.o 18obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_mrfld_spidev.o
19# I2C Devices 19# I2C Devices
20obj-$(subst m,y,$(CONFIG_SENSORS_EMC1403)) += platform_emc1403.o 20obj-$(subst m,y,$(CONFIG_SENSORS_EMC1403)) += platform_emc1403.o
21obj-$(subst m,y,$(CONFIG_SENSORS_LIS3LV02D)) += platform_lis331.o 21obj-$(subst m,y,$(CONFIG_SENSORS_LIS3LV02D)) += platform_lis331.o
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_spidev.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c
index 30c601b399ee..27186ad654c9 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_spidev.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c
@@ -11,6 +11,7 @@
11 * of the License. 11 * of the License.
12 */ 12 */
13 13
14#include <linux/err.h>
14#include <linux/init.h> 15#include <linux/init.h>
15#include <linux/sfi.h> 16#include <linux/sfi.h>
16#include <linux/spi/pxa2xx_spi.h> 17#include <linux/spi/pxa2xx_spi.h>
@@ -34,6 +35,9 @@ static void __init *spidev_platform_data(void *info)
34{ 35{
35 struct spi_board_info *spi_info = info; 36 struct spi_board_info *spi_info = info;
36 37
38 if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
39 return ERR_PTR(-ENODEV);
40
37 spi_info->mode = SPI_MODE_0; 41 spi_info->mode = SPI_MODE_0;
38 spi_info->controller_data = &spidev_spi_chip; 42 spi_info->controller_data = &spidev_spi_chip;
39 43