linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What kernel version does    'irq_set_irq_type'  become available?
@ 2020-03-06 17:29 Peter Willis
  2020-03-07 18:20 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Willis @ 2020-03-06 17:29 UTC (permalink / raw)
  To: linux-kernel

Hello,

Is there a history diagram somewhere that shows where specific features appear in the codebase?

Various online documentation for kernel driver development have references to functions that, in some cases, are either deprecated or do not yet exist in older versions of kernel source.

For example, I have written an interrupt service driver for an embedded application running on kernel version 2.6.21.  The original driver is level triggered and requires the driver to: 

a.) Temporarily disable the interrupt
b.) Service the interrupt
c.) Re-enable the interrupt

There was some desire for that driver to move to a more standard rising edge trigger.

In that line of thought , the documentation suggests    ' irq_set_irq_type'  with flag     'IRQF_TRIGGER_RISING'.

That function was experimental at one point, and doesn't appear to be available in the 2.6.21 source.
I did a      'find' -> 'while read' -> 'fgrep'  search to find the function declaration in headers but had no luck under 2.6.21 .

-- My specific questions --

Question 1.)   Is  'irq_set_irq_type'  still experimental ?
Question 2.)   At what version of the kernel source does the function appear?
Question 3.)  If the function exists for  2.6.21  What headers are required to allow effective compilation?


-- Notes and suggestions regarding kernel function documentation --

Note 1.) Perhaps functions should be documented with indications of what kernel versions they apply to.
Note 2.) In function documentation, an indication of what headers to include supporting each specific function would be nice.

Thank you for your time and comments,

Peter





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

* Re: What kernel version does 'irq_set_irq_type' become available?
  2020-03-06 17:29 What kernel version does 'irq_set_irq_type' become available? Peter Willis
@ 2020-03-07 18:20 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2020-03-07 18:20 UTC (permalink / raw)
  To: Peter Willis, linux-kernel

On 3/6/20 9:29 AM, Peter Willis wrote:
> Hello,
> 
> Is there a history diagram somewhere that shows where specific features appear in the codebase?

I don't know.

> Various online documentation for kernel driver development have references to functions that, in some cases, are either deprecated or do not yet exist in older versions of kernel source.
> 
> For example, I have written an interrupt service driver for an embedded application running on kernel version 2.6.21.  The original driver is level triggered and requires the driver to: 

2.6.21 was released in April of 2007.
It's a shame that someone (anyone) is still using it.


> a.) Temporarily disable the interrupt
> b.) Service the interrupt
> c.) Re-enable the interrupt
> 
> There was some desire for that driver to move to a more standard rising edge trigger.

Does the hardware work as (optionally; programmable) level triggered or edge triggered?
Usually not in my experience.
Usually one or the other.

> In that line of thought , the documentation suggests    ' irq_set_irq_type'  with flag     'IRQF_TRIGGER_RISING'.
> 
> That function was experimental at one point, and doesn't appear to be available in the 2.6.21 source.

No, in 2.6.21 it is named 'set_irq_type'.

I can't see that it was experimental.

> I did a      'find' -> 'while read' -> 'fgrep'  search to find the function declaration in headers but had no luck under 2.6.21 .
> 
> -- My specific questions --
> 
> Question 1.)   Is  'irq_set_irq_type'  still experimental ?

No.

> Question 2.)   At what version of the kernel source does the function appear?

It is named irq_set_irq_type in 2.6.39.  That's the earliest AFAICT.

> Question 3.)  If the function exists for  2.6.21  What headers are required to allow effective compilation?
> 

<linux/irq.h>

> 
> -- Notes and suggestions regarding kernel function documentation --
> 
> Note 1.) Perhaps functions should be documented with indications of what kernel versions they apply to.
> Note 2.) In function documentation, an indication of what headers to include supporting each specific function would be nice.

'grep' is really easy to use.

> Thank you for your time and comments,

Good luck.

-- 
~Randy


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

end of thread, other threads:[~2020-03-07 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 17:29 What kernel version does 'irq_set_irq_type' become available? Peter Willis
2020-03-07 18:20 ` Randy Dunlap

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).