From: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: Shaohua Li <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Len <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Dominik Brodowski <linux-JhLEnvuH02M@public.gmane.org>,
Adam Belay <ambx1-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org>
Subject: Re: [RFC]convert ACPI driver model to Linux driver model - takes 2
Date: Thu, 20 Oct 2005 11:04:44 -0600 [thread overview]
Message-ID: <200510201104.44164.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <1129185454.9074.15.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
On Thursday 13 October 2005 12:37 am, Shaohua Li wrote:
> This is the updated patch for the topic. In this version, I completely
> convert devices in ACPI bus into Linux driver model. Now the device
> driver for ACPI bus device should be a 'struct acpi_phys_driver'. Old
> style driver (struct acpi_driver) now can't work for ACPI bus devices.
- I don't like names that include "acpi_bus" because there
really is no "bus". If PCI, which really DOES have a bus,
doesn't need it, ACPI surely doesn't.
- Suspend/resume/probe/remove/shutdown are device-oriented
interfaces and should be named with "device", not "bus".
- We should not end up with two interfaces to register ACPI
drivers. ACPI is confusing enough as it is. Having both
acpi_phys_driver_register() and acpi_bus_register_driver()
will be a disaster. (Keeping both temporarily for during
a transition is OK, but one should be explicitly deprecated.)
> + length += scnprintf(scratch, buffer_size - length,
> + "COMPTID=%s", cid_list->id[j].value);
This requires a sequence number (COMPTID%d) to support multiple
_CIDs, doesn't it?
> +static struct bus_type acpi_phys_bus_type = {
> + .name = "acpi",
> + .match = acpi_phys_bus_match,
> + .hotplug = acpi_phys_bus_hotplug,
I think this should be just "acpi_hotplug".
> + .suspend = acpi_phys_bus_suspend,
> + .resume = acpi_phys_bus_resume,
And these should be "acpi_device_suspend" and "acpi_device_resume".
> +int acpi_phys_driver_register(struct acpi_phys_driver *drv)
The majority of driver registration interfaces use
"register_driver", not "driver_register". So I think
this should be "acpi_register_driver", and you should
deprecate "acpi_bus_register_driver". I still don't
see any fundamental reason for having two ways to
register ACPI drivers.
> +{
> + int error;
> + /*FIXME: add to a list */
> + drv->phys_drv.name = drv->name;
> + drv->phys_drv.bus = &acpi_phys_bus_type;
> + drv->phys_drv.probe = acpi_phys_device_probe;
> + drv->phys_drv.remove = acpi_phys_device_remove;
> + drv->phys_drv.shutdown = acpi_phys_device_shutdown;
I think these should be "acpi_bus_type", "acpi_device_probe",
"acpi_device_remove", and "acpi_device_shutdown".
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
next prev parent reply other threads:[~2005-10-20 17:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-13 6:37 [RFC]convert ACPI driver model to Linux driver model - takes 2 Shaohua Li
[not found] ` <1129185454.9074.15.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-10-13 20:43 ` Bjorn Helgaas
[not found] ` <200510131443.47844.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-10-14 1:13 ` Shaohua Li
[not found] ` <1129252436.3948.12.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-10-14 3:21 ` Bjorn Helgaas
2005-10-20 17:04 ` Bjorn Helgaas [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-13 7:45 Yu, Luming
2005-10-13 8:20 ` Shaohua Li
2005-10-13 8:18 mika.penttila-9Aww8k/80nUxHbG02/KK1g
[not found] ` <20051013081837.PTGN24578.fep01-app.kolumbus.fi-7B1qVitd7rZYRdgNIgFt/t8DI8KqlI9s@public.gmane.org>
2005-10-13 8:32 ` Shaohua Li
2005-10-14 9:35 Li, Shaohua
2005-10-14 12:47 ` Matthew Wilcox
[not found] ` <20051014124749.GD16113-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2005-10-18 1:30 ` Shaohua Li
[not found] ` <1129599034.3965.6.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-10-18 17:32 ` Rajesh Shah
2005-10-14 15:54 ` Bjorn Helgaas
[not found] ` <200510140954.52206.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-10-18 3:06 ` Shaohua Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200510201104.44164.bjorn.helgaas@hp.com \
--to=bjorn.helgaas-vxdhtt5mjny@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=ambx1-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-JhLEnvuH02M@public.gmane.org \
--cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox