diff mbox series

[1/9] Input: synaptics-rmi4 - fix firmware update operations with bootloader v8

Message ID 20220608124808.51402-2-matthias.schiffer@ew.tq-group.com (mailing list archive)
State Mainlined
Commit 28f677e9d15181556c1f2103d93b9cc093e7b91f
Headers show
Series Input: synaptics-rmi4 - Bootloader v7/v8 firmware update improvements | expand

Commit Message

Matthias Schiffer June 8, 2022, 12:48 p.m. UTC
Commit a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in
f34v7") allowed the F34v7 driver to probe with bootloader v8, but it did
not update various other bootloader version checks in the F34 code.

Fixes: a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in f34v7")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---
 drivers/input/rmi4/rmi_f34.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Lyude Paul Sept. 22, 2022, 8:06 p.m. UTC | #1
Would add a Cc: stable@vger.kernel.org for this

With that fixed: Reviewed-by: Lyude Paul <lyude@redhat.com>

On Wed, 2022-06-08 at 14:48 +0200, Matthias Schiffer wrote:
> Commit a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in
> f34v7") allowed the F34v7 driver to probe with bootloader v8, but it did
> not update various other bootloader version checks in the F34 code.
> 
> Fixes: a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in f34v7")
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
>  drivers/input/rmi4/rmi_f34.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c
> index e5dca9868f87..3afc94f679ed 100644
> --- a/drivers/input/rmi4/rmi_f34.c
> +++ b/drivers/input/rmi4/rmi_f34.c
> @@ -370,7 +370,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
>  
>  	f34 = dev_get_drvdata(&data->f34_container->dev);
>  
> -	if (f34->bl_version == 7) {
> +	if (f34->bl_version >= 7) {
>  		if (data->pdt_props & HAS_BSR) {
>  			dev_err(dev, "%s: LTS not supported\n", __func__);
>  			return -ENODEV;
> @@ -382,7 +382,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
>  	}
>  
>  	/* Enter flash mode */
> -	if (f34->bl_version == 7)
> +	if (f34->bl_version >= 7)
>  		ret = rmi_f34v7_start_reflash(f34, fw);
>  	else
>  		ret = rmi_f34_enable_flash(f34);
> @@ -413,7 +413,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
>  	f34 = dev_get_drvdata(&data->f34_container->dev);
>  
>  	/* Perform firmware update */
> -	if (f34->bl_version == 7)
> +	if (f34->bl_version >= 7)
>  		ret = rmi_f34v7_do_reflash(f34, fw);
>  	else
>  		ret = rmi_f34_update_firmware(f34, fw);
Matthias Schiffer Sept. 23, 2022, 9:12 a.m. UTC | #2
On Thu, 2022-09-22 at 16:06 -0400, Lyude Paul wrote:
> Would add a Cc: stable@vger.kernel.org for this
> 
> With that fixed: Reviewed-by: Lyude Paul <lyude@redhat.com>

Thanks for the review!

Should I reroll with the added Cc? In my experience, patches will end
up queued for stable through AUTOSEL anyways as soon as the word "fix"
appears somewhere in the commit message.


> 
> On Wed, 2022-06-08 at 14:48 +0200, Matthias Schiffer wrote:
> > Commit a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in
> > f34v7") allowed the F34v7 driver to probe with bootloader v8, but it did
> > not update various other bootloader version checks in the F34 code.
> > 
> > Fixes: a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in f34v7")
> > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> > ---
> >  drivers/input/rmi4/rmi_f34.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c
> > index e5dca9868f87..3afc94f679ed 100644
> > --- a/drivers/input/rmi4/rmi_f34.c
> > +++ b/drivers/input/rmi4/rmi_f34.c
> > @@ -370,7 +370,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
> >  
> >  	f34 = dev_get_drvdata(&data->f34_container->dev);
> >  
> > -	if (f34->bl_version == 7) {
> > +	if (f34->bl_version >= 7) {
> >  		if (data->pdt_props & HAS_BSR) {
> >  			dev_err(dev, "%s: LTS not supported\n", __func__);
> >  			return -ENODEV;
> > @@ -382,7 +382,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
> >  	}
> >  
> >  	/* Enter flash mode */
> > -	if (f34->bl_version == 7)
> > +	if (f34->bl_version >= 7)
> >  		ret = rmi_f34v7_start_reflash(f34, fw);
> >  	else
> >  		ret = rmi_f34_enable_flash(f34);
> > @@ -413,7 +413,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
> >  	f34 = dev_get_drvdata(&data->f34_container->dev);
> >  
> >  	/* Perform firmware update */
> > -	if (f34->bl_version == 7)
> > +	if (f34->bl_version >= 7)
> >  		ret = rmi_f34v7_do_reflash(f34, fw);
> >  	else
> >  		ret = rmi_f34_update_firmware(f34, fw);
Lyude Paul Sept. 23, 2022, 7:13 p.m. UTC | #3
On Fri, 2022-09-23 at 11:12 +0200, Matthias Schiffer wrote:
> On Thu, 2022-09-22 at 16:06 -0400, Lyude Paul wrote:
> > Would add a Cc: stable@vger.kernel.org for this
> > 
> > With that fixed: Reviewed-by: Lyude Paul <lyude@redhat.com>
> 
> Thanks for the review!
> 
> Should I reroll with the added Cc? In my experience, patches will end
> up queued for stable through AUTOSEL anyways as soon as the word "fix"
> appears somewhere in the commit message.

Ahhh, totally forgot about this. Nevermind then, it should be fine as-is :)

> 
> 
> > 
> > On Wed, 2022-06-08 at 14:48 +0200, Matthias Schiffer wrote:
> > > Commit a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in
> > > f34v7") allowed the F34v7 driver to probe with bootloader v8, but it did
> > > not update various other bootloader version checks in the F34 code.
> > > 
> > > Fixes: a6977d758fed ("Input: synaptics-rmi4 - support bootloader v8 in f34v7")
> > > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> > > ---
> > >  drivers/input/rmi4/rmi_f34.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c
> > > index e5dca9868f87..3afc94f679ed 100644
> > > --- a/drivers/input/rmi4/rmi_f34.c
> > > +++ b/drivers/input/rmi4/rmi_f34.c
> > > @@ -370,7 +370,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
> > >  
> > >  	f34 = dev_get_drvdata(&data->f34_container->dev);
> > >  
> > > -	if (f34->bl_version == 7) {
> > > +	if (f34->bl_version >= 7) {
> > >  		if (data->pdt_props & HAS_BSR) {
> > >  			dev_err(dev, "%s: LTS not supported\n", __func__);
> > >  			return -ENODEV;
> > > @@ -382,7 +382,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
> > >  	}
> > >  
> > >  	/* Enter flash mode */
> > > -	if (f34->bl_version == 7)
> > > +	if (f34->bl_version >= 7)
> > >  		ret = rmi_f34v7_start_reflash(f34, fw);
> > >  	else
> > >  		ret = rmi_f34_enable_flash(f34);
> > > @@ -413,7 +413,7 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
> > >  	f34 = dev_get_drvdata(&data->f34_container->dev);
> > >  
> > >  	/* Perform firmware update */
> > > -	if (f34->bl_version == 7)
> > > +	if (f34->bl_version >= 7)
> > >  		ret = rmi_f34v7_do_reflash(f34, fw);
> > >  	else
> > >  		ret = rmi_f34_update_firmware(f34, fw);
>
diff mbox series

Patch

diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c
index e5dca9868f87..3afc94f679ed 100644
--- a/drivers/input/rmi4/rmi_f34.c
+++ b/drivers/input/rmi4/rmi_f34.c
@@ -370,7 +370,7 @@  static int rmi_firmware_update(struct rmi_driver_data *data,
 
 	f34 = dev_get_drvdata(&data->f34_container->dev);
 
-	if (f34->bl_version == 7) {
+	if (f34->bl_version >= 7) {
 		if (data->pdt_props & HAS_BSR) {
 			dev_err(dev, "%s: LTS not supported\n", __func__);
 			return -ENODEV;
@@ -382,7 +382,7 @@  static int rmi_firmware_update(struct rmi_driver_data *data,
 	}
 
 	/* Enter flash mode */
-	if (f34->bl_version == 7)
+	if (f34->bl_version >= 7)
 		ret = rmi_f34v7_start_reflash(f34, fw);
 	else
 		ret = rmi_f34_enable_flash(f34);
@@ -413,7 +413,7 @@  static int rmi_firmware_update(struct rmi_driver_data *data,
 	f34 = dev_get_drvdata(&data->f34_container->dev);
 
 	/* Perform firmware update */
-	if (f34->bl_version == 7)
+	if (f34->bl_version >= 7)
 		ret = rmi_f34v7_do_reflash(f34, fw);
 	else
 		ret = rmi_f34_update_firmware(f34, fw);