gpio-button-hotplug: do not error on interrupt attached keys
The Linux gpio-keys driver bindings allow for GPIO attached or interrupt attached keys. Currently if an interrupt attached key is encountered gpio_keys_button_probe() will fail due to not being able to get a gpio descriptor: gpio-keys: probe of gpio-keys failed with error -2 Skip the failure in the case of interrupt attached keys to resolve this. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
This commit is contained in:
		
				
					committed by
					
						
						Christian Lamparter
					
				
			
			
				
	
			
			
			
						parent
						
							1465691319
						
					
				
				
					commit
					23845fa10b
				
			@@ -506,6 +506,13 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
 | 
			
		||||
			goto out;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (button->irq) {
 | 
			
		||||
			dev_err(dev, "skipping button %s (only gpio buttons supported)\n",
 | 
			
		||||
				button->desc);
 | 
			
		||||
			bdata->b = &pdata->buttons[i];
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (gpio_is_valid(button->gpio)) {
 | 
			
		||||
			/* legacy platform data... but is it the lookup table? */
 | 
			
		||||
			bdata->gpiod = devm_gpiod_get_index(dev, desc, i,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user