-----Original Message-----
From: <owner-src-committ...@freebsd.org> on behalf of Andrew Turner 
<and...@freebsd.org>
Date: 2022-10-27, Thursday at 09:31
To: <src-committ...@freebsd.org>, <dev-commits-src-all@FreeBSD.org>, 
<dev-commits-src-m...@freebsd.org>
Subject: git: 64c3edc237a5 - main - Allow the extres regulator code to build 
without FDT

    The branch main has been updated by andrew:

    URL: 
https://cgit.FreeBSD.org/src/commit/?id=64c3edc237a5281e2210b3dd27868175f87b3973

    commit 64c3edc237a5281e2210b3dd27868175f87b3973
    Author:     Andrew Turner <and...@freebsd.org>
    AuthorDate: 2022-10-27 16:28:56 +0000
    Commit:     Andrew Turner <and...@freebsd.org>
    CommitDate: 2022-10-27 16:28:56 +0000

        Allow the extres regulator code to build without FDT

        This allows drivers that use this to build in an ACPI only kernel.

Might want to add a comment that these two specific files are built w/o FDT 
because they're needed by ACPI. Otherwise, the lack of "fdt" seems like a 
mistake in long list of "fdt" files, and someone might "fix" them by adding 
"fdt" back.

-Ravi (rpokala@)

        Sponsored by:   The FreeBSD Foundation
    ---
     sys/conf/files                       | 4 ++--
     sys/dev/extres/regulator/regulator.c | 2 ++
     sys/dev/extres/regulator/regulator.h | 2 +-
     3 files changed, 5 insertions(+), 3 deletions(-)

    diff --git a/sys/conf/files b/sys/conf/files
    index 5a74f1b1f1bb..b77fd3139544 100644
    --- a/sys/conf/files
    +++ b/sys/conf/files
    @@ -1741,8 +1741,8 @@ dev/extres/hwreset/hwreset_if.m       optional 
hwreset fdt
     dev/extres/nvmem/nvmem.c   optional nvmem fdt
     dev/extres/nvmem/nvmem_if.m        optional nvmem fdt
     dev/extres/regulator/regdev_if.m   optional regulator fdt
    -dev/extres/regulator/regnode_if.m  optional regulator fdt
    -dev/extres/regulator/regulator.c   optional regulator fdt
    +dev/extres/regulator/regnode_if.m  optional regulator
    +dev/extres/regulator/regulator.c   optional regulator
     dev/extres/regulator/regulator_bus.c       optional regulator fdt
     dev/extres/regulator/regulator_fixed.c     optional regulator fdt
     dev/extres/syscon/syscon.c         optional syscon
    diff --git a/sys/dev/extres/regulator/regulator.c 
b/sys/dev/extres/regulator/regulator.c
    index eab79e9dfbc3..f87dec3fafb5 100644
    --- a/sys/dev/extres/regulator/regulator.c
    +++ b/sys/dev/extres/regulator/regulator.c
    @@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$");
     #endif
     #include <dev/extres/regulator/regulator.h>

    +#ifdef FDT
     #include "regdev_if.h"
    +#endif

     SYSCTL_NODE(_hw, OID_AUTO, regulator, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
         "Regulators");
    diff --git a/sys/dev/extres/regulator/regulator.h 
b/sys/dev/extres/regulator/regulator.h
    index 03a8fbe1f534..587d788d3608 100644
    --- a/sys/dev/extres/regulator/regulator.h
    +++ b/sys/dev/extres/regulator/regulator.h
    @@ -34,8 +34,8 @@
     #include <sys/sysctl.h>
     #ifdef FDT
     #include <dev/ofw/ofw_bus.h>
    -#include "regnode_if.h"
     #endif
    +#include "regnode_if.h"

     SYSCTL_DECL(_hw_regulator);




Reply via email to