svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules
Emmanuel Vadot
manu at bidouilliste.com
Mon Jan 22 13:51:21 UTC 2018
On Mon, 22 Jan 2018 13:38:47 +0000
"Poul-Henning Kamp" <phk at phk.freebsd.dk> wrote:
> --------
> In message <20180122135905.203e19ce94510854777dff63 at bidouilliste.com>, Emmanuel
> Vadot writes:
>
> >> +#if 0
> >> + // XXX: default state is disabled in RPI3 DTB, assume for now
> >> + // XXX: that people want the PWM to work if the KLD this module.
> >> if (!ofw_bus_status_okay(dev))
> >> return (ENXIO);
> >> +#endif
> >
> > This is really bad, one need to use overlay to enable the node.
> > Leaving this I will predict that in the near futur you will have
> >someone complaining that he set to load the module at boot, unplug is
> >pwm testing gear and plug another type of HAT and that it makes funny
> >thing.
>
> As long as you don't set any of dev.pwm.0.* sysctls, the bcm283x_pwm
> driver doesn't do anything, so that situation is harmless.
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.
> > 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).
> My preference would be that DT-overlays could be compiled into
> kmods, but I'm fine with any reasonable commahd that can load
> an overlay without a reboot.
If we have a way to modify in-kernel DT I don't now if kmods is the
way to go.
> Or alternatively, a command which will change the "status=disable"
> to "status=okay" in the already loaded DT ?
Every modification of the DT should go thought overlays.
> --
> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG | TCP/IP since RFC 956
> FreeBSD committer | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
--
Emmanuel Vadot <manu at bidouilliste.com> <manu at freebsd.org>
More information about the svn-src-head
mailing list