#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
struct led_classdev cdev;
gpio_blink_set_t platform_gpio_blink_set;
static inline struct gpio_led_data *
cdev_to_gpio_led_data(struct led_classdev *led_cdev)
return container_of(led_cdev, struct gpio_led_data, cdev);
static void gpio_led_set(struct led_classdev *led_cdev,
enum led_brightness value)
struct gpio_led_data *led_dat = cdev_to_gpio_led_data(led_cdev);
led_dat->platform_gpio_blink_set(led_dat->gpiod, level,
gpiod_set_value_cansleep(led_dat->gpiod, level);
gpiod_set_value(led_dat->gpiod, level);
static int gpio_led_set_blocking(struct led_classdev *led_cdev,
enum led_brightness value)