On Tue, Jan 31, 2017 at 01:02:57AM -0800, Dmitry Torokhov wrote: > On Sat, Jan 28, 2017 at 07:06:01PM +0000, Nick Dyer wrote: > > The attribute returns the percentage complete. If the firmware update fails, it > > reports a negative error code. > > > > Signed-off-by: Nick Dyer <nick@xxxxxxxxxxxxx> > > Tested-by: Chris Healy <cphealy@xxxxxxxxx> > > Acked-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx> > > Applied, thank you. > > > --- > > drivers/input/rmi4/rmi_f34.c | 40 +++++++++++++++++++++++++++++++++++++++- > > drivers/input/rmi4/rmi_f34.h | 4 ++++ > > drivers/input/rmi4/rmi_f34v7.c | 11 +++++++++++ > > 3 files changed, 54 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c > > index c3285ce..048e593 100644 > > --- a/drivers/input/rmi4/rmi_f34.c > > +++ b/drivers/input/rmi4/rmi_f34.c > > @@ -157,6 +157,9 @@ static int rmi_f34_write_blocks(struct f34_data *f34, const void *data, > > i + 1, block_count); > > > > data += f34->v5.block_size; > > + f34->update_progress += f34->v5.block_size; > > + f34->update_status = (f34->update_progress * 100) / > > + f34->update_size; > > } > > > > return 0; > > @@ -186,6 +189,8 @@ static int rmi_f34_flash_firmware(struct f34_data *f34, > > struct rmi_function *fn = f34->fn; > > int ret; > > > > + f34->update_progress = 0; > > + f34->update_size = syn_fw->image_size + syn_fw->config_size; By the way, this breaks on big endian boxes. I fixed it up locally. Please try incorporating 'sparse' into your workflow. Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html