2 * Copyright (c) 2015 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
5 * SPDX-License-Identifier: GPL-2.0+
12 * struct led_uc_plat - Platform data the uclass stores about each device
29 * set_state() - set the state of an LED
31 * @dev: LED device to change
32 * @state: LED state to set
33 * @return 0 if OK, -ve on error
35 int (*set_state)(struct udevice *dev, enum led_state_t state);
38 #define led_get_ops(dev) ((struct led_ops *)(dev)->driver->ops)
41 * led_get_by_label() - Find an LED device by label
43 * @label: LED label to look up
44 * @devp: Returns the associated device, if found
45 * @return 0 if found, -ENODEV if not found, other -ve on error
47 int led_get_by_label(const char *label, struct udevice **devp);
50 * led_set_state() - set the state of an LED
52 * @dev: LED device to change
53 * @state: LED state to set
54 * @return 0 if OK, -ve on error
56 int led_set_state(struct udevice *dev, enum led_state_t state);