From 9e0bd0e42e5c23aca23d0e85b5572d3bc314029e Mon Sep 17 00:00:00 2001 From: sys64738 Date: Sat, 17 Jul 2021 02:01:57 +0200 Subject: [PATCH] oops, forgot this --- host/modules/dmj.c | 9 ++++++++- src/vnd_cfg.c | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/host/modules/dmj.c b/host/modules/dmj.c index 15d39bd..ca1f68d 100644 --- a/host/modules/dmj.c +++ b/host/modules/dmj.c @@ -430,6 +430,9 @@ static int dmj_hw_init(struct dmj_dev *dmj) static const struct mfd_cell dmj_mfd_char[] = { { .name = "dmj-char" }, }; +static const struct mfd_cell dmj_mfd_spi[] = { + { .name = "dmj-spi" }, +}; static const struct mfd_cell dmj_mfd_i2c[] = { { .name = "dmj-i2c" }, }; @@ -490,7 +493,11 @@ static int dmj_probe(struct usb_interface *itf, const struct usb_device_id *usb_ } if (dmj->dmj_m1feature & DMJ_FEATURE_MODE1_SPI) { - // TODO: add SPI MFD + ret = mfd_add_hotplug_devices(dev, dmj_mfd_spi, ARRAY_SIZE(dmj_mfd_spi)); + if (ret) { + dev_err(dev, "failed to add MFD SPI devices\n"); + goto out_free; + } } if (dmj->dmj_m1feature & DMJ_FEATURE_MODE1_I2C) { ret = mfd_add_hotplug_devices(dev, dmj_mfd_i2c, ARRAY_SIZE(dmj_mfd_i2c)); diff --git a/src/vnd_cfg.c b/src/vnd_cfg.c index c29c266..15e8295 100644 --- a/src/vnd_cfg.c +++ b/src/vnd_cfg.c @@ -5,6 +5,7 @@ #include #include +#include "info.h" #include "mode.h" #include "vnd_cfg.h"