On Tue, May 07, 2024 at 02:09:59PM -0700, Dmitry Torokhov wrote: > On Tue, May 07, 2024 at 10:14:28AM -0500, Jeff LaBundy wrote: > > For example, many devices must be placed in a bootloader mode during > > the FW update, and may clamp or toggle an interrupt pin during this > > mode switch. If user space initiates this sequence while the driver is > > unaware of this process, it may attempt to read status registers from > > an I2C address that is temporarily offline. > And yet we have i2c-dev and hidraw that are often successfully used to > flash the firmware, do diagnostics, etc. without encumbering the kernel. Yeah, those seem like a reasonable enough model for safer devices - they do the exclusion thing so you don't have a real driver running at the same time. For things like PMICs there's some concerns of course. The other model I've seen used BTW is to expose a MTD device, if the device actually looks like a MTD device (perhaps even is just a flash that's fairly directly exposed) that minimises the kernel code quite well.
Attachment:
signature.asc
Description: PGP signature