298c9babad
Convert GPIO-connected buttons and LEDs in Geode boards to software nodes/properties, so that support for platform data can be removed from gpio-keys driver (which will rely purely on generic device properties for configuration). To avoid repeating the same data structures over and over and over factor them out into a new geode-common.c file. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/ZsV6MNS_tUPPSffJ@google.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
22 lines
482 B
C
22 lines
482 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Shared helpers to register GPIO-connected buttons and LEDs
|
|
* on AMD Geode boards.
|
|
*/
|
|
|
|
#ifndef __PLATFORM_GEODE_COMMON_H
|
|
#define __PLATFORM_GEODE_COMMON_H
|
|
|
|
#include <linux/property.h>
|
|
|
|
struct geode_led {
|
|
unsigned int pin;
|
|
bool default_on;
|
|
};
|
|
|
|
int geode_create_restart_key(unsigned int pin);
|
|
int geode_create_leds(const char *label, const struct geode_led *leds,
|
|
unsigned int n_leds);
|
|
|
|
#endif /* __PLATFORM_GEODE_COMMON_H */
|