Skip to contentSkip to conversation

x86/platform/intel-mid: Enable GPIO expanders on Edison

PATCH Superseded Andy Shevchenko 2 participants 3 messages Jun 14, 2016 – Jun 15, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/platform/intel-mid: Enable GPIO expanders on Edison

Intel Edison board provides GPIO expanders connected to I2C bus. Add necessary file to get those enumerated.

---
 arch/x86/platform/intel-mid/device_libs/Makefile   |  6 +-
 .../intel-mid/device_libs/platform_pcal9555a.c     | 99 ++++++++++++++++++++++
 2 files changed, 103 insertions(+), 2 deletions(-)
 create mode 100644 arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
arch/x86/platform/intel-mid/device_libs/Makefile +4 -2
index ed946fd..744638f 100644
@@ -11,11 +11,13 @@ obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o
 # I2C Devices
 obj-$(subst m,y,$(CONFIG_SENSORS_EMC1403)) += platform_emc1403.o
 obj-$(subst m,y,$(CONFIG_SENSORS_LIS3LV02D)) += platform_lis331.o
-obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_max7315.o
 obj-$(subst m,y,$(CONFIG_INPUT_MPU3050)) += platform_mpu3050.o
 obj-$(subst m,y,$(CONFIG_INPUT_BMA150)) += platform_bma023.o
-obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o
 obj-$(subst m,y,$(CONFIG_DRM_MEDFIELD)) += platform_tc35876x.o
+# I2C GPIO Expanders
+obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_max7315.o
+obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_pcal9555a.o
+obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o
 # MISC Devices
 obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o
 obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_wdt.o
arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c new file +99 -0

99 lines not on this page · raw message

Signature · 1 line
2.8.1
#1 lore raw
Quoted 17 lines · Andy Shevchenko
arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c new file +17 -0
+static const struct devs_id pcal9555a_1_dev_id __initconst = {
+	.name = "pcal9555a-1",
+	.type = SFI_DEV_TYPE_I2C,
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};
+
+static const struct devs_id pcal9555a_2_dev_id __initconst = {
+	.name = "pcal9555a-2",
+	.type = SFI_DEV_TYPE_I2C,
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};
+
+static const struct devs_id pcal9555a_3_dev_id __initconst = {
+	.name = "pcal9555a-3",
+	.type = SFI_DEV_TYPE_I2C,

arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c line 94

Quoted 10 lines
arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c new file +10 -0
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};
+
+static const struct devs_id pcal9555a_4_dev_id __initconst = {
+	.name = "pcal9555a-4",
+	.type = SFI_DEV_TYPE_I2C,
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};

I have the same complaint as yesterday. Going forward could we please get nice structure initializers in all future patches? :)

Thanks,

Ingo

#2 lore raw
Quoted 25 lines · Ingo Molnar
Quoted 23 lines · Andy Shevchenko
arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c new file +23 -0
+static const struct devs_id pcal9555a_1_dev_id __initconst = {
+	.name = "pcal9555a-1",
+	.type = SFI_DEV_TYPE_I2C,
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};
+
+static const struct devs_id pcal9555a_2_dev_id __initconst = {
+	.name = "pcal9555a-2",
+	.type = SFI_DEV_TYPE_I2C,
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};
+
+static const struct devs_id pcal9555a_3_dev_id __initconst = {
+	.name = "pcal9555a-3",
+	.type = SFI_DEV_TYPE_I2C,
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};
+
+static const struct devs_id pcal9555a_4_dev_id __initconst = {
+	.name = "pcal9555a-4",
Quoted 8 lines

arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c line 73

Quoted 4 lines
arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c new file +4 -0
+	.type = SFI_DEV_TYPE_I2C,
+	.delay = 1,
+	.get_platform_data = &pcal9555a_platform_data,
+};

I have the same complaint as yesterday. Going forward could we please get nice
structure initializers in all future patches? :)

Oops, indeed. Sorry, will send new version soon.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy