From owner-svn-src-user@FreeBSD.ORG Tue Oct 14 21:00:17 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0C6210656A8 for ; Tue, 14 Oct 2008 21:00:17 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 5E3178FC28 for ; Tue, 14 Oct 2008 21:00:17 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so810388eyi.7 for ; Tue, 14 Oct 2008 14:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer:sender; bh=1XshWtiFqXjlWJ9Xy6EBvfkBI/rv4eMAwFNqy9kvBqc=; b=GQ5n2M55BDW3JVK0mRFHIXuFsLBeMw8ZBj8nAizXhtIvjaGDxBsoDTRhlIYLCaZpdc 7zuxeVIqp1f0seRTRM8J6uw/CVYg2FYXuYsKa+/3qHd3T0p4NAsDNdeMl1TGyaEKmbB2 ohsFAQOsuwDHtuALejHP7wbQlzh7Auc2fXfSM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer:sender; b=Tt9QSTvo75+3YkDbiqidE8jd58HA0Tg/6Am8mM0uH8OOFgtSJCYOT75pmjEMiHdspT VpIhRT3iidjihVBGQwOYDdM+ClqqVPMvBrRmywG/vfYuS8pn9t9zrwIzqmQEPSGYfM7g ek642ew3mU94XlzbCkN3NK9gx16W7j/hUwNR8= Received: by 10.210.16.10 with SMTP id 10mr19546ebp.17.1224016070437; Tue, 14 Oct 2008 13:27:50 -0700 (PDT) Received: from ?10.0.1.30? ([92.250.50.164]) by mx.google.com with ESMTPS id c24sm7073160ika.4.2008.10.14.13.27.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Oct 2008 13:27:49 -0700 (PDT) Message-Id: <0D0B75E9-4C48-4A50-B34F-2CF1886A1839@FreeBSD.org> From: Rui Paulo To: Stanislav Sedov In-Reply-To: <20081014032137.13da1212.stas@FreeBSD.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Tue, 14 Oct 2008 21:27:44 +0100 References: <200810101753.m9AHrQJU097333@svn.freebsd.org> <20081014032137.13da1212.stas@FreeBSD.org> X-Mailer: Apple Mail (2.929.2) Sender: Rui Paulo Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r183751 - user/rpaulo/eeemon X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2008 21:00:18 -0000 On 14 Oct 2008, at 00:21, Stanislav Sedov wrote: > On Fri, 10 Oct 2008 17:53:26 +0000 (UTC) > Rui Paulo mentioned: > >> Author: rpaulo >> Date: Fri Oct 10 17:53:26 2008 >> New Revision: 183751 >> URL: http://svn.freebsd.org/changeset/base/183751 >> >> Log: >> eeemon is a kernel module for Asus Eee notebooks that allows you to >> control the fan speed, high/low voltage and it shows the cpu >> temperature. >> >> Includes fan control code by "harrow@yandex.ru". >> Imported from my peronal repo. >> > >> + >> +static void >> +eeemon_identify(driver_t *driver, device_t parent) >> +{ >> + device_t child; >> + >> + if (device_find_child(parent, "eeemon", -1) != NULL) >> + return; >> + >> + if (eeemon_match() == 0) >> + return; >> + >> + child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "eeemon", -1); >> + if (child == NULL) >> + device_printf(parent, "add eeemon child failed\n"); >> + > > Do we need to attach to a 'real' bus here? Technically, no. But as Warner said, the isa bus is good as any. > Btw, should it really belong to the kernel code? As all operations are > performed via inb/out it's a clear fit for a userland program. Not necessarily, but this is what I've done, so I thought I would commit it. Regards, -- Rui Paulo