From nobody Mon Nov 07 12:55:27 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N5WRg2tPJz4gwCF; Mon, 7 Nov 2022 12:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N5WRg2NvJz4BFl; Mon, 7 Nov 2022 12:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667825727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6wa3n5HoltYzeGKz1qSl7JuT/WAqxMk0yisNXUFpsKk=; b=iE3GtB1zI6X2W4yjN8wSK5c5qE42u6+F5V4nBmstRQOjK3dMT43MxbpKPgAL71RmWOnOgW BKullyLhtQeh2IaaBSmBVw+G3LMD9GxCqxlUK1jrLoO7KfYzFAo8JSow6cKR97ew/rb3Jk MMyXNvADYIe1SiLsolWwrmUvZoS03Zau/0CPl2k+528uBKaNYC3Vp+HWNpSQyDTiwXGwRT x1S0hr2xXdmmibTZxcsdUenu+JKs5sVXboHi6soz9Po/c0ITpz3pBABCBwrnLqwuqpLaL2 CAjOh4Rq8luPHmDngYkIe9UVYQBlipvf4adHjPmmiPvGI6ScfUjM3vIsUm/9mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N5WRg1Q55z12Rf; Mon, 7 Nov 2022 12:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2A7CtR3g024204; Mon, 7 Nov 2022 12:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A7CtRhl024203; Mon, 7 Nov 2022 12:55:27 GMT (envelope-from git) Date: Mon, 7 Nov 2022 12:55:27 GMT Message-Id: <202211071255.2A7CtRhl024203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a62d5ff5b04c - main - LinuxKPI: add linux/leds.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a62d5ff5b04cb8657028c090764c3044178c4ccd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667825727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6wa3n5HoltYzeGKz1qSl7JuT/WAqxMk0yisNXUFpsKk=; b=WFeBkWwkwfzFt6ZDR0PUqioprhQVNY24iSynFLa2tRbC1YyrwJAQnw8I9UWkvfZkpY63Eu sPpi/S9aerNyfk5BWv5xB9ImXYlr5GAMXdZZFYvutxxRbU7SXQnqX/Q4Lx+Nc9AYrbSbl+ nR8jlyEPlaCTbC+g0f0xaA6iFX2dUjfAKsC773qW/ROHB+lMa/IMK/TbGvkEamNFpzTqrV pHjVeJ4VhE564yY3cSZU3hWlJDTVe6JfGqXuDELHzkDNqqlzc/gec3nESXEwOhACCJQ9Oe 1Lay8CUZ23e2X4kXE6bAU4QQmOCCzEmVp23Dq++TWZuckGFvBjirvvEKuup0vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667825727; a=rsa-sha256; cv=none; b=EwAAo6zON3VwyQAF0ats+dupz0V95pJ8tcNBtfKNwEEGh8cuOwUzhtHOToTaWzv9mCR5NX ariucpG1h569OpawUzLu1Gd7uz4NxetVufykI63ewjALVvEABHZbWLVfbroRQrFq+/DryE 16euE2xE4zfXuOdL4LjexZa+ebRY5IGVvkWP+EaUDK8+dINt+Rwq+n0fYA4R6i/clHutps VX6x7z/nnMaMkqto5iDmiTsR2eZAhfKnMDjFvdQjjBph20YLu+SP0fIAQD1aS89hgWOjLE u6AeYDpNLz/aNLyPG3VSfadqGCtIJLyuCCVM3B7vSIUYqW3LmqbvnJWe+9SyWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a62d5ff5b04cb8657028c090764c3044178c4ccd commit a62d5ff5b04cb8657028c090764c3044178c4ccd Author: Bjoern A. Zeeb AuthorDate: 2022-10-30 17:05:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-11-07 12:52:41 +0000 LinuxKPI: add linux/leds.h This is just a dummy enum and struct in order to make drivers compile more happily as some parts are simply not hidden behind #ifdefs and this avoids a longer-term maintenance problem. MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37215 --- sys/compat/linuxkpi/common/include/linux/leds.h | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/leds.h b/sys/compat/linuxkpi/common/include/linux/leds.h new file mode 100644 index 000000000000..f7ee7a68dcf5 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/leds.h @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2022 Bjoern A. Zeeb + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_LEDS_H +#define _LINUXKPI_LINUX_LEDS_H + +enum led_brightness { + __DUMMY, +}; + +struct led_classdev { + const char *name; + const char *default_trigger; + int (*blink_set)(struct led_classdev *, unsigned long *, unsigned long *); + void (*brightness_set)(struct led_classdev *, enum led_brightness); +}; + +#endif /* _LINUXKPI_LINUX_LEDS_H */