[ltp] [RFC] thinkpad-acpi: dock and bay drivers: any users left?

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Tue, 5 May 2009 00:29:40 -0300


On Mon, 04 May 2009, Peter F. Patel-Schneider wrote:
> What doesn't work is that the pre-eject switch (the thing that pops out
> the physical eject tab) doesn't seem to be hooked into ACPI.  There are
> udev events generated by the switch, but nothing in F11 appears to be
> hooked to them.

Yeah, the usual problem :(

> > I am also interested into getting ACPI dock working perfectly on thinkpads
> > so that's a secondary objective of these questions: what should be improved
> > on ACPI dock?  There is already one thing on my list: add an attribute that
> > gives the user an idea of WHAT dock/bay a dock.* device represents...
> 
> I'm willing to try out various things to get this pre-eject to work
> perfectly.  I do have a 90% solution, which involves a udev action and
> script modelled on the hotswap script in the ThinkPad Wiki, but I was
> hoping that there would be a better way.

Well, there is HAL.  I don't know whether it would do the right thing or not
if you make it understand that uevent as a eject request.

Battery works fine without scripts or HAL help (I just tested that in
2.6.28), as the kernel knows it doesn't need any extra steps and just ejects
the thing immediately.  But any block device requires userspace
authorization.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh