mfd: Fix checking bit_mask for adp5520_set_bits
Subsystems (3)
PATCH RESEND 1/3 mfd: Fix checking bit_mask for adp5520_set_bits
Current code checks if all the bit_mask bits are all zero is wrong. We need to write new value if old value is not equal to new value.
---
Hi Samuel,
I found this serial of patches are not merged yet.
( although you replied that you applied all 3 patches in the mail ) It was post on https://lkml.org/lkml/2011/10/30/137
So I resend it again.
Thanks,
Axel
drivers/mfd/adp5520.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/adp5520.c +1 -1
@@ -109,7 +109,7 @@ int adp5520_set_bits(struct device *dev, int reg, uint8_t bit_mask) ret =__adp5520_read (chip->client, reg, ®_val); -if (!ret && ((reg_val & bit_mask) ==0 )) { +if (!ret && ((reg_val & bit_mask) != bit_mask)) { reg_val |= bit_mask; ret =__adp5520_write (chip->client, reg, reg_val); }
Signature · 1 line
1.7.5.4
PATCH RESEND 2/3 mfd: da903x: Ensure setting bits if new value is different from the old value
It does not make sense to write new value only when all the bit_mask bits are zero.
We need to write new value if the bit mask fields of new value is not equal to old value.
--- drivers/mfd/da903x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/da903x.c +1 -1
@@ -182,7 +182,7 @@ int da903x_set_bits(struct device *dev, int reg, uint8_t bit_mask)if (ret) goto out; -if ((reg_val & bit_mask) ==0 ) { +if ((reg_val & bit_mask) != bit_mask) { reg_val |= bit_mask; ret =__da903x_write (chip->client, reg, reg_val); }
Signature · 1 line
1.7.5.4
PATCH RESEND 3/3 mfd: tps6586x: Ensure setting bits if new value is different from the old value
In reply to Axel LinIt does not make sense to write new value only when all the bit_mask bits are zero.
We need to write new value if the bit mask fields of new value is not equal to old value.
--- drivers/mfd/tps6586x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/tps6586x.c +1 -1
@@ -197,7 +197,7 @@ int tps6586x_set_bits(struct device *dev, int reg, uint8_t bit_mask)if (ret) goto out; -if ((reg_val & bit_mask) ==0 ) { +if ((reg_val & bit_mask) != bit_mask) { reg_val |= bit_mask; ret =__tps6586x_write (to_i2c_client (dev), reg, reg_val); }
Signature · 1 line
1.7.5.4
2011/12/19 Axel Lin <[email protected]>:
Quoted 12 lines
Current code checks if all the
bit_maskbits are all zero is wrong. We need to write new value if old value is not equal to new value.Signed-off-by Axel Lin <[email protected]>---
Hi Samuel,
I found this serial of patches are not merged yet.
( although you replied that you applied all 3 patches in the mail ) It was post on https://lkml.org/lkml/2011/10/30/137
So I resend it again.
Hi Samuel,
I found these patches already in your for-linus branch.
But it is strange that these patches are not exist in linux-next tree.
Regards,
Axel
Hi Axel,
Quoted 13 lines · Axel Lin
2011/12/19 Axel Lin <[email protected]>:
Quoted 12 lines
Current code checks if all the
bit_maskbits are all zero is wrong. We need to write new value if old value is not equal to new value.Signed-off-by Axel Lin <[email protected]>---
Hi Samuel,
I found this serial of patches are not merged yet.
( although you replied that you applied all 3 patches in the mail ) It was post on https://lkml.org/lkml/2011/10/30/137
So I resend it again.
Quoted 3 lines
Hi Samuel,
I found these patches already in your for-linus branch.
But it is strange that these patches are not exist in linux-next tree.
Strange as in I forgot to cherry pick them. It should be fixed now, sorry.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/