linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* obtaining acpi details outside of drivers/acpi
@ 2007-09-06 10:16 Alan Hourihane
  2007-09-06 11:43 ` Len Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Hourihane @ 2007-09-06 10:16 UTC (permalink / raw)
  To: linux-acpi

I'm looking at the currently exported function calls to other kernel
modules to obtain ACPI data.

For example, if I want to access _DOD for graphics, the pathname would
be something like...

\\_SB_.PCI0.GFX0._DOD

And I'm currently doing this...

	status = acpi_evaluate_object(NULL, PATHNAME, NULL, &buffer);

where PATHNAME is the path above.

But there's no guarantees that it's called PCI0, or even GFX0.

What's the best way to search the namespace and get this data ??

Alan.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 10:16 obtaining acpi details outside of drivers/acpi Alan Hourihane
@ 2007-09-06 11:43 ` Len Brown
  2007-09-06 11:47   ` Alan Hourihane
  0 siblings, 1 reply; 9+ messages in thread
From: Len Brown @ 2007-09-06 11:43 UTC (permalink / raw)
  To: Alan Hourihane; +Cc: linux-acpi

Hi Alan,

Yes, pathnames are arbitrary, don't use them.

Look in drivers/acpi/video.c for acpi_video_bus_check()
As the video device has no HID, this routine is basically
used to check all the drivers in the tree if they have _DOD
and the other stuff a video device should have.

BTW. I'm curious what you are trying to do.
There is actually quite a bit of movement in this code right now.

cheers,
-Len

On Thursday 06 September 2007 06:16, Alan Hourihane wrote:
> I'm looking at the currently exported function calls to other kernel
> modules to obtain ACPI data.
> 
> For example, if I want to access _DOD for graphics, the pathname would
> be something like...
> 
> \\_SB_.PCI0.GFX0._DOD
> 
> And I'm currently doing this...
> 
> 	status = acpi_evaluate_object(NULL, PATHNAME, NULL, &buffer);
> 
> where PATHNAME is the path above.
> 
> But there's no guarantees that it's called PCI0, or even GFX0.
> 
> What's the best way to search the namespace and get this data ??
> 
> Alan.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 11:43 ` Len Brown
@ 2007-09-06 11:47   ` Alan Hourihane
  2007-09-06 13:22     ` Len Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Hourihane @ 2007-09-06 11:47 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

On Thu, 2007-09-06 at 07:43 -0400, Len Brown wrote:
> Hi Alan,
> 
> Yes, pathnames are arbitrary, don't use them.
> 
> Look in drivers/acpi/video.c for acpi_video_bus_check()
> As the video device has no HID, this routine is basically
> used to check all the drivers in the tree if they have _DOD
> and the other stuff a video device should have.

Mmm. It seems acpi_video_bus_check() is static and therefore not
available outside of video.c

> BTW. I'm curious what you are trying to do.
> There is actually quite a bit of movement in this code right now.

Think about fbdev drivers (or some video driver).... Rather than
bang on the hardware to try and do auto-detection of devices, it's much
easier (and sometimes required) to just ask the system BIOS via ACPI to
see what devices are available.

I want to parse _DOD myself to see what's available in kernel space.

What else can I use ?

Alan.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 11:47   ` Alan Hourihane
@ 2007-09-06 13:22     ` Len Brown
  2007-09-06 13:27       ` Alexey Starikovskiy
  2007-09-06 13:53       ` Alan Hourihane
  0 siblings, 2 replies; 9+ messages in thread
From: Len Brown @ 2007-09-06 13:22 UTC (permalink / raw)
  To: Alan Hourihane; +Cc: linux-acpi

On Thursday 06 September 2007 07:47, Alan Hourihane wrote:

> Mmm. It seems acpi_video_bus_check() is static and therefore not
> available outside of video.c
> 
> > BTW. I'm curious what you are trying to do.
> > There is actually quite a bit of movement in this code right now.
> 
> Think about fbdev drivers (or some video driver).... Rather than
> bang on the hardware to try and do auto-detection of devices, it's much
> easier (and sometimes required) to just ask the system BIOS via ACPI to
> see what devices are available.
> 
> I want to parse _DOD myself to see what's available in kernel space.

It would be good to have this code in only one place
and export it from there to other parts of the kernel that need it.
I'd like to be able to not have fbdev drivers depend on the acpi video driver,
so perhaps we could have some generic interface where fbdev is the consumer
and in this case acpi/video.c is the provider?

-Len

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 13:22     ` Len Brown
@ 2007-09-06 13:27       ` Alexey Starikovskiy
  2007-09-06 13:53       ` Alan Hourihane
  1 sibling, 0 replies; 9+ messages in thread
From: Alexey Starikovskiy @ 2007-09-06 13:27 UTC (permalink / raw)
  To: Len Brown; +Cc: Alan Hourihane, linux-acpi

Len Brown wrote:
> On Thursday 06 September 2007 07:47, Alan Hourihane wrote:
> 
>> Mmm. It seems acpi_video_bus_check() is static and therefore not
>> available outside of video.c
>>
>>> BTW. I'm curious what you are trying to do.
>>> There is actually quite a bit of movement in this code right now.
>> Think about fbdev drivers (or some video driver).... Rather than
>> bang on the hardware to try and do auto-detection of devices, it's much
>> easier (and sometimes required) to just ask the system BIOS via ACPI to
>> see what devices are available.
>>
>> I want to parse _DOD myself to see what's available in kernel space.
> 
> It would be good to have this code in only one place
> and export it from there to other parts of the kernel that need it.
> I'd like to be able to not have fbdev drivers depend on the acpi video driver,
> so perhaps we could have some generic interface where fbdev is the consumer
> and in this case acpi/video.c is the provider?
There is module autoloading code in acpi/scan.c which might be helpful.
Just look for acpi_video_bus_match().

Regards,
Alex.

> 
> -Len
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 13:22     ` Len Brown
  2007-09-06 13:27       ` Alexey Starikovskiy
@ 2007-09-06 13:53       ` Alan Hourihane
  2007-09-06 13:57         ` Alan Hourihane
  2007-09-06 14:17         ` Alexey Starikovskiy
  1 sibling, 2 replies; 9+ messages in thread
From: Alan Hourihane @ 2007-09-06 13:53 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

On Thu, 2007-09-06 at 09:22 -0400, Len Brown wrote:
> On Thursday 06 September 2007 07:47, Alan Hourihane wrote:
> 
> > Mmm. It seems acpi_video_bus_check() is static and therefore not
> > available outside of video.c
> > 
> > > BTW. I'm curious what you are trying to do.
> > > There is actually quite a bit of movement in this code right now.
> > 
> > Think about fbdev drivers (or some video driver).... Rather than
> > bang on the hardware to try and do auto-detection of devices, it's much
> > easier (and sometimes required) to just ask the system BIOS via ACPI to
> > see what devices are available.
> > 
> > I want to parse _DOD myself to see what's available in kernel space.
> 
> It would be good to have this code in only one place
> and export it from there to other parts of the kernel that need it.
> I'd like to be able to not have fbdev drivers depend on the acpi video driver,
> so perhaps we could have some generic interface where fbdev is the consumer
> and in this case acpi/video.c is the provider?

That sounds good. I'm open to suggestions on interface.

But is there anything better available now to scan the namespace in
current released kernels for _DOD ?

Alan.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 13:53       ` Alan Hourihane
@ 2007-09-06 13:57         ` Alan Hourihane
  2007-09-06 14:17         ` Alexey Starikovskiy
  1 sibling, 0 replies; 9+ messages in thread
From: Alan Hourihane @ 2007-09-06 13:57 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

On Thu, 2007-09-06 at 14:53 +0100, Alan Hourihane wrote:
> On Thu, 2007-09-06 at 09:22 -0400, Len Brown wrote:
> > On Thursday 06 September 2007 07:47, Alan Hourihane wrote:
> > 
> > > Mmm. It seems acpi_video_bus_check() is static and therefore not
> > > available outside of video.c
> > > 
> > > > BTW. I'm curious what you are trying to do.
> > > > There is actually quite a bit of movement in this code right now.
> > > 
> > > Think about fbdev drivers (or some video driver).... Rather than
> > > bang on the hardware to try and do auto-detection of devices, it's much
> > > easier (and sometimes required) to just ask the system BIOS via ACPI to
> > > see what devices are available.
> > > 
> > > I want to parse _DOD myself to see what's available in kernel space.
> > 
> > It would be good to have this code in only one place
> > and export it from there to other parts of the kernel that need it.
> > I'd like to be able to not have fbdev drivers depend on the acpi video driver,
> > so perhaps we could have some generic interface where fbdev is the consumer
> > and in this case acpi/video.c is the provider?
> 
> That sounds good. I'm open to suggestions on interface.

I'm willing to help define this though, so I don't expect anyone to just
throw something over the wall. 

> But is there anything better available now to scan the namespace in
> current released kernels for _DOD ?

Oh, and if not, not to worry. I'll stick with the fixed namespace check
for now, until we can define the interface above.

Thanks Len!

Alan.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 13:53       ` Alan Hourihane
  2007-09-06 13:57         ` Alan Hourihane
@ 2007-09-06 14:17         ` Alexey Starikovskiy
  2007-09-06 14:33           ` Alan Hourihane
  1 sibling, 1 reply; 9+ messages in thread
From: Alexey Starikovskiy @ 2007-09-06 14:17 UTC (permalink / raw)
  To: Alan Hourihane; +Cc: Len Brown, linux-acpi

Alan Hourihane wrote:
> On Thu, 2007-09-06 at 09:22 -0400, Len Brown wrote:
>> On Thursday 06 September 2007 07:47, Alan Hourihane wrote:
>>
>>> Mmm. It seems acpi_video_bus_check() is static and therefore not
>>> available outside of video.c
>>>
>>>> BTW. I'm curious what you are trying to do.
>>>> There is actually quite a bit of movement in this code right now.
>>> Think about fbdev drivers (or some video driver).... Rather than
>>> bang on the hardware to try and do auto-detection of devices, it's much
>>> easier (and sometimes required) to just ask the system BIOS via ACPI to
>>> see what devices are available.
>>>
>>> I want to parse _DOD myself to see what's available in kernel space.
>> It would be good to have this code in only one place
>> and export it from there to other parts of the kernel that need it.
>> I'd like to be able to not have fbdev drivers depend on the acpi video driver,
>> so perhaps we could have some generic interface where fbdev is the consumer
>> and in this case acpi/video.c is the provider?
> 
> That sounds good. I'm open to suggestions on interface.
> 
> But is there anything better available now to scan the namespace in
> current released kernels for _DOD ?
2.6.23-rc5 has it...
> 
> Alan.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: obtaining acpi details outside of drivers/acpi
  2007-09-06 14:17         ` Alexey Starikovskiy
@ 2007-09-06 14:33           ` Alan Hourihane
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Hourihane @ 2007-09-06 14:33 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: Len Brown, linux-acpi

On Thu, 2007-09-06 at 18:17 +0400, Alexey Starikovskiy wrote:
> Alan Hourihane wrote:
> > On Thu, 2007-09-06 at 09:22 -0400, Len Brown wrote:
> >> On Thursday 06 September 2007 07:47, Alan Hourihane wrote:
> >>
> >>> Mmm. It seems acpi_video_bus_check() is static and therefore not
> >>> available outside of video.c
> >>>
> >>>> BTW. I'm curious what you are trying to do.
> >>>> There is actually quite a bit of movement in this code right now.
> >>> Think about fbdev drivers (or some video driver).... Rather than
> >>> bang on the hardware to try and do auto-detection of devices, it's much
> >>> easier (and sometimes required) to just ask the system BIOS via ACPI to
> >>> see what devices are available.
> >>>
> >>> I want to parse _DOD myself to see what's available in kernel space.
> >> It would be good to have this code in only one place
> >> and export it from there to other parts of the kernel that need it.
> >> I'd like to be able to not have fbdev drivers depend on the acpi video driver,
> >> so perhaps we could have some generic interface where fbdev is the consumer
> >> and in this case acpi/video.c is the provider?
> > 
> > That sounds good. I'm open to suggestions on interface.
> > 
> > But is there anything better available now to scan the namespace in
> > current released kernels for _DOD ?
> 2.6.23-rc5 has it...

Thanks Alexey,

I'll take a look.

Alan.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-09-06 14:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06 10:16 obtaining acpi details outside of drivers/acpi Alan Hourihane
2007-09-06 11:43 ` Len Brown
2007-09-06 11:47   ` Alan Hourihane
2007-09-06 13:22     ` Len Brown
2007-09-06 13:27       ` Alexey Starikovskiy
2007-09-06 13:53       ` Alan Hourihane
2007-09-06 13:57         ` Alan Hourihane
2007-09-06 14:17         ` Alexey Starikovskiy
2007-09-06 14:33           ` Alan Hourihane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).