Re: [PATCH v2 2/2] mfd: Add initial synology microp driver
From: Markus Probst
Date: Sun Mar 08 2026 - 15:15:27 EST
On Sun, 2026-03-08 at 19:55 +0100, Greg Kroah-Hartman wrote:
> On Sun, Mar 08, 2026 at 06:41:20PM +0000, Markus Probst wrote:
> > Add a initial synology microp driver, written in Rust.
> > The driver targets a microcontroller found in Synology NAS devices. It
> > currently only supports controlling of the power led, status led, alert
> > led and usb led. Other components such as fan control or handling
> > on-device buttons will be added once the required rust abstractions are
> > there.
>
> Why is this a mfd device? Shouldn't it be an aux device?
>
> But this is just a serial port connection, so why is a kernel driver
> needed at all?
I am not sure what you mean.
It has multiple functions (leds, hwmon, power/reset, input etc.) and
does is a multifunction device (mfd).
It does not however use mfd-core or anything from the auxiliary device
and instead implements its functionality directly in this driver.
>
> > Signed-off-by: Markus Probst <markus.probst@xxxxxxxxx>
> > ---
> > MAINTAINERS | 6 +
> > drivers/mfd/Kconfig | 2 +
> > drivers/mfd/Makefile | 2 +
> > drivers/mfd/synology_microp/Kconfig | 14 ++
> > drivers/mfd/synology_microp/Makefile | 2 +
> > drivers/mfd/synology_microp/TODO | 7 +
> > drivers/mfd/synology_microp/command.rs | 50 +++++
> > drivers/mfd/synology_microp/led.rs | 275 +++++++++++++++++++++++++
> > drivers/mfd/synology_microp/synology_microp.rs | 82 ++++++++
> > rust/uapi/uapi_helper.h | 2 +
> > 10 files changed, 442 insertions(+)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index e9e83ab552c7..092cd9e8a730 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -25550,6 +25550,12 @@ F: drivers/dma-buf/sync_*
> > F: include/linux/sync_file.h
> > F: include/uapi/linux/sync_file.h
> >
> > +SYNOLOGY MICROP DRIVER
> > +M: Markus Probst <markus.probst@xxxxxxxxx>
> > +S: Maintained
> > +F: Documentation/devicetree/bindings/mfd/synology,microp.yaml
> > +F: drivers/mfd/synology_microp/
> > +
> > SYNOPSYS ARC ARCHITECTURE
> > M: Vineet Gupta <vgupta@xxxxxxxxxx>
> > L: linux-snps-arc@xxxxxxxxxxxxxxxxxxx
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index 7192c9d1d268..bc269719749f 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -2580,5 +2580,7 @@ config MFD_MAX7360
> > additional drivers must be enabled in order to use the functionality
> > of the device.
> >
> > +source "drivers/mfd/synology_microp/Kconfig"
> > +
> > endmenu
> > endif
> > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> > index e75e8045c28a..0a6fa33d5c35 100644
> > --- a/drivers/mfd/Makefile
> > +++ b/drivers/mfd/Makefile
> > @@ -304,3 +304,5 @@ obj-$(CONFIG_MFD_RSMU_SPI) += rsmu_spi.o rsmu_core.o
> > obj-$(CONFIG_MFD_UPBOARD_FPGA) += upboard-fpga.o
> >
> > obj-$(CONFIG_MFD_LOONGSON_SE) += loongson-se.o
> > +
> > +obj-$(CONFIG_MFD_SYNOLOGY_MICROP) += synology_microp/
> > diff --git a/drivers/mfd/synology_microp/Kconfig b/drivers/mfd/synology_microp/Kconfig
> > new file mode 100644
> > index 000000000000..4bbbcf0b6e94
> > --- /dev/null
> > +++ b/drivers/mfd/synology_microp/Kconfig
> > @@ -0,0 +1,14 @@
> > +
> > +config MFD_SYNOLOGY_MICROP
> > + tristate "Synology Microp driver"
> > + depends on RUST
> > + depends on SERIAL_DEV_BUS
>
> We don't have rust serdev bindings yet, but if we do, shouldn't you just
> depend on them instead of two different things here?
I will add a `RUST_SERDEV_ABSTRACTIONS` Kconfig entry in the next
serdev rust abstraction patch revision then.
>
>
> > + depends on LEDS_CLASS && LEDS_CLASS_MULTICOLOR
> > + default n
>
> n is always the default, no need to say it again :)
I took some inspiration from the NOVA_CORE Kconfig entry, since that
driver is work in progress too.
>
> thanks,
>
> greg k-h
Thanks
- Markus Probst
Attachment:
signature.asc
Description: This is a digitally signed message part