From owner-svn-src-all@freebsd.org Mon Jan 22 23:12:23 2018 Return-Path: Delivered-To: svn-src-all@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 30E12EB639B for ; Mon, 22 Jan 2018 23:12:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E74A073DB6 for ; Mon, 22 Jan 2018 23:12:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x234.google.com with SMTP id e1so11648859ita.0 for ; Mon, 22 Jan 2018 15:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=EaaZdC4eUU82PaWXcF63yzQT8wq5YWKfaxi2u6Sx+b8=; b=PQfIZ7v72g9B8eObOSbLGMqbqoM/tfSfzbVaVCet7vPicsrq16xh3U4XWbX4GoewFt f2a16+B7p4NZu7hS9TrxHrN4s2lMl6KVF32T5HPIbtiQYoXlSJM0e4awymWZX8l2BHaB eufoL4waeG06TbJbEJvClVNO5oi4j+kPo2ejMyDVH37rMp5FLeVCIRYQ5wxK+asP4t+/ YI1D5y7V+fm4REqVoeiRfVO5uM+mBFibAAJ2vY8kcy+aQkaQCX0CV9z/49kHsp0HYIvk YQkZHkDsHjaHfJCSZRhF1s8NzlmZ0Ne7nRS+6weWKaS7KQODvcUYDFgP3q4BJmHX/63x nI0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=EaaZdC4eUU82PaWXcF63yzQT8wq5YWKfaxi2u6Sx+b8=; b=V30x8JdkI8SjjtUpfE4S3AmLOfzI3GNm5FHW8y6FHzEiIJNssdvp7oejRwD8p2FfU9 BSEdhHE7O0kOi05VPOAvtuW3UmwANguPTont5Rd4UJU7KadAxhxywGKGY+sGV5iCNzlV jqEjrM0t56h8XIX1+wR3MsHVcLb637l+7Z+qj81ZUn5Rp+kL9lUtpMybc0A6mdh8oZXI azb/d3OsUvmmSrB/9VtPqThhsIkYsxvwjhdSfERRjvlSuheBfzeDgpXRzxI3mE2acv/q CY8DjhGYc9RM57+Gt5jMRBsFuZ1fRRGdRjpDslxe3O9nSrgEBAKPynvlclHM8xWM9e+o NRSg== X-Gm-Message-State: AKwxyteHwTKFy7mDuBSWEa14hEdb0ru7I9QfvdCZrmFsGiW+bAFRMB9Q Ck+QfgTJubWV8zb/pWdpZnn/X+6frNdRDT4Fwg5TGQ== X-Google-Smtp-Source: AH8x227BLenG4eqaJbj9v4YXpuoI3e1L3AGyIhMjmQHj0WDlkzA+YwOy+o9/w3OyIUU+3z6dEQPsuuAkzugotkvRTMQ= X-Received: by 10.36.238.68 with SMTP id b65mr777341iti.97.1516662742215; Mon, 22 Jan 2018 15:12:22 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Mon, 22 Jan 2018 15:12:21 -0800 (PST) X-Originating-IP: [50.253.99.174] 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> From: Warner Losh Date: Mon, 22 Jan 2018 16:12:21 -0700 X-Google-Sender-Auth: FV840TE6N0nPbQg9VFkGRa1C5Dg Message-ID: Subject: Re: svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules To: Poul-Henning Kamp Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 23:12:23 -0000 On Mon, Jan 22, 2018 at 7:07 AM, Poul-Henning Kamp 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