From owner-p4-projects@FreeBSD.ORG Fri Oct 3 13:34:40 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 14D4A16A4C0; Fri, 3 Oct 2003 13:34:40 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB9E416A4B3 for ; Fri, 3 Oct 2003 13:34:39 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F25E43FCB for ; Fri, 3 Oct 2003 13:34:39 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h93KYdXJ009129 for ; Fri, 3 Oct 2003 13:34:39 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h93KYc9m009126 for perforce@freebsd.org; Fri, 3 Oct 2003 13:34:38 -0700 (PDT) (envelope-from jhb@freebsd.org) Message-Id: <200310032034.h93KYc9m009126@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 39109 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 03 Oct 2003 20:34:40 -0000 X-Original-Date: Fri, 3 Oct 2003 13:34:38 -0700 (PDT) X-List-Received-Date: Fri, 03 Oct 2003 20:34:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=39109 Change 39109 by jhb@jhb_laptop on 2003/10/03 13:34:00 Add some more notes about hooking up the glue to let the kernel power devices down and then let userland ask the kernel to do so. Affected files ... .. //depot/projects/power/notes#5 edit Differences ... ==== //depot/projects/power/notes#5 (text+ko) ==== @@ -20,6 +20,22 @@ - XXX: need to handle _PRx and _SxD !! - We should be able to hook the power resource stuff up once we have our power shadow tree in the acpi_SetPowerState() function. +- define a bus method for powering up/down devices + - bus_set_powerstate(parent, child, state) where state is on or off +- define either a device or syscall for asking new-bus to dispatch + commands to a given device + - The power command would be sent to the parent device using + device_get_parent() for the simple case (power off fdc0) +- define a bus method to locate a child of a specific device by name + using a 'parent:child' syntax where the format of the "child" string + is defined by the parent driver. Thus, 'pci0::' might be + for PCI, 'eisa0:' for EISA, 'pccard0:' for a PCMCIA device in + slot 0, etc. + - Convert device_power() to use this method to look up the child device + if the name contains a colon instead of treating the name as a pure + name of the child device +- Perhaps rename device_power() to device_command() to allow for other + commands like eject, etc. - convert to a model of suspending the device via device_suspend()/resume() rather than detach()/attach() - This may require fixes to drivers so that they continue to function