mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	of: property: Add fw_devlink support for interrupts
This allows fw_devlink to create device links between consumers of an interrupt and the supplier of the interrupt. Cc: Marc Zyngier <maz@kernel.org> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20210121225712.1118239-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									e13f5b7a13
								
							
						
					
					
						commit
						4104ca776b
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
					@ -24,6 +24,7 @@
 | 
				
			||||||
#include <linux/of.h>
 | 
					#include <linux/of.h>
 | 
				
			||||||
#include <linux/of_device.h>
 | 
					#include <linux/of_device.h>
 | 
				
			||||||
#include <linux/of_graph.h>
 | 
					#include <linux/of_graph.h>
 | 
				
			||||||
 | 
					#include <linux/of_irq.h>
 | 
				
			||||||
#include <linux/string.h>
 | 
					#include <linux/string.h>
 | 
				
			||||||
#include <linux/moduleparam.h>
 | 
					#include <linux/moduleparam.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1293,6 +1294,15 @@ static struct device_node *parse_gpio_compat(struct device_node *np,
 | 
				
			||||||
	return sup_args.np;
 | 
						return sup_args.np;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static struct device_node *parse_interrupts(struct device_node *np,
 | 
				
			||||||
 | 
										    const char *prop_name, int index)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (strcmp(prop_name, "interrupts") || index)
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return of_irq_find_parent(np);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct supplier_bindings of_supplier_bindings[] = {
 | 
					static const struct supplier_bindings of_supplier_bindings[] = {
 | 
				
			||||||
	{ .parse_prop = parse_clocks, },
 | 
						{ .parse_prop = parse_clocks, },
 | 
				
			||||||
	{ .parse_prop = parse_interconnects, },
 | 
						{ .parse_prop = parse_interconnects, },
 | 
				
			||||||
| 
						 | 
					@ -1319,6 +1329,7 @@ static const struct supplier_bindings of_supplier_bindings[] = {
 | 
				
			||||||
	{ .parse_prop = parse_pinctrl7, },
 | 
						{ .parse_prop = parse_pinctrl7, },
 | 
				
			||||||
	{ .parse_prop = parse_pinctrl8, },
 | 
						{ .parse_prop = parse_pinctrl8, },
 | 
				
			||||||
	{ .parse_prop = parse_gpio_compat, },
 | 
						{ .parse_prop = parse_gpio_compat, },
 | 
				
			||||||
 | 
						{ .parse_prop = parse_interrupts, },
 | 
				
			||||||
	{ .parse_prop = parse_regulators, },
 | 
						{ .parse_prop = parse_regulators, },
 | 
				
			||||||
	{ .parse_prop = parse_gpio, },
 | 
						{ .parse_prop = parse_gpio, },
 | 
				
			||||||
	{ .parse_prop = parse_gpios, },
 | 
						{ .parse_prop = parse_gpios, },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue