From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 135B939A070 for ; Mon, 16 Mar 2026 13:43:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.67.36.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773668634; cv=none; b=ezilrjBQUJeco3Y/pQo7H2L8eG5OdHVsoaslvyjTByUQR5MM5qUVVmCT0U8CV5WhyWm5zQkyFgx5Rps5ThWSIpEXtunHOwAv8hAGu6jtS2sxdPwVGYpbY5O6KYvO5ZV0WLMo2BQt5MBerLSv0meqz/nI/fp0jUJo4iAInBT9O7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773668634; c=relaxed/simple; bh=33EWCAnwOB6xKo+pw6RKCbvpx6CoHDnFTrTzayEwYk8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=VqooJ+gkR9u0Rl8ZeqaIh3GoXgsJaqfTgrXEU+UIQ4ndVJZ5hWI8hYZpZT6Lqs4137+/48tPKPFMBYArkXb7xiK+uV9D3Kvr6Z7stKrXR6Im3PKRdJEypPh2wXg1Bq3W+ZAfPEkWX/BGBvp0TQG6xGau+fwma7tTM/mwodjyDb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.de; spf=pass smtp.mailfrom=posteo.de; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b=jb8ZJO47; arc=none smtp.client-ip=185.67.36.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=posteo.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="jb8ZJO47" Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BD534240027 for ; Mon, 16 Mar 2026 14:43:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1773668625; bh=33EWCAnwOB6xKo+pw6RKCbvpx6CoHDnFTrTzayEwYk8=; h=Message-ID:Subject:From:To:Cc:Date:Autocrypt:Content-Type: MIME-Version:OpenPGP:From; b=jb8ZJO47ps0mLZ7GSqxJ47Cq7KK4s306/jVdGpM/yeyu5sjcp4U/HLYoBz1VA/XjC nY5t2uP2KtrdPopJ3LRQSguhTgBLqNRm1XfMmMzr5gjy4yJyJumMsnN/z8GhkQ3qSy PJ6I6OLkCQE25OPq25tFXRU/o6gv8GwWXUvt4gW3kLd5mALOURQOdr9nv87pqCzNhH e+8PjnHfWEMbACtWyGOrDdGTukPzDnhrRs0b1bzzF2vs8fX31bgfyj0EzklIZlMhh0 zpkaIMpBF+aj0cszEsM6ILKQ2WW5vLr01vKAP04x8sq8AfbNbBmD7iHCCQHDpnz3DF QN2JatI0kSolA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4fZGWw0cHkz6tvk; Mon, 16 Mar 2026 14:43:40 +0100 (CET) Message-ID: Subject: Re: [PATCH v3 7/7] leds: add synology microp led driver From: Markus Probst To: Greg Kroah-Hartman , Danilo Krummrich Cc: Markus Probst via B4 Relay , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Miguel Ojeda , Boqun Feng , Gary Guo , =?ISO-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , "Rafael J. Wysocki" , Igor Korotin , Daniel Almeida , Bjorn Helgaas , Krzysztof =?UTF-8?Q?Wilczy=C5=84ski?= , Pavel Machek , Len Brown , Robert Moore , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, driver-core@lists.linux.dev, linux-pci@vger.kernel.org, linux-leds@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev Date: Mon, 16 Mar 2026 13:43:44 +0000 In-Reply-To: <2026031645-unplowed-purist-9c4b@gregkh> References: <20260313-synology_microp_initial-v3-0-ad6ac463a201@posteo.de> <20260313-synology_microp_initial-v3-7-ad6ac463a201@posteo.de> <39f1c9bb0dbde9f1b60785f8e838289c888ffdb0.camel@posteo.de> <2026031645-unplowed-purist-9c4b@gregkh> Autocrypt: addr=markus.probst@posteo.de; prefer-encrypt=mutual; keydata=mQINBGiDvXgBEADAXUceKafpl46S35UmDh2wRvvx+UfZbcTjeQOlSwKP7YVJ4JOZrVs93 qReNLkOWguIqPBxR9blQ4nyYrqSCV+MMw/3ifyXIm6Pw2YRUDg+WTEOjTixRCoWDgUj1nOsvJ9tVA m76Ww+/pAnepVRafMID0rqEfD9oGv1YrfpeFJhyE2zUw3SyyNLIKWD6QeLRhKQRbSnsXhGLFBXCqt 9k5JARhgQof9zvztcCVlT5KVvuyfC4H+HzeGmu9201BVyihJwKdcKPq+n/aY5FUVxNTgtI9f8wIbm fAjaoT1pjXSp+dszakA98fhONM98pOq723o/1ZGMZukyXFfsDGtA3BB79HoopHKujLGWAGskzClwT jRQxBqxh/U/lL1pc+0xPWikTNCmtziCOvv0KA0arDOMQlyFvImzX6oGVgE4ksKQYbMZ3Ikw6L1Rv1 J+FvN0aNwOKgL2ztBRYscUGcQvA0Zo1fGCAn/BLEJvQYShWKeKqjyncVGoXFsz2AcuFKe1pwETSsN 6OZncjy32e4ktgs07cWBfx0v62b8md36jau+B6RVnnodaA8++oXl3FRwiEW8XfXWIjy4umIv93tb8 8ekYsfOfWkTSewZYXGoqe4RtK80ulMHb/dh2FZQIFyRdN4HOmB4FYO5sEYFr9YjHLmDkrUgNodJCX CeMe4BO4iaxUQARAQABtCdNYXJrdXMgUHJvYnN0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mMtpWpL195XRtS0Nrxdg3PaYBxN5gtTG0RyZfpYRlkdEhm+jj/8RxuSG i/qdhRdbiI7K2IELWeQVHSNDi9JabR/UzlR4NSnhfAjRIVlRM+eFbUl8XwxwVrAkojF5IraH2qRvg VCmuFsHUW07FUlrDrzpjXsD73cKppoFGDCdDR0BHJepXbFLS9+AqkT+guRJlnCTg2p+TQtnbwPgKp Vj98JixovCl99zRYTsL2bRNU5+q8iET65VMJ1ydyNanvLd5vI/NqDkXhlXLsGmdaDTtu4R21PkToX dQNGrZ91M9nlIBKw8Y7c7xZ4098qX2b8JX/CxD+gC1r4C8vuA3GkhFLx+KlkON7LyiJPkrePp6Qky jfGillcaQOqFZ3WwVqyzG1BUfTow== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-+sZKitfK3M04UKxrVQbo" Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 OpenPGP: url=https://posteo.de/keys/markus.probst@posteo.de.asc; preference=encrypt --=-+sZKitfK3M04UKxrVQbo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2026-03-16 at 07:33 +0100, Greg Kroah-Hartman wrote: > On Sun, Mar 15, 2026 at 08:41:06PM +0100, Danilo Krummrich wrote: > > I.e. if we can't (easily) use mfd cells and would need a custom API, th= en why > > even split it up at all, given that splitting it up would probably the = most > > complicated part of the whole driver. > >=20 > > Greg, what do you think? >=20 > I think this has yet to be proven to be a kernel driver at all at this > point, and not just a userspace daemon that listens to the serial port > and then does what is needed from there :) >=20 > Or, if someone can prove that the operations on this serial data stream > actually do require it to be in the kernel (which I have yet to see a > list of what this connection does, did I miss it?) then a single driver, > under the drivers/platform section of the kernel tree makes sense. The sysoff component is strictly necessary for poweroff and reboot. On ARM64 Synology NAS devices it is needed so the device actually powers off after calling `syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF, NULL);` . Otherwise it would stay on. Same applies to reboot. On x86 it isn't clearly documented what sending the poweroff and reboot command to the microp device exactly does, so this is based on observations. It should be sent before issuing a poweroff or reboot via ACPI Sleep. On reboot it resets various device states, so fan speeds go to default, leds turn off etc., so it behaves like a coldboot. On poweroff it will mark it as graceful shutdown (i. e. the device won't turn automatically on, because it thinks a power-loss happend). For the other components: - leds - hwmon - input It could theoratically be implemented in userspace. A userspace daemon could theoratically control the fan speeds directly, issue a systemd shutdown on power button press, control the leds directly etc. But honestly, I don't understand why this is an argument. With that argument drivers/leds, drivers/hwmon and drivers/input would not even exist, because everything could be implemented in userspace via - I2C: /dev/i2c-* (drivers/i2c/i2c-dev.c) - MMIO: /dev/ioport and /dev/mem (drivers/char/mem.c) - GPIO: /sys/class/gpio (drivers/gpio/gpiolib-sysfs.c) - SPI: /dev/spidev* (drivers/spi/spidev.c) - PCI: /sys/class/pci_bus/ (drivers/pci/pci-sysfs.c) - Serial: /dev/ttyS* and likely almost any other bus device too. Generally speaking, the kernel and its drivers is the layer between hardware and software. It provides the hardware abstractions as userspace interfaces. So any software on the same cpu architecture can work with any hardware, as long as there is a kernel driver. In the case of this driver, it means - *any* led daemon can control the leds - *any* fan control daemon can control the fan speed and frequency - *any* monitoring software can view the provided sensors - *any* init system can react to the power button - *any* process can request a reboot or shutdown . I think this is the expected behaviour. Thanks - Markus Probst >=20 > thanks, >=20 > greg k-h --=-+sZKitfK3M04UKxrVQbo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEgnQYxPSsWOdyMMRzNHYf+OetQ9IFAmm4CPobFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyAAoJEDR2H/jnrUPS2FYQAJbEWn2H8OkHzf+2BJpI pQZhD0WOg3sDWU3oXYUoPQF+HXYeiTf7FMo6MJZpOaH2m+CPlToM3k9isyqsUdb0 gK6fpgcTZFJNG7jtbw88I/kGDx9Av5ulGhQqCvqHCnqjX38jE7LmHT7O2QC6GFwf p4x0ZjEBFmDLLxilBbKvyq3UMX4qCWPXOf4mLPsPRECG3a4c0v7If1zI/7VXaOZL npwZNm5KhWVHxBURJlmsYwLSEiJeOSqc4DYMRJiccpzFMAxCFIWHZ8htO99BtUOo pL8NLR9sKs1pBYGZ8B5kZ3sZWlGp7vNMLU3hD3q/LLVHi2SUN1en2ksRnN083nYy AO43hL9hb0jBEW2D5wXWahy/GSPZu3fQcRda5ztdCn8ZQg4tRwPczB3td+RitdAW h4zqc0gk9+O0RxtCSssTs9ekByTGFEJgeCKGiOBZ+gSp9B9zeTWqEkt78L/JM38Q KmiKZ57jUdRqnF0eQewj3/2TQ3M9P+PNay3uJ4eG3U+Hl/ULHD/40F24Abgo6cdq 0PVAUInTgXsVjYFyeE5E5JFw6Ehn6pJPSHVRimZRSR88/AKLqTOgdRleGm/aU7D4 9rNuaWQAUmH80clONCey6pJm3hwi93Wj7ybd2y5E3Hs6LkGu7p79hcqQ7l0kL3HA CT9lZKm9jbdEWf7vvaW3UYm8 =rU/e -----END PGP SIGNATURE----- --=-+sZKitfK3M04UKxrVQbo--