diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-14 20:35:46 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-14 20:35:46 +0300 |
commit | f3d8f29d1f59230b8c2a09e6dee7db7bd295e42c (patch) | |
tree | 5e29c74b69d09d92fc5365e0fc18675d0553b9aa /include/linux | |
parent | 8403ce70be339d462892a2b935ae30ee52416f92 (diff) | |
parent | b49c1caca529c28712ef62bfaabdb9441162a935 (diff) | |
download | linux-f3d8f29d1f59230b8c2a09e6dee7db7bd295e42c.tar.xz |
Merge tag 'backlight-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones:
"New Drivers:
- Add support for Kinetic KTD2801 Backlight
Fix-ups:
- Fix include lists; alphabetise, remove unused, explicitly add used
- Device Tree binding adaptions/conversions/creation
- Use dev_err_probe() to clean-up error paths
- Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations
Bug Fixes:
- Fix changes of NULL pointer dereference
- Remedy a bunch of logic errors
- Initialise (zero) Backlight properties data structures"
* tag 'backlight-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (32 commits)
backlight: pandora_bl: Drop unneeded ENOMEM error message
backlight: lm3630a_bl: Simplify probe return on gpio request error
backlight: lm3630a_bl: Handle deferred probe
backlight: as3711_bl: Handle deferred probe
backlight: bd6107: Handle deferred probe
backlight: l4f00242t03: Simplify with dev_err_probe()
backlight: gpio: Simplify with dev_err_probe()
backlight: lp8788: Fully initialize backlight_properties during probe
backlight: lm3639: Fully initialize backlight_properties during probe
backlight: da9052: Fully initialize backlight_properties during probe
backlight: lm3630a: Use backlight_get_brightness helper in update_status
backlight: lm3630a: Don't set bl->props.brightness in get_brightness
backlight: lm3630a: Initialize backlight_properties on init
backlight: mp3309c: Fully initialize backlight_properties during probe
backlight: mp3309c: Utilise temporary variable for struct device
backlight: mp3309c: Use dev_err_probe() instead of dev_err()
backlight: mp3309c: Make use of device properties
dt-bindings: backlight: qcom-wled: Fix bouncing email addresses
backlight: hx8357: Utilise temporary variable for struct device
backlight: hx8357: Make use of dev_err_probe()
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/leds-expresswire.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/leds-expresswire.h b/include/linux/leds-expresswire.h new file mode 100644 index 000000000000..a422921f4159 --- /dev/null +++ b/include/linux/leds-expresswire.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Shared library for Kinetic's ExpressWire protocol. + * This protocol works by pulsing the ExpressWire IC's control GPIO. + * ktd2692 and ktd2801 are known to use this protocol. + */ + +#ifndef _LEDS_EXPRESSWIRE_H +#define _LEDS_EXPRESSWIRE_H + +#include <linux/types.h> + +struct gpio_desc; + +struct expresswire_timing { + unsigned long poweroff_us; + unsigned long detect_delay_us; + unsigned long detect_us; + unsigned long data_start_us; + unsigned long end_of_data_low_us; + unsigned long end_of_data_high_us; + unsigned long short_bitset_us; + unsigned long long_bitset_us; +}; + +struct expresswire_common_props { + struct gpio_desc *ctrl_gpio; + struct expresswire_timing timing; +}; + +void expresswire_power_off(struct expresswire_common_props *props); +void expresswire_enable(struct expresswire_common_props *props); +void expresswire_start(struct expresswire_common_props *props); +void expresswire_end(struct expresswire_common_props *props); +void expresswire_set_bit(struct expresswire_common_props *props, bool bit); +void expresswire_write_u8(struct expresswire_common_props *props, u8 val); + +#endif /* _LEDS_EXPRESSWIRE_H */ |