From owner-freebsd-ppc@FreeBSD.ORG Thu Sep 22 14:45:22 2011 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5CCF106566B for ; Thu, 22 Sep 2011 14:45:22 +0000 (UTC) (envelope-from superbisquit@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 731F78FC14 for ; Thu, 22 Sep 2011 14:45:22 +0000 (UTC) Received: by gxk26 with SMTP id 26so1514130gxk.13 for ; Thu, 22 Sep 2011 07:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2Y3EJLMmT1p9DLU86Yy/6XpvkjtWo50Pg01VF9OjG7g=; b=HV6+/0zYXzmk5ruh4PHANqsigVVZr3OuYBZJ53dyfxB2c4QJEuTLVT2m3Ci2ZL8byT lMTgkeCRDtHyv8LUJDTMmtqLuSELoCK+Qm+pLBCFRSbivi8buGiFhNCwtZI+HfOaV+6R D7uwResnvOQTWjBYkPfHaWu4ALUlzzq79ITdo= MIME-Version: 1.0 Received: by 10.68.16.38 with SMTP id c6mr4518933pbd.5.1316702721512; Thu, 22 Sep 2011 07:45:21 -0700 (PDT) Received: by 10.68.58.100 with HTTP; Thu, 22 Sep 2011 07:45:21 -0700 (PDT) In-Reply-To: References: <91CC14C1-14F2-41B3-81F1-D90B42F038CA@alumni.cwru.edu> <4E7AAA9D.9010503@freebsd.org> Date: Thu, 22 Sep 2011 10:45:21 -0400 Message-ID: From: Super Bisquit To: Justin Hibbits Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Peter Grehan , FreeBSD PowerPC ML Subject: Re: ofw syscons brightness patch X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2011 14:45:22 -0000 On Wed, Sep 21, 2011 at 11:48 PM, Justin Hibbits wrote: > On Wed, Sep 21, 2011 at 11:25 PM, Peter Grehan wrote: > > > Hi Justin, > > > > > > Attached is a patch that adds brightness control to ofw syscons > >> (dev.sc.0.brightness sysctl). Pretty simple. Comments and tests > >> requested. Hopefully the listserv doesn't eat the patch. > >> > > > > Is it possible to have the value in the sysctl be 0-100, or 0-10 ? It > > might be a bit confusing for the user to have to know that the range is > > 0x34-0xff, and have the sysctl code clamp to these. > > > > Are the MIN_BRIGHTNESS/MAX_BRIGHTNESS values the same for all models ? > > > > later, > > > > Peter. > > > > Good points. I took those values from OpenBSD's driver, which hides it in > an ioctl (not hidden very well, it still leaks out to userspace), so I'm > assuming it's the same for all models. I can apply a simple scale factor, > and clamp it at 0-100 (capped below 0xff for even intervals), or 0-17 > (perfect increments of 12, capped at 0xff). I also plan to make it check > the model for "PowerBook" and similar, so that it's not provided for > non-laptop (and iMac?) machines. > > - Justin > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" > When will the code be added to source?