Re: [PATCH] Module argument to control whether intel-spi-pci attempts to turn the SPI flash chip writeable

From: Arnd Bergmann
Date: Mon Jul 27 2020 - 11:15:57 EST


On Mon, Jul 27, 2020 at 5:05 PM Daniel Gutson <daniel@xxxxxxxxxxxxx> wrote:
> On Sun, Jul 26, 2020 at 4:17 AM Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>> On Sat, Jul 25, 2020 at 02:20:03PM -0300, Daniel Gutson wrote:
>> > El sÃb., 25 jul. 2020 2:56 a. m., Greg Kroah-Hartman <
>> > gregkh@xxxxxxxxxxxxxxxxxxx> escribiÃ:
>> >
>> >
>> > 1) I just did the same that intel-spi.c does.
>>
>> No need to copy bad examples :)
>
>
> Didn't know it was a bad example. What's is the current modern mechanism that replaces initialization-time configuration?

I'd say you'd generally want this to be a per-instance setting, which
could be a sysfs attribute of the physical device, or an ioctl for an
existing user space abstraction.

In the changelog, you should also explain what this is used for. Do
you actually want to write to a device that is marked read-only, or
are you just trying to make the interface more consistent between the
two drivers?

Arnd