leds-spi-byte.c (61b7369483efb5e0a9f3b48e75fac00d46d661e0) | leds-spi-byte.c (3192f141240336dd6d7675ff374757006fed1916) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// Copyright (c) 2019 Christian Mauderer <oss@c-mauderer.de> 3 4/* 5 * The driver supports controllers with a very simple SPI protocol: 6 * - one LED is controlled by a single byte on MOSI 7 * - the value of the byte gives the brightness between two values (lowest to 8 * highest) --- 16 unchanged lines hidden (view full) --- 25 * slight jump in the pattern at 0x10. 26 * * Mode: 11 -> blinking (off -> 25% -> off -> 25% -> ...) with a period of 27 * (105ms * parameter) 28 * NOTE: This driver currently only supports mode 00. 29 */ 30 31#include <linux/leds.h> 32#include <linux/module.h> | 1// SPDX-License-Identifier: GPL-2.0 2// Copyright (c) 2019 Christian Mauderer <oss@c-mauderer.de> 3 4/* 5 * The driver supports controllers with a very simple SPI protocol: 6 * - one LED is controlled by a single byte on MOSI 7 * - the value of the byte gives the brightness between two values (lowest to 8 * highest) --- 16 unchanged lines hidden (view full) --- 25 * slight jump in the pattern at 0x10. 26 * * Mode: 11 -> blinking (off -> 25% -> off -> 25% -> ...) with a period of 27 * (105ms * parameter) 28 * NOTE: This driver currently only supports mode 00. 29 */ 30 31#include <linux/leds.h> 32#include <linux/module.h> |
33#include <linux/of_device.h> | 33#include <linux/of.h> |
34#include <linux/spi/spi.h> 35#include <linux/mutex.h> 36#include <uapi/linux/uleds.h> 37 38struct spi_byte_chipdef { 39 /* SPI byte that will be send to switch the LED off */ 40 u8 off_value; 41 /* SPI byte that will be send to switch the LED to maximum brightness */ --- 113 unchanged lines hidden --- | 34#include <linux/spi/spi.h> 35#include <linux/mutex.h> 36#include <uapi/linux/uleds.h> 37 38struct spi_byte_chipdef { 39 /* SPI byte that will be send to switch the LED off */ 40 u8 off_value; 41 /* SPI byte that will be send to switch the LED to maximum brightness */ --- 113 unchanged lines hidden --- |