From owner-svn-src-head@freebsd.org Mon Jan 22 13:51:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1015EC214A; Mon, 22 Jan 2018 13:51:21 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D8AB17CC32; Mon, 22 Jan 2018 13:51:20 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 15bd167e; Mon, 22 Jan 2018 14:51:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=A7iRD423PMUZBTMQP8uZQI0vg4U=; b=W1iiauWfkhOJLLgcY30/TI1l4yZR gFvrZ90CzOqcq40snq9IdhPph+9xCCLuhoXIqqJ60Fdcf0tp3aGQpV/sYgXUNcxw K5037pbiWCipCRC4V1Qv2KAasQ0dKAOuvtylGtpDXRU/2sqk3qITnyLHgFnkk66d 9bfC/yu5bbttcWw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=HaAEx0KddM8uCMavJMmO6UoUQwwbJYqBGsV5WkQrx55sYNG/foqsHWwN YH3LBFRcJdfir919wI4Nocf19L8RXrzWKRDogUFjusPzOun70wIhy0+CMryXMfn0 I6gl3c4/S6pNij6AeSlQgdStTK4w3TH759jRgrvXh4KiFK9WLIc= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 49631e87 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 22 Jan 2018 14:51:17 +0100 (CET) Date: Mon, 22 Jan 2018 14:51:17 +0100 From: Emmanuel Vadot To: "Poul-Henning Kamp" Cc: 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: <20180122145117.08173be547f5dd6fef296732@bidouilliste.com> In-Reply-To: <88070.1516628327@critter.freebsd.dk> References: <201801220710.w0M7AUm9091853@repo.freebsd.org> <20180122135905.203e19ce94510854777dff63@bidouilliste.com> <88070.1516628327@critter.freebsd.dk> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 13:51:21 -0000 On Mon, 22 Jan 2018 13:38:47 +0000 "Poul-Henning Kamp" wrote: > -------- > In message <20180122135905.203e19ce94510854777dff63@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@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