Commit Graph

3 Commits

Author SHA1 Message Date
Andy Shevchenko 81e4fc6741 lib/string_choices: Add str_write_read() helper
Add an inversed variant of str_read_write(), i.e. str_write_read().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230703185222.50554-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2023-07-28 17:05:47 +02:00
Andy Shevchenko a9fc76645c lib/string_choices: Add str_high_low() helper
Add str_high_low() helper to return 'high' or 'low' string literal.
Also add an inversed variant, i.e. str_low_high().

All the same for str_hi_low().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2023-06-12 20:14:22 +03:00
Andy Shevchenko fca76071ba lib/string_helpers: Split out string_choices.h
Some users may only need the string choice APIs. Split
the respective header, i.e. string_choices.h. Include
it in the string_helpers.h for backward compatibility.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2023-06-12 20:14:21 +03:00