Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2018 16:12:21 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Emmanuel Vadot <manu@bidouilliste.com>, src-committers <src-committers@freebsd.org>,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules
Message-ID:  <CANCZdfoYf%2BkpdLN0CA_ZsS1a25ggZ8K20V6Dw8qUBPrXud_Org@mail.gmail.com>
In-Reply-To: <88258.1516630050@critter.freebsd.dk>
References:  <201801220710.w0M7AUm9091853@repo.freebsd.org> <20180122135905.203e19ce94510854777dff63@bidouilliste.com> <88070.1516628327@critter.freebsd.dk> <20180122145117.08173be547f5dd6fef296732@bidouilliste.com> <88258.1516630050@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 22, 2018 at 7:07 AM, Poul-Henning Kamp <phk@phk.freebsd.dk>
wrote:

> --------
> In message <20180122145117.08173be547f5dd6fef296732@bidouilliste.com>,
> Emmanuel
>  Vadot writes:
>
> > Using the same logic as before one could have a script starting some
> >pwm stuff (or simply using /etc/sysctl.conf)
> > Also this is not how DT is suppose to work, if the status ==
> >'disabled' no driver should attach.
>
> That doesn't make *any* UX sense.
>
> "disabled" indicates that it can be enabled, and there is absolutely
> no reason to force users to reboot, when all that stands between
> them and using their hardware is a random setting in a file.
>

It is a state of being. The state is not enabled, and maybe not possible to
enable.


> Explicitly kldload'ing a device-driver is as clear a "Enable it, please"
> instruction as you can get from the user.
>
> If you want to lock down this DT-device because some other
> device/pin-mux/whatever makes its use impossible, then
> status should not be "disabled" but "locked" or "impossible".
>

This is an external interface. What you ask is impossible.


> In particular it is *horrible* UX, that you kldload a device-driver
> for hardware you know is there, and it just silently doesn't do
> anything.  At the very least it should give a diagnostic.
>

It's the FDT standard. Words have specific meanings, but maybe not the more
normal meaning.


Maybe something like:
>
>         "For no good reason this device is disabled, google for
>         an hour, try to come up with a device tree overlay, reboot
>         to install it and see if you get lucky.


No sense being a jerk about it. It's how FDT works. It's more complex than
you might naively think. At least now documentation is published about the
standard, though it's still not as complete as we'd like.

>> > Can you please revert this part ?
> >>
> >> Once I find out how to get similar behaviour, ie: kldload without
> >> having to reboot to load a DT-overlay.
> >
> > Nobody is working on that right now (that I know of).
>
> Let me know when it works, and I'll remove my hack then.
>
> In the meantime, don't load bcm283x_pwm if you don't plan on
> using the PWM on GPIO12 on your RPI[23].


That's less than completely useful, but at least it's a start.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoYf%2BkpdLN0CA_ZsS1a25ggZ8K20V6Dw8qUBPrXud_Org>