Re: [PATCH v2] platform/x86: think-lmi: Add bulk save feature

From: Mark Pearson
Date: Thu Sep 21 2023 - 16:26:56 EST



On Thu, Sep 21, 2023, at 12:38 PM, Hans de Goede wrote:
> Hi Mark,
>
> On 9/19/23 16:15, Mark Pearson wrote:
>> On Lenovo platforms there is a limitation in the number of times an
>> attribute can be saved. This is an architectural limitation and it limits
>> the number of attributes that can be modified to 48.
>> A solution for this is instead of the attribute being saved after every
>> modification allow a user to bulk set the attributes and then trigger a
>> final save. This allows unlimited attributes.
>>
>> This patch introduces a save_settings attribute that can be configured to
>> either single or bulk mode by the user.
>> Single mode is the default but customers who want to avoid the 48
>> attribute limit can enable bulk mode.
>>
>> Displaying the save_settings attribute will display the enabled mode.
>>
>> When in bulk mode writing 'save' to the save_settings attribute will
>> trigger a save. Once this has been done a reboot is required before more
>> attributes can be modified.
>>
>> Signed-off-by: Mark Pearson <mpearson-lenovo@xxxxxxxxx>
>> ---
>> Changes in v2:
>> - Correct kernel version in documentation
>> - Updated to sysfs_emit
>> - Clean up code in save_settings_store as recommended
>> - Use correct comment formatting
>
> Thank you for the new version, but next time when a patch has
> already been merged please send any fixes as a follow-up /
> separate patch with just the fixes.
>
> I've replaced the original patch with this one now doing
> a forced push to both my review-hans and the for-next
> branch.
>
Oh - my apologies, I didn't think of that. Thanks for cleaning up for me.
Mark