platform/x86: think-lmi: Add possible_values for ThinkStation
authorMark Pearson <mpearson-lenovo@squebb.ca>
Mon, 20 Mar 2023 00:32:21 +0000 (20:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:43 +0000 (12:10 +0200)
commitf0a67ad7dce49d93570edc795e0312bb787f19bb
tree967772e5efc71701667702eb3faf06ed52ad685b
parent5b2e50d837f2c55a1101e26c4250f4462eb16f75
platform/x86: think-lmi: Add possible_values for ThinkStation

[ Upstream commit 8a02d70679fc1c434401863333c8ea7dbf201494 ]

ThinkStation platforms don't support the API to return possible_values
but instead embed it in the settings string.

Try and extract this information and set the possible_values attribute
appropriately.

Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms")
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20230320003221.561750-4-mpearson-lenovo@squebb.ca
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/think-lmi.c