On 2/9/22 17:26, Javier Martinez Canillas wrote: > On 2/9/22 17:08, Andy Shevchenko wrote: > > [snip] > >>> Agreed, as mentioned I'll give it a try to sending all the data as a >>> bulk write with regmap. >> >> Ah, it might be that it should be noinc bulk op. Need to be checked anyway. >> > > Yeah, I'll give it a try for v4. Let's see how it goes. > I tried to do bulk writes for the command, but the problem is that the command stream has to be as follow (i.e: SSD130X_SET_COL_RANGE command): SSD130X_COMMAND SSD130X_SET_COL_RANGE SSD130X_COMMAND col_start SSD130X_COMMAND col_end That is, a SSD130X_COMMAND has to be writtn for each command and command option. This means that you need to either construct a command stream in the ssd130x_write_cmd() function or pass multiple SSD130X_COMMAND as variadic arguments. Both cases lead to a less elegant implementation than just having a count parameter in ssd130x_write_cmd() and doing multiple writes as it is done in the current implementation. After all, these are only for commands that are done once to setup the device. The SSD130X_DATA writes that are to update the display pixels are already done in bulk, which are more important to do it efficiently. Best regards, -- Javier Martinez Canillas Linux Engineering Red Hat