Re: [PATCH 2/4] mfd: 88pm800: use irq_mode to configure interrupt status reg clear method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On Monday 01 June 2015 02:01 PM, Lee Jones wrote:
On Sat, 30 May 2015, Vaibhav Hiremath wrote:

 From the spec, bit 1 of reg 0xe (page 0): IN_CLEAR_MODE controls the
method of clearing interrupt status register of 88pm800;

   0: clear on read
   1: clear on write

Signed-off-by: zhaoy <zhaoy@xxxxxxxxxxx>

This signed-off is not acceptable.

No nicknames.  Full names only.


I just carry forwarded the signoff from original commit.
Let me find his complete signoff and add it to this patch.


Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@xxxxxxxxxx>
---
  drivers/mfd/88pm800.c       | 4 +++-
  include/linux/mfd/88pm80x.h | 2 ++
  2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c
index 06ee058..8ea4467 100644
--- a/drivers/mfd/88pm800.c
+++ b/drivers/mfd/88pm800.c
@@ -391,7 +391,8 @@ static int device_irq_init_800(struct pm80x_chip *chip)
  	    PM800_WAKEUP2_INV_INT | PM800_WAKEUP2_INT_CLEAR |
  	    PM800_WAKEUP2_INT_MASK;

-	data = PM800_WAKEUP2_INT_CLEAR;
+	data = (chip->irq_mode) ?
+		PM800_WAKEUP2_INT_WRITE_CLEAR : PM800_WAKEUP2_INT_READ_CLEAR;

These variable names are terrible.  'irq_mode' as a bool tells me
nothing.

What does; irq_mode = 'yes' and irq_mode = 'no' mean?  If I didn't
read the remainder of the code, I would assume if it was 'yes' then
the device was in IRQ Mode and if not, it would be in PIO or Polling
mode, but that's not what it means at all is it?

As for 'data', well, isn't everything data?



I will rename it.


Thanks,
Vaibhav
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux